[mike@saxonica.com: RE: [XOM-interest] xml:id initial implementation]

And yet another implementation.

----- Forwarded message from Michael Kay <mike@saxonica.com> -----

From: "Michael Kay" <mike@saxonica.com>
To: "'Elliotte Harold'" <elharo@metalab.unc.edu>,
	"'xom-interest'" <xom-interest@lists.ibiblio.org>
Subject: RE: [XOM-interest] xml:id initial implementation
Date: Fri, 21 Jan 2005 17:13:19 -0000
Cc: 

Presumably this means that an xml:id attribute will automatically show up
with 

att.getType() == Attribute.Type.ID?

If that's the case, then the id() function in Saxon should pick it up
automatically.

I've implemented xml:id for the native Saxon tree models as well.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: xom-interest-bounces@lists.ibiblio.org 
> [mailto:xom-interest-bounces@lists.ibiblio.org] On Behalf Of 
> Elliotte Harold
> Sent: 21 January 2005 16:56
> To: xom-interest
> Subject: [XOM-interest] xml:id initial implementation
> 
> 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@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
> 
> _______________________________________________
> XOM-interest mailing list
> XOM-interest@lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
> 

_______________________________________________
XOM-interest mailing list
XOM-interest@lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/xom-interest


----- End forwarded message -----

-- 
John Cowan  jcowan@reutershealth.com  www.reutershealth.com  www.ccil.org/~cowan
[R]eversing the apostolic precept to be all things to all men, I usually [before
Darwin] defended the tenability of the received doctrines, when I had to do
with the [evolution]ists; and stood up for the possibility of [evolution] among
the orthodox -- thereby, no doubt, increasing an already current, but quite
undeserved, reputation for needless combativeness.  --T. H. Huxley

Received on Friday, 21 January 2005 17:32:02 UTC