<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl ="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:saxon="http://icl.com/saxon"
extension-element-prefixes ="saxon"
exclude-result-prefixes ="xs"
version ="1.0">
<xsl:template match="*" >
<xsl:for-each select="/lcdata/*" >
<saxon:output href ="C:\Temp\LC_Splitted\{name(.)}.xml">
<lcdata>
<xsl:for-each select ="../@*">
<xsl:attribute name= "{name(.)}">
<xsl:value-of select= "."/>
</xsl:attribute>
</xsl:for-each>
<xsl:copy-of select ="current()"/>
</lcdata>
</saxon:output>
</xsl:for-each>
</xsl:template>
<xsl:stylesheet xmlns:xsl ="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:saxon="http://icl.com/saxon"
extension-element-prefixes ="saxon"
exclude-result-prefixes ="xs"
version ="1.0">
<xsl:template match="*" >
<xsl:for-each select="/lcdata/*" >
<saxon:output href ="C:\Temp\LC_Splitted\{name(.)}.xml">
<lcdata>
<xsl:for-each select ="../@*">
<xsl:attribute name= "{name(.)}">
<xsl:value-of select= "."/>
</xsl:attribute>
</xsl:for-each>
<xsl:copy-of select ="current()"/>
</lcdata>
</saxon:output>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Комментариев нет:
Отправить комментарий