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 Christian Geuer-Pollmann <ma...@nue.et-inf.uni-siegen.de> on 2001/03/21 14:33:08 UTC
How to identify ID attributes
Dear DOM-Gurus,
is there a way to recognise that a specific attribute is of type ID or
NMTOKEN ?
I use a validating parser, and while traversing my DOM tree, I need
information about the type of attributes:
* is it a namespace definition (can be easily detected)
* is it of type ID (based of DTD or Schema) - how do I do that?
* is it of type IDREF or IDREFS or NMTOKEN or NMTOKENS?
Is there an "easy" way to get this info?
Best regards,
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Xerces/DOM: Identify ID attributes without XML validation
Posted by Christian Geuer-Pollmann <ma...@nue.et-inf.uni-siegen.de>.
Dear Xerces-(DOM)-users,
I have a problem:
Can I identify ID or NMTOKEN attributes without validating the document?
"Canonical XML", Section 2.1 "Data Model" states:
<SNIP URL="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" >
The input octet stream MUST contain a well-formed
XML document, but the input need not be validated.
However, the attribute value normalization and entity
reference resolution MUST be performed in accordance
with the behaviors of a validating XML processor.
As well, nodes for default attributes (declared in
the ATTLIST with an AttValue but not specified) are
created in each element. Thus, the declarations
in the document type declaration are used to help
create the canonical form, even though the
document type declaration is not retained
in the canonical form.
</SNIP>
I have to:
- make ID attribute normalisation
- resolve entity references
- detect default attributes
without javax.xml.parsers.DocumentBuilderFactory.setValidating(true)
Is this possible?
Best regards,
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org