This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: namespace transform issue
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] namespace transform issue
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Thu, 19 Apr 2001 09:17:26 +0100
- References: <003501c0c850$a60c3290$d6a8a8c0@monsterdaata.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
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"/>
you have that backwards! You are writing an xsl stylesheet, and you are
using alex: as the prefix for XSL instructions so you need to make alex
the namespace http://www.w3.org/1999/XSL/Transform. Otherwise the XSL
processor won't see <alex:stylesheet as the start of the stylesheet but
as a literal result element.
Having a literal result element at th etop is legal in the simplified
syntax, so long as you have an xsl:version attribute,
> Xalan refuses to transform unless http://alex.com is replaced with
> http://www.w3.org/1999/XSL/Transform.
Well without that, it can't know that you intended this to be a
stylesheet.
> I thought this URL had nothing to do with transforming,
On the contrary, it has everything to with transforming.
Elements in that namespace are XSLT instructions for making
transformations, elements in any other namespace are just
copied to the output.
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list