0
votes

I am able to parse an XSD with XSOM for the most part except when I have an attribute with a different namespace. For this example I want to get the attribue "t:deprecated" for the enumerated value "9901001". Here is a sample XSD:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"  elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:t="http://www.test.com">
    <xs:simpleType name="Test">
        <xs:annotation>
            <xs:documentation>Test.</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration value="9901001"  t:deprecated="yes">
                <xs:annotation>
                    <xs:documentation>Agonal/Idioventricular</xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="9901003">
                <xs:annotation>
                    <xs:documentation>Asystole</xs:documentation>
                </xs:annotation>
            </xs:enumeration>
        </xs:restriction>
    </xs:simpleType>
</xs:schema>
1
I figured it out. Here are the over steps: 1)Parse with xsom and get enumeration value 2)Use xpath to get what I wantnthprime

1 Answers

0
votes

I figured it out. Here are the over steps:
1)Parse with xsom and get enumeration value
2)Use xpath to get what I want