Hi all,
Does anybody know if it is possible to introspect an XSD document thanks to the
ASModel object in dom level 3 ?
Example :
Complex type definition :
<xsd:complexType name="hciSURVEY_SETUP_T">
<xsd:sequence>
<xsd:element name="nbSurveyItemL" type="hciNB_SURVEY_ITEM_T"/>
...
</xsd:sequence>
</xsd:complexType>
Complex type definition for the element named 'nbSurveyItemL' in
'hciSURVEY_SETUP_T' :
<xsd:complexType name="hciNB_SURVEY_ITEM_T">
<xsd:simpleContent>
<xsd:restriction base="LongDef_T">
<xsd:maxInclusive value="255"/>
<xsd:minInclusive value="0"/>
<xsd:attribute ref="label" fixed="Nb Survey Item"/>
<xsd:attribute ref="continous" fixed="true"/>
<xsd:attribute ref="editable" fixed="1"/>
<xsd:attribute name="precision" type="xsd:long" fixed="1"/>
<xsd:attribute name="absMax" fixed="500"/>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
Element of type 'hciSURVEY_SETUP_T' declaration (to validate instances) :
<xsd:element name="hciSURVEY_SETUP" type="hciSURVEY_SETUP_T"/>
This XSD model has been associated to a DOMASBuilder to validate instances by
this way :
ASModel asModel = myDomASBuilder.parseASURI(location); // 'location' points to
the XSD file location
myDomASBuilder.setAbstractSchema(asModel);
Question : parseASURI creates an ASModel object. Using this ASModel object, is
it possible to access to the attributes fixed values
of the 'hciNB_SURVEY_ITEM_T' complex type (fixed value for attribute 'label',
fixed value for attribute 'continous', ...) ??
That means using the ASModel object as a DOM parser to access data contained in
the XSD document (the use of the ASModel API
looks not very clear for me).
Thank you very much.
Nicolas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]