[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xsl transforming xsl
>I cannot output an arbitratry namespace for the xsl template which is >generated and use namespace alias for mainly cosmetic reasons, but I think >management will not bend on this. > That is unfortunate, because it is the right way to do it. I suggest you send them on an XML course to teach them that such things are not a problem :-) >Does anyone have an idea of what might work in this situation? Is there a >way to switch the namespace prefix as well as the definition of that >namespace? > In fact, there is currently no rule that says the XSLT processor (or any other kind of XML processor for that matter) has to honour the prefix you use. It just has to make sure the namespace is correct. I believe XSLT 2.0 changes this, because there is a bit of a problem in that namespace prefixes can also apear inside attribute values - as they do in XPath used within XSLT. Until then, the best you can do is use the namespace-alias mechanism, but in your stylesheet use 'xsl' for the dummy namespace (which is to be aliased) and something else for the XSLT namespace. The XSLT processor will probably then write the generated stylesheet as required. Of course your stylesheet will then be using a 'non standard' namespace prefix itself. If that is not acceptable you are stuck with using 'sed' or something to post-process the output. Regards, Trevor Nash -- Traditional training & distance learning, Consultancy by email Melvaig Software Engineering Limited voice: +44 (0) 1445 771 271 email: tcn@xxxxxxxxxxxxx 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
|