|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: JAXP's ID Transform failing to include namespacedeclaratio
> 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 requested. > 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








