I am writing an XSLT for turning an XML file into a human-readable HTML page.
The XML has several fields to describe some aspects of the data, which contain integers which represent mapped strings. The integers are not the information the user wants, I need to map those integers to the corresponding strings.
The mapped strings are available in annotations in the XSD.
For example:
<typewoning>1</typewoning>
Following the XSD declaration:
<xs:element name="typewoning" type="TypeWoningEnum"/>
Maps to:
<xs:simpleType name="TypeWoningEnum">
<xs:restriction base="xs:integer">
<xs:enumeration value="1">
<xs:annotation>
<xs:documentation>vrijstaande woning</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="2">
<xs:annotation>
<xs:documentation>twee-onder-een-kap/rijwoning hoek</xs:documentation>
</xs:annotation>
</xs:enumeration>
etc etc
So in this case, I want to display the annotation for value 1, which should be 'vrijstaande woning'.
What's the best way of approaching this? I'm not that experienced yet in XML/XSLT to know of any of those solutions, and my google searches have turned up nothing useable.
Thanks in advance.