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

Re: Read directory and its contents and put it to anot

Subject: Re: Read directory and its contents and put it to another file
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Tue, 7 Oct 2008 16:42:00 +0530
Re:  Read directory and its contents and put it to anot
You can do something like (a modified identity transformation),

<xsl:variable name="inputFiles"
select="collection(concat($dir,'?select=*.tbl'))" />

<xsl:template match="node() | @*">
  <xsl:copy>
    <xsl:apply-templates select="node() | @*" />
  </xsl:copy>
</xsl:template>

<xsl:template match="span">
  <xsl:variable name="idVal" select="@id" />
  <xsl:copy-of select="$inputFiles/*[contains(base-uri(.), $idVal)]" />
</xsl:template>

This comes quickly out of my mind, and is not tested.

On Tue, Oct 7, 2008 at 4:19 PM, J. S. Rawat <jrawat@xxxxxxxxxxxxxx> wrote:
> Hi list
> Have anyone an idea how to read directory. I am using saxon with xsl 2.0 and
> want to do it by passing arguments
> java -jar saxon8.jar a.xml a.xsl tables=tables >b.htm
>
> 1. I have a table directory which have 'n' number of coded tables.
> 2. Second i have an xml file where tabels are called.
> 3. I have to pull the table from table directory and paste it into the
> output file.
>
> table>dir
> t1.tbl
> t2.tbl
> ...
> tn.tbl
>
> Content of 1.tbl
> <table>
> ...
> </table>
>
> Input
> <p>xxx <span id="t1"/> yyy </p>
>
> Output
> <p>xxx <table>...</table> yyy</p>
>
> Thanks in advance
> ...JSR


-- 
Regards,
Mukul Gandhi

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.