OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] JAXP's ID Transform failing to include namespacedeclaratio

[ Lists Home | Date Index | Thread Index ]

> I've hit an unclear spot in the JAXP specification regarding the 
> behavior of ID transforms. I think one thing should be happening and 
> I know something else is happening but I'm not absolutely clear on 
> whether or not I'm right. Clarification would be appreciated.

I'd sure expect that it would not discard any information.

An XSLT transform might, but then that wasn't what was

> There are two problems here:
> 1. The namespace is lost on the svg element.
> 2. The DOCTYPE declaration is lost.
> The details are a little implementation dependent. SAXON and Xalan-J 
> both give these results. However, Gnu JAXP can mask it because it has 
> a bug that cancels out this bug.

I think you're referring to (1) w.r.t. GnuJAXP ... as I pointed out
separately, it's far from clear that particular behavior is a bug.
DOM doesn't say it is.  (Creating a document along with an
"xmlns" node isn't one of the cases enumerated.  The DOM
spec didn't disallow creating xmlns attributes "in all cases",
but just enumerated several such cases.)

Regardless, somewhere on my stack is implementation of
null transforms for GnuJAXP (just wrappers around the
more explicitly SAX-oriented DomParser and XMLWriter).
That implementation of null transforms will certainly not be
discarding any infoset data that's reported through SAX2.
(That includes the DTD ... :)

> Yes, I know that I could add the xmlns attribute, at least, manually.
> However, I think this should be closer to the default behavior of
> XMLSerializer where namespace declaration attributes are inserted
> automatically in the stream as necessary.

I'd sure think so.  Certainly, discarding information found in the
input seems to be violating the spirit of the spec, even though
the letter is disappointingly permissive.

- Dave


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS