Subject: Re: [xsl] Getting the root namespace from the input document From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx> Date: Mon, 5 Feb 2007 12:06:13 +0000 |
Also, I need to get the namespace from the input document and put it into the root element. For example the input root document :
<manifest xmlns:ex="http://www.exercise.com" xmlns:adlcp="http://www.adlnet.org/xsd"/>
the desired output (added namespaces in the root element) <Metadata xmlns:ex="http://www.exercise.com" xmlns:per="http://www.adlnet.org/xsd"> .... </Metadata>
How do I add this namespaces, since I can't do it manually?Which xpath that access the root and tell it to add the namespaces?
<xsl:stylesheet xmlns:ex="http://www.exercise.com" xmlns:per="http://www.adlnet.org/xsd"
Then just create the <Metadata> element and the namespaces will be added for you:
<xsl:template match="/"> <Metadata>
<Metadata xmlns:ex="http://www.exercise.com" xmlns:per="http://www.adlnet.org/xsd">
cheers andrew
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Getting the root namespace fr, San | Thread | Re: [xsl] Getting the root namespac, San |
[xsl] Getting the root namespace fr, San | Date | [xsl] Is there a way of obfuscating, Ben Stover |
Month |