Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] xml:id initial implementation

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: [XOM-interest] xml:id initial implementation
  • Date: Fri, 21 Jan 2005 11:55:56 -0500

I've made the initial changes necessary to implement xml:id support in CVS, though a little work remains to be done. It turns out to be trickier than expected, because you have to consider all the different ways an xml:id attribute can be created, including things like changing the name or namespace of an attribute that didn't use to be xml:id to xml:id. This is helped a little because XOM enforces the rule that the xml prefix must be bound to the http://www.w3.org/XML/1998/namespace namespace. Therefore each method only needs to check the the qualified name or the local name and namespace URI, whichever is more convenient.

I decided that XOM would only autonormalize xml:id attributes when they come in from a parser. If autonormalization is not sufficient to turn an xml:id value into an NCName, the builder throws a ParsingException. Otherwise, if you try to pass a non-NCName to setValue on xml:id, or change a non-xml:id attribute whose value id a non-NCName to an xml:id, an exception is thrown. XOM does not verify, however, that these values are unique.


--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim





Archive powered by MHonArc 2.6.24.

Top of Page