[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] document function
Hello XSLers, my question is this: How can I use XSL, the document() function and XT's xt:document extension to overwrite XHTML pages structured in directories and subdirectories with copies of themselves? I have got this far: 1. I have a script that I point at a directory. It runs through all the subdirectories and writes me a list of files in an XML "mother" document, for example: <mother> <file>files\overview.htm</file> <file>files\book1\page1.htm</file> <file>files\book1\chap1\page2.htm</file> </mother> 2. In the XSL stylesheet I run against the above XML file using XT, I can enter each *.htm as follows: <xsl:template match="mother"> <xsl:for-each select="file"> <xsl:apply-templates select="document(.)"/> </xsl:for-each> </xsl:template> 3. I can now handle the contents of these files with templates (actually I want to filter content out of the files and copy the result back to where the original file was): <xsl:template match="*"> <xsl:call-template name="filter"/> </xsl:template> 4. Now I wish to create my output tree (as HTML files): <xsl:template match="html"> <xt:document method="html" href="(each html instance becomes an HTML file at the location indicated by the corresponding file element in the "mother" document) "> <html> <xsl:apply-templates/> </html> </xt:document> </xsl:template> How can I recreate my original file structure as reported in the XML mother document with the filtered copies? Grateful for any hints, Dr. Marc Beckers Documentation Consultant Software AG Uhlandstraße 12 D-64297 Darmstadt Phone +49-6151-92-1322 Fax -1612 mailto:Marc.Beckers@xxxxxxxxxxxxxx Internet www.softwareag.com 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
|