[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Copying refered files
Hi, I want to achieve following results but don't know exactly what to do? I have a specific directory where all htm files (a.htm, b.htm, c.htm... x.htm) are lying. Input: abc.xml <abc> <x><a href="a.htm">aaa</a></x> <x><a href="b.htm">bbb</a></x> <x><a href="a.htm">aaa</a></x> <x><a href="c.htm">ccc</a></x> <x><a href="b.htm">bbb</a></x> </abc> I want to run a xslt in the above xml file (abc.xml) . This xslt will convert abc.xml into abc.htm and also pulled the cross refered files (do not want to be duplicate). The output directory should contains four html files ie. abc.htm, a.htm, b.htm c.htm. I am trying just as follows: <xsl:template match="abc"> <html> <xsl:apply-templates/> <xsl:for-each select="//a"> <xsl:variable name="reffile" select="@href"/> <xsl:result-document href="{$reffile}"> <xsl:copy-of select="document(concat('masterdir/', $reffile))"/> </xsl:result-document> </xsl:for-each> </html> </xsl:template> Anyone any idea? Thanks
|
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
|