[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


jaxp newtransformer losing namespace
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@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!

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.