[Home] [By Thread] [By Date] [Recent Entries]
Am 22.04.2008 um 11:45 schrieb Harry Liljestrvm:
Thanks Michael for responding my question so quickly. It seems you want something like <xsl:result-document href="unsupported.xml">
<unsupported>
<xsl:for-each select="//all_unsupported_nodes">
...
</xsl:for-each>
</unsupported>
</xsl:result-document>Michael Kay's answer tells me it is not that easy and you may need a two-step process: 1) mark all unsupported nodes and process all supported nodes as desired using Michael example: <xsl:template match="*">
<xxx:untransformed-element>
<xsl:copy-of select="."/>
(or perhaps <xsl:apply-templates/>)
</xxx:untransformed-element>
</xsl:template>
<xsl:template match="/">
<!-- create a file with the unsupported nodes -->
<xsl:result-document href="unsupported.xml">
<unsupported>
<xsl:for-each select="//xxx:untransformed-element">
<xsl:copy-of select="."/>
</xsl:for-each>
</unsupported>
</xsl:result-document>
<!-- pass through all but the above elements -->
<xsl:apply-templates select="node()[name()!='xxx:untransformed-
element']" />
</xsl:template><!-- identity transform does the rest -->
<xsl:template match="element()">
<xsl:copy>
<xsl:apply-templates select="@*,node()"/>
</xsl:copy>
</xsl:template><xsl:template match="attribute()|text()|comment()|processing- instruction()"> <xsl:copy/> </xsl:template> By the way, what do you mean with "identity transform template"?
- Michael M|ller-Hillebrand -- _______________________________________________________________ Michael M|ller-Hillebrand: Dokumentations-Technologie Adobe Certified Expert, FrameMaker Lvsungen und Training, FrameScript, XML/XSL, Unicode <http://cap-studio.de/> -- Tel. +49 (9131) 28747
|

Cart



