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

Re: namespace transform issue

Subject: Re: namespace transform issue
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Thu, 19 Apr 2001 08:35:28 +0100
alex.com
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


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.