XML schema documentation ignores xml:lang
Posted: 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:
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:
Is this a bug or do I something wrong?
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>
Here is a screenshot of the resulting documentation:
Is this a bug or do I something wrong?