[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


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!

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.