[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] [XSL] Adding namespaces to output?


Subject: [xsl] [XSL] Adding namespaces to output?
From: Anna Södling <anna.sodling@xxxxxxxxx>
Date: Wed, 18 Mar 2009 10:57:14 +0100

Hi,

I've encountered a little problem (or more exactly two). I want to do
an XSL-transformation where I want to add two namespaces to the root
tag of the resulting output file. I want the output to look like this:
<scxml xmlns="http://www.w3.org/2005/07/scxml"
xmlns:xs="http://commons.apache.org/scxml"
version="1.0"
initialstate="INIT">

I can create the two last attributes simply by using the attribute
tag, but I'm having trouble with the namespaces. I've tried to write
for example:
<xsl:element name="scxml" namespace="http://commons.apache.org/scxml">
but that just gives me the output
<cs:scxml xmlns:cs="http://commons.apache.org/scxml">
which obviously is wrong.
Also, I don't know how to add two different namespaces? If someone
could help me with these two questions I would be very grateful!

Sincerely,
Anna


Current Thread