[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: RE: unwanted and non prefix namespaces in output
Hi Joel, > Thanks, that did fix the problem. Out of curiosity (strictly > academic as my stylesheet does what I need it to), is there a more > elegant solution to the problem? Or is the stylesheet I wrote along > the correct lines? You could alternatively declare the 'http://schemas.microsoft.com/ads/2003/sequence' namespace as the default namespace in the stylesheet (while keeping it declared with the 'ads' prefix as well, so that you can refer to the elements in that namespace within XPaths). If that's the default namespace in your stylesheet, then any literal result elements that you create (without a prefix) will be placed in that namespace. In other words, change the <xsl:stylesheet> start tag to: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://schemas.microsoft.com/ads/2003/sequence" xmlns:ads="http://schemas.microsoft.com/ads/2003/sequence" version="1.0"> and keep the rest of the stylesheet unchanged (from the one you posted). Note that you probably won't get the namespace declared on all the <sequence> elements, since the inner ones already have the namespace in-scope due to its declaration on the outer one. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
|
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
|