[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Copying refered files

Subject: Re: Copying refered files
From: Jingjun Long <longjingjun@xxxxxxxxx>
Date: Fri, 28 Aug 2009 15:02:06 +0800
Re:  Copying refered files
Hello Joga,

You are about to remove duplicated items.

<xsl:for-each-group> may be used to fulfill your needs.

Jingjun

2009/8/28 Joga Singh Rawat <jrawat@xxxxxxxxxxxxxx>
>
> 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.