RE: [xsl] splitting one xml into many xml documents using xsl

Subject: RE: [xsl] splitting one xml into many xml documents using xsl
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Fri, 9 Mar 2001 19:18:43 -0000
Meraga,
Try something like this
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0"
xmlns:xt="http://www.jclark.com/xt";
xmlns:saxon="http://icl.com/saxon";
xmlns:xalan="http://www.apache.org/xalan";
>
<xsl:template match="address_object">
	<xsl:for-each select="*">
		<xt:document method="xml" href="{name()}.xml">
			<xsl:copy-of select="." />
			<xsl:fallback />
  		</xt:document>
		<saxon:output method="xml" href="{name()}.xml">
			<xsl:copy-of select="." />
			<xsl:fallback />
  		</saxon:output>
		<xalan:write method="xml" href="{name()}.xml">
			<xsl:copy-of select="." />
			<xsl:fallback />
  		</xalan:write>
	</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

There is no xslt solution you have to use a processor extension function
until xslt 1.1 comes along. This should work on 3 processors although i
quickly tested it with xt for a change ;-)

Ciao Chris

XML/XSL Portal
http://www.bayes.co.uk/xml
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread