S
Sandy
Hi,
I have the follwing XML and XSL files, i want to do XSL transformation but
its not working because of the presence of xmlns="Science" in the Envelope
element, It works fine after removing it.
I want to know how do i specify this namespace in XSL.
file.xml
<?xmlversion ="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xml" href="file.xsl"?>
<Envelope
xmlns="Science"><Header><class>A</class><activityName>Run</activityName><msg
Name></Header></Envelope>
file.xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="Science">
<xsl:template match="Envelope"><xsl:apply-templates/></xsl:template>
<xsl:template match="Header"><xsl:value-of select="class"/></xsl:template>
</xsl:stylesheet>
Thanks
I have the follwing XML and XSL files, i want to do XSL transformation but
its not working because of the presence of xmlns="Science" in the Envelope
element, It works fine after removing it.
I want to know how do i specify this namespace in XSL.
file.xml
<?xmlversion ="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xml" href="file.xsl"?>
<Envelope
xmlns="Science"><Header><class>A</class><activityName>Run</activityName><msg
Name></Header></Envelope>
file.xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="Science">
<xsl:template match="Envelope"><xsl:apply-templates/></xsl:template>
<xsl:template match="Header"><xsl:value-of select="class"/></xsl:template>
</xsl:stylesheet>
Thanks