|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: namespace transform issue
Hi Alex,
> If I switch http://alex.com with
> http://www.w3.org/1999/XSL/Transform, everything works perfectly.
>
> I thought this URL had nothing to do with transforming, but was a
> placeholder for unique names? Is this xalan specific?
Completely the opposite. The namespace URI
'http://www.w3.org/1999/XSL/Transform' is how an XSLT processor
recognises XSLT instructions. If you use a different namespace for
XSLT instructions, then the processor won't recognise them, and
instead think you are using a 'literal result element as stylesheet'
or 'simplified' stylesheet (which is why it's expecting an xsl:version
attribute, something that's mandatory on a simplified stylesheet).
> My code looks like this
>
> <?xml version="1.0" encoding="UTF-8"?>
> <alex:stylesheet xmlns:xsl="http://www.alex.com"
> xmlns:larry="http://www.w3.org/1999/XSL/Transform" version="1.0">
> <alex:namespace-alias stylesheet-prefix="alex" result-prefix="xsl"/>
Really?!? You haven't defined the 'alex' prefix anywhere in that
code, so I expect that your XSLT processor would immediately object to
it. I think you probably mean:
<xsl:stylesheet xmlns:alex="http://www.alex.com"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:namespace-alias stylesheet-prefix="alex" result-prefix="xsl" />
... stylesheet that creates XSLT instructions in the 'alex'
namespace ...
</xsl:stylesheet>
Or:
<alex:stylesheet xmlns:xsl="http://www.alex.com"
xmlns:alex="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<alex:namespace-alias stylesheet-prefix="xsl" result-prefix="alex" />
... stylesheet that creates XSLT instructions in the 'xsl'
namespace ...
</alex:stylesheet>
I hope that helps,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
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








