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

Re: xsl transforming xsl

Subject: Re: xsl transforming xsl
From: Trevor Nash <tcn@xxxxxxxxxxxxx>
Date: Thu, 19 Sep 2002 19:35:24 +0100
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


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.