xsl - transform an included file in the xml
-
Hi! Let's say you have an xml file that you want to transform which also includes other XMLs, e.g. something like
<rootnode>
<info>Info<info>
<import file="other.xml"/>
</rootnode>Is there a standard/easy way to read in and process (i.e. apply the same xsl rules to) the imported xml as well? Thanks, Agoston
-
Hi! Let's say you have an xml file that you want to transform which also includes other XMLs, e.g. something like
<rootnode>
<info>Info<info>
<import file="other.xml"/>
</rootnode>Is there a standard/easy way to read in and process (i.e. apply the same xsl rules to) the imported xml as well? Thanks, Agoston
Use the document() function - possibly something like the following might work?
<xsl:template match="info[@file]">
<xsl:apply-templates select="document(@file)"/>
</xsl:template>Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p