|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: a very unusual namespace question
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








