It is just manually designed concept - no tests, it should help.

<xsl:stylesheet >
<xsl:param name="which_d">all</xsl:param>

<xsl:template match="rdf">
<html><body><h2>descriptions</h2>
<xsl:apply-templates select="*[@about = $which_d or $which = 'all']" />
</body></html>
</xsl:template>

<xsl:template match="desc">
  .. etc. ...
</xsl:template>

Pavel

tim fulcher wrote:

> OK,
> 
> I guess I'm being particularly slack brained today.
> If I have a bit of xml like this
> 
> <rdf>
>  <desc about="foo">
>     .... nested nodes
>  </desc>
>  <desc about="bar">
>     .... nested nodes
>  </desc>
>  <desc about="baz">
>     .... nested nodes
>  </desc>
> </rdf>
> 
> and a stylesheet like this
> 

> Using sabcmd I could specify which <desc> to process with
> sabcmd a.xsl a.xml  '$which_d=foo'
> 
> How can I specify in the xsl that the default value (if which_d not supplied)
> should match all <desc>  ?
> 
> cheers
> 
> 
> Tim


Reply via email to