You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Ni...@sercel.fr on 2003/02/25 09:48:35 UTC
DOM3 question
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: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: DOM3 question
Posted by Elliotte Rusty Harold <el...@metalab.unc.edu>.
At 9:48 AM +0100 2/25/03, Nicolas.GOLOUBENKO@sercel.fr wrote:
>Hi all,
>
>Does anybody know if it is possible to introspect an XSD document
>thanks to the ASModel object in dom level 3 ?
>
ASModel is dead. It is no more. It has ceased to be. So, no, you
can't at least not with any reliability for very much longer.
--
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| Processing XML with Java (Addison-Wesley, 2002) |
| http://www.cafeconleche.org/books/xmljava |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org