|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Keeping result-document() from writing to a file m
If you can not detect (by some predicates in the input) that you are
in a duplicate then one way is to replace
<xsl:if test="not(doc-available($newFile))"
CREATE FILE NOW
<xsl:result-document method="xml" href="{$newFile}" indent="yes">
<referable-content id="ikj1555615661716" xml:lang="en-us">
<titler>efereable test</title>
<rcbody>
<xsl:copy-of select="document($srcFile)//*[@id = $target]"/>
</rcbody>
</referable-content>
</xsl:result-document>
</xsl:if>
by something like
<result-document href="{$newFile}" >
<referable-content id="ikj1555615661716" xml:lang="en-us">
<titler>efereable test</title>
<rcbody>
<xsl:copy-of select="document($srcFile)//*[@id = $target]"/>
</rcbody>
</referable-content>
</result-document>
so generating elements not writing files at this stage,
Then wrap your outer transformation in a file-writing pass replacing
<xsl:apply-templates/>
by
<xsl:variable name ="x">
<xsl:apply-templates/>
</xsl:variable>
<xsl:for-each-group select="$x//result-document" group-by="@href">
<xsl:result-document href="@href" indent="yes">
<xsl:copy-of select="node()"/>
</xsl:result-document>
</xsl:for-each-group>
David
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








