[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Forcing namespaces to root element of output XML

Subject: Re: Forcing namespaces to root element of output XML
From: Joseph Kesselman <keshlam@xxxxxxxxxx>
Date: Wed, 20 Jul 2005 09:15:08 -0400
xslt suppress namespace output
Xalan's serializer will normally not re-assert namespace declarations which
are already in scope -- so the simplest fix may be to manually generate
those declarations on your root element, which should then suppress the
lower-level ones.

Unfortunately XSLT 1.0 doesn't have anything like an <xsl:namespace>
directive. The standard workarounds are to generate unnecessary attributes
in the desired namespaces to force their declaration (not acceptable for
many users), or to build a node in a Result Tree Fragment which uses the
namespace, then xsl:copy the namespace node off that RTF to put it where
you want it (obscure and a bit ugly, but pretty much a standardized
solution). XSLT 2.0 has promised to make this easier.

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk

Current Thread

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