|
[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
At 10:52 AM -0800 1/4/02, Evan Lenz wrote: >First of all, the DTD shouldn't be included in the result, because an >identity transform in XSLT does not preserve DTDs (since they're not a part >of the XPath data model). > I can believe that, and if necessary I can live with it. It's not 100% clear that the ID transform described in JAXP is an XSLT transform though. It's not configured with any particular stylesheet. >Secondly, the missing namespace *is* a problem, but I suspect that's due to >the DOMImlementation, rather than the Transformer object per se. I've run >into this problem before, and I can't say I remember what the solution was. >Someone expert in DOM should probably chime in here. You may need to set >some flag regarding namespaces. > According to the DOM2 Core spec, DOM is specifically *not* supposed to insert namespace declaration Attr objects into the tree just because a namespace is used on an element somewhere. Nor is the user required to provide such attributes. However, anything that serializes a DOM Document *is* supposed to figure out if any additional namespace declaration attributes are required to produce namespace well-formed XML and insert them where necessary. At this point, I suspect if there is a bug it lies in StreamResult. I think Streamresult is seeing namespaced things but not making any efforts to add any necessary xmlns attributes to match. -- +-----------------------+------------------------+-------------------+ | Elliotte Rusty Harold | elharo@m... | Writer/Programmer | +-----------------------+------------------------+-------------------+ | The XML Bible, 2nd Edition (Hungry Minds, 2001) | | http://www.ibiblio.org/xml/books/bible2/ | | http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/ | +----------------------------------+---------------------------------+ | Read Cafe au Lait for Java News: http://www.cafeaulait.org/ | | Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/ | +----------------------------------+---------------------------------+
|
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








