Yes that is possible, off the top of my head it would be something like
this...
<xsl:template match="*" >
<xsl:if test="name()='arg1'">
apply your XSL for this type of node..
</xsl:if>
<xsl:apply templates select="*"/>
</xsl:template>
I think that's the kind of thing you do!
-----Original Message-----
From: Arunkumar Halebid [mailto:[EMAIL PROTECTED]
Sent: 11 January 2005 12:19
To: [email protected]
Subject: RE: Xsl help
Thanx for the details.
After these initial steps, I want to make this xsl a kind of generic
interface which can accept:
A rule like :
Traverse the entire input xml. At each node,
If the 'value' of the node is 'arg1', then only consider the node for
further steps.
* Is this possible ? To pass args and apply the same rule at every node
of a
given xml?
* Any leads to this appraoch would be helpful
-Arun
-----Original Message-----
From: Eric Pailleau [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 11, 2005 4:45 PM
To: [email protected]
Subject: Re: Xsl help
Arunkumar Halebid wrote:
> Hello,
>
> * In the xsl I set the output method to text. Within the style sheet I
> am trying to include some string also as output, apart from node
> values of the input xml.
>
> * I do not see any text output in the resulting transformation. Where
> am I doing a mistake?
Sorry, my explanations were too short !
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output
method="text" indent="no"/>
<xsl:template match="/Model/MOC">
<xsl:choose>
<xsl:when
test="normalize-space(text())='MOC1'"><xsl:text>Class </xsl:text>
<xsl:value-of select="text()"/>
<xsl:apply-templates select="attrName"/>
</xsl:when>
<!-- <xsl:otherwise><xsl:text>Error in :</xsl:text><xsl:value-of
select="node()"/></xsl:otherwise> -->
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
--
--------------------------------------------------------------------
Eric PAILLEAU | NUMLOG | Tel : +33(0)130791616
[EMAIL PROTECTED] | http://www.numlog.fr | Fax : +33(0)130819286
--------------------------------------------------------------------