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 6:18 PM +0000 1/5/02, Michael Kay wrote:


>I certainly wouldn't expect the namespace declaration to be lost. If Saxon
>is losing it, it's because the namespace declaration isn't present in the
>DOM in the form Saxon expects. There seem to be 57 varieties of ways that
>namespaces may or may not be represented in a DOM, and Saxon often has
>trouble with DOM input for this reason. I don't think your message actually
>said which DOM implementation you were using: in my experience, they are all
>different.
>

I've tried it with Crimson, Xerces-J 1.4.3, and GnuJAXP. The problem 
is present in the first two. GNU JAXP has another bug that cancels 
out this bug so it actually works. :-)

>I would expect the DOCTYPE declaration to be lost. Saxon is basically doing
>an identity transformation according to the XPath data model. If information
>isn't present in the XPath data model, then it's lost during an identity
>transformation.

I guess my question here is whether we can say that this indeed an 
XSLT transform according to the XPath data model? I don't see 
anything in the JAXP spec that actually says that. What it does say 
is:

If all that is desired is the simple identity transformation of a 
source to a result, then
TransformerFactory 90 provides a newTransformer()93 method with
no arguments. This method creates a Transformer that effectively 
copies the source
to the result. This method may be used to create a DOM from SAX events or to
create an XML or HTML stream from a DOM or SAX events.

If it is supposed to be the same effect as an XSLT identity 
transform, then the JAXP spec needs to state this explicitly.
-- 

+-----------------------+------------------------+-------------------+
| 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