Subject: RE: How to process a list of files
From: "shailesh" <shailesh@xxxxxxxxxxxx>
Date: Tue, 8 Nov 2005 13:36:51 +0530
|
Hi,
Actually I need to know whether Multiple input to multiple output can be
done? How to do this.
Here multiple input means my input.xml which contains
<files>
<file fileloc="a/gen.xml"/>
<file fileloc="a/gen1.xml"/>
</files>
Thanks,
Shailesh
-----Original Message-----
From: Ragulf Pickaxe [mailto:ragulf.pickaxe@xxxxxxxxx]
Sent: Tuesday, November 08, 2005 1:24 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: How to process a list of files
Shailesh,
You have not received any answers to this question (nor to the last
one with a different title, which is identical). Rather than just
reposting, you should perhaps see if there is something with your
mail, that makes it not answered.
When I look at the input, the desired output, and the XSL that you
give, there is absolutely no correlation between the XSL and the
input/output.
Taking one thing, a line like this - which is a solution to a question
you asked some days previously - gives the impression that you do not
read the answers that you are given:
<xsl:value-of
select="concat(substring-before(substring-after(@fileloc,'/xml/'),'.'),'.htm
')"/>
A line like that would not in any way, given "A/gen1.xml" give you gen1.xml.
The XSL also contains code that is not relevant to the problem, which
1) makes it harder to read, 2) gives the impression that you have only
a small subset of the problem, and a solution to your question would
not answer your real problem.
As you ask your question, a solution would be:
<xsl:template match="/">
<xsl:apply-templates select="Root"/>
</xsl:template>
<xsl:template match="Root">
<xsl:for-each select="file"/>
<xsl:value-of select="substring-after(@fileloc,'A/')"/><xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template>
I suspect that this is not what you really want, but this is the
answer to the question that you posed.
Regards,
Ragulf Pickaxe :-/
|