Re: [xsl] Pipe Question

Subject: Re: [xsl] Pipe Question
From: Karl Stubsjoen <kstubs@xxxxxxxxx>
Date: Wed, 8 Jun 2005 13:27:11 -0700
David:  sorry about the typos...

Ok, and sorry for beating this into the ground but a parameter who
shall be evaluated as a node-list must have been defined like this:

<xsl:param name="my_param" select="()"/>

Where the "()" select will evaluate to an empty sequence when none was
supplied.  I understand that it could be any valid xpath expression.

If defined like this:
<xsl:param name="my_param" select="/"/>

Or this:
<xsl:param name="my_param" select="."/>

And the param "my_param" is not supplied you will end up with a copy
of the document source "/" or current context "." (respectively).  Do
I have this correct?




$match is:
<match>A</match>
<match>B</match>

$match is a parameter for one of my templates.  The intent of the
template:  SELECT ALL -or- SELECT ALL where @component = $match.

In this example:
<xsl:template match="X[@component=$match] | X[not(@component=$match)]"/>

Select ALL X elements who's @component is one of the $match elements
-OR- when $match does not exist, SELECT ALL.  Is that not what the
above template match yields?

Karl..

On 6/8/05, David Carlisle <davidc@xxxxxxxxx> wrote:
>
> A line got deleted by miostake!
>
>
>    <xsl:template match="X[@component=$match] | X[not(@component=$match)]"/>
>
>    but that is just a long way of writing
>
> <xsl:template match="X"/>
>
>
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________

Current Thread