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 ]

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@metalab.unc.edu | 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/     |
+----------------------------------+---------------------------------+




 

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

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