Hi I have a XSLT file which need to transform an XML file.
Sample XSLT
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<Document>
<Customer>
<Header>
<Message>
<xsl:value-of select="//Header/Message"/>
</Message>
</Header>
</Customer>
</Document>
</xsl:Template>
<xsl:include href="Inc1.xsl" />
</xsl:stylesheet>
Now what I need is to change the node name Customer to Supplier depending on the include filename at the bottom and one more thing, I have specific attributes for the Document node also depending on the include file.
Thanks and hope someone can help me out.
The only viable mechanism is to have the included stylesheet handle the specific element names and <Document> attributes: Something like this:
and the included stylesheet:
or,