[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


xmlserializer jaxp
> 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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.