XML schema documentation ignores xml:lang

<oXygen/> general issues.
Hubert Hopf
Posts: 2

XML schema documentation ignores xml:lang

Fri Nov 09, 2018 12:59 pm

I try to generate documentation of our xsd files as a technical documentation for developers.
We have a lot of enumerations, which are documented in xsd like this:

Code: Select all

      
   <xs:simpleType name="enumSheathingType">
      <xs:annotation>
         <xs:documentation xml:lang="en">
            This enum contains sheathing type groups which are normally defined in the WUP interface. In some applications,
            material indexes can be assigned to such types, and depending on the type, the application can use
            different information (i.e. ignore thickness on foil or glue layers)
         </xs:documentation>
         <xs:documentation xml:lang="de">
            Dieser Enum enthält Beplankungsgruppen, welche normalerweise in der WUP-Schnittstelle vordefiniert sind.
            In einigen Programmen können Materialindizes zu diesen Typen zugeordnet werden. Abhängig von diesen Typen kann das
            Programm dann unterschiedliche Informationen verwenden (z.B. Ignorieren der Dicke bei Leim- oder Folienlagen).
         </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:string">
         <xs:enumeration value="UndefinedSheathingType">
            <xs:annotation>
               <xs:documentation xml:lang="en">
                  Sheathing type is not yet identified or can not be assigned.
               </xs:documentation>
               <xs:documentation xml:lang="de">
                  Beplankungstyp wurde noch nicht identifiziert oder kann nicht zugeordnet werden.
               </xs:documentation>
            </xs:annotation>
         </xs:enumeration>
         <xs:enumeration value="Sheet">
            <xs:annotation>
               <xs:documentation xml:lang="en">
                  Sheets: Normal sheeting layer which can have processings and thickness.
               </xs:documentation>
               <xs:documentation xml:lang="de">
                  Platten: Normale Plattenlage, welche Bearbeitungen und eine Dicke haben kann.
               </xs:documentation>
            </xs:annotation>
         </xs:enumeration>
         <xs:enumeration value="Cladding">
            <xs:annotation>
               <xs:documentation xml:lang="en">
                  Cladding: Normal cladding layer which can have processings and thickness.
                  Keywords SLI/SLA in older versions, PLI/PLA with material index in newer versions.
               </xs:documentation>
               <xs:documentation xml:lang="de">
                  Schalung: Normale Schalungslage, welche Bearbeitungen und eine Dicke haben kann.
                  Schlüsselwörter SLI/SLA in älteren Versionen, PLI/PLA mit Materialindex in neueren Versionen.
               </xs:documentation>
            </xs:annotation>
         </xs:enumeration>
      ...
      </xs:restriction>
   </xs:simpleType>


When I generate documentation in language "en", the text is in english as expected. But when I generate in german ("de"), only the first annotation is in german, the text for each enumeration is still in english, because english is the first language of the annotations in the single enum. If I change the order of "de" and "en" text, always the first text appears.

Here is a screenshot of the resulting documentation:
Image

Is this a bug or do I something wrong?
adrian
Posts: 2459

Re: XML schema documentation ignores xml:lang

Tue Nov 13, 2018 12:49 pm

Hello,

I can confirm this is a bug. It seems xml:lang is ignored for facets and the first xs:documentation is picked instead.
I've logged this on our issue tracking tool to be resolved in a future release. For future reference it is issue EXM-42497.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Hubert Hopf
Posts: 2

Re: XML schema documentation ignores xml:lang

Tue Nov 13, 2018 6:35 pm

Thank's for your help.
I guess, I can wait until a bugfix or find a workaround until it is fixed.

regards

Return to “Other Issues”

Who is online

Users browsing this forum: No registered users and 0 guests