xsl-list
[Top] [All Lists]

RE: A parameter current context or context passed

2005-05-13 12:35:37
This should be an easy one...

I have the following paramter:
<xsl:param name="current" select="/ | current()"/>

As the name implies it should be the current context unless otherwise
specified.  Have I written this correct?


I think you just want

<xsl:param name="current" select="."/>

current() means the same as "." unless it appears in a predicate.

/ | .

is the union of the context node and the root node of the tree containing
the context node. I can't see any reason why you should want that union as
the default value of a parameter.

Michael Kay
http://www.saxonica.com/



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--