|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Outputting to separate files.
XSL, Love it! Absolutely marvellous!
One small thing that I would love to have is the ability to redirect output
to a set of output files, directed by the StyleSheet.
For example, say I have a dictionary, like so
<DICT>
<ENTRY>
<WORD>Someword</WORD>
<DEF>Definition of someword</DEF>
</ENTRY>
<ENTRY>
.....
</ENTRY>
</DICT>
I'd like to be able to
<xsl:template match="DICT">
<xsl:for-each select="ENTRY">
<xsl:output-to filename="{.}.htm"/>
<xsl:apply-templates select="../DEF"/>
</xsl:output-to>
</xsl:for-each>
</xsl:template>
Could I do this with the existing XSL? Or would I have to roll my own using
the DOM? Or am I failing to grasp the concept of declarative transformation
(vs procedural)?
At the moment, I'm just maintaining my "dictionary" in a wodge of little
files and processing them all individually from the command line, which
means there is a lot of file opening and closing overheads.
Thanks for all the great work, XSL folks. You've radically changed the way I
work.
Regards,
Alan.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








