I have the following input XML:
<?xml version="1.0"?>
<ordersubmit xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.company.com/webservices/ordersubmit">
<order>
<header>
<ordername>TestOrder</ordername>
<start>2006-04-11</start>
</header>
</order>
<request>
<requestaction>SaveAsDraft</requestaction>
</request>
</ordersubmit>
and I need to perform an XSLT such that the result is the following
(changing the namespace structure and reformatting the date:
<ordersubmit xmlns="urn:DGCOrder-schema">
<order>
<header>
<ordername>TestOrder</ordername>
<start>04/11/2006</start>
</header>
</order>
<request>
<requestaction>SaveAsDraft</requestaction>
</request>
</ordersubmit>
The following is my current XLST that provides the namespace structure
I need, but I haven't been able to to write a template match that finds
the element named 'start' such that I can reformat the date:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0" xmlns="urn:DGCOrder-schema">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="*">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="@* | node()" />
</xsl:element>
</xsl:template>
</xsl:stylesheet>
Can anyone provide some assistance as to the correct statement to add
to this XSLT to find the 'start' element so I can reformat the date?
Thanks in advance.