Re: [xsl] namespace transform issue

Subject: Re: [xsl] namespace transform issue
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Thu, 19 Apr 2001 08:35:28 +0100
Hi Alex,

> If I switch with
>, 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
'' 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="";
> xmlns:larry="";  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="";
<xsl:namespace-alias stylesheet-prefix="alex" result-prefix="xsl" />
... stylesheet that creates XSLT instructions in the 'alex'
    namespace ...


<alex:stylesheet xmlns:xsl="";
<alex:namespace-alias stylesheet-prefix="xsl" result-prefix="alex" />
... stylesheet that creates XSLT instructions in the 'xsl'
    namespace ...

I hope that helps,


Jeni Tennison

 XSL-List info and archive:

Current Thread