xsl-list
[Top] [All Lists]

RE: [xsl] Use of Select in Params

2007-03-08 01:14:05
You know, the use of a select in param definitions has always 
confused me.  Could someone explain them, maybe a simple 
example?  

It's just a default value for use when the caller doesn't supply one.

Also, the select for the param, does it have an 
effect on the data passed into it (if it is a node litst)?

No, if the caller supplies a value for the param then the select attribute
is ignored.

I have frequently used "../" or is it "/.." to guarantee that 
the param should be interpreted as a node-list.

It doesn't give any such guarantee. The fact that the default value is of
one particular type doesn't stop the caller supplying a value of a different
type. In XSLT 2.0, declare the expected type using an "as" attribute.

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>
--~--

<Prev in Thread] Current Thread [Next in Thread>