Hi,
I have a draft XSLT working which includes the target namespace in the resulting XML. However, I end up adding the namespace attribute in every <xsl:template ... /> tag. Is there a way to include it only once in the XSL instead of so many times? Below is a snippet of what I am currently doing. Can I add
"xmlns:ns0=http://Microsoft.LobServices.OracleD.../SHIPMENT_DATA>" so the ns0 will be identified in the XSLT correctly and included in the output XML? Please let meknow if my question isn't clear.
Also, how do I copy the XML/XSLT/code with the indentation intact from my source IDE?
Code:
<xsl:template match="s0:componentId">
<ns0:COMPONENTID xmlns:ns0="http://Microsoft.LobServices.OracleD.../SHIPMENT_DATA">
<xsl:value-of select="." />
</ns0:COMPONENTID>
</xsl:template>
<xsl:template match="s0:productCode">
<ns0:PRODUCT_CODE xmlns:ns0="http://Microsoft.LobServices.OracleDB/2007/03/SCOTT/Table/SHIPMENT_DATA">
<xsl:value-of select="." />
</ns0:PRODUCT_CODE>
</xsl:template>
<xsl:template match="s0:shipmentNumber">
<ns0:SHIPMENTNUMBER xmlns:ns0="http://Microsoft.LobServices.OracleDB/2007/03/SCOTT/Table/SHIPMENT_DATA">
<xsl:value-of select="." />
</ns0:SHIPMENTNUMBER>
</xsl:template>
<xsl:template match="s0:expirationDate">
<ns0:EXPIRATION_DATE xmlns:ns0="http://Microsoft.LobServices.OracleDB/2007/03/SCOTT/Table/SHIPMENT_DATA">
<xsl:value-of select="." />
` </ns0:EXPIRATION_DATE>
</xsl:template>
Thanks.