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

RE: a very unusual namespace question

Subject: RE: a very unusual namespace question
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Mon, 21 May 2001 09:30:49 +0100
using unusual namespace
> I have a stylesheet A that is outputting stylesheet B (using
> xsl:namespace-alias'ing).  Stylesheet B will be matching elements from
> namespace N so it must have a namespace declaration for N.
> But the problem
> is that namespace N is not known at the time I construct A
> and does not
> appear in the input to A.  I would like to pass the prefix
> and URI for N to
> stylesheet A as top-level parameters.  How can I get stylesheet A to
> generate a namespace declaration in B from the parameters?

As Jeni pointed out, you can generate a namespace declaration in the output
document by generating a dummy attribute that uses that namespace.
Fortunately your target document is a stylesheet, and stylesheets allow
dummy attributes to appear on any xsl element provided they are
namespace-qualified. (But don't put it on a literal result element!).

There's no way currently of generating a free-standing namespace declaration
in the output document, though if the processor implements the errata to
XSLT 1.0 then you can copy a namespace node from any source document using
<xsl:copy>.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.