xsl-list
[Top] [All Lists]

Re: storing the result of a transformation in a param and evaluating the content

2004-11-23 03:16:08

  String-length only works if $content is a text node, on a result tree
  fragment, it returns false every time.


or more exactly if it has any text nodes anywhere in its descendants.
(You needn't use string-length you ca just use test="string($foo)" which
is the same thing. But if teh variable only consists of elements with no
text content this will test empty.


  I found that I can use an extension function like so:
  <xsl:param name="nodeSet" select="exsl:node-set($content)"/>

almost every processor has a node-set extension (mozilla's transformix
being an exception unfortunately) although not always in the
exsltnamespace. It's more or less considered standard, and in xslt2
variables will automatically produce node-sets and no function will be
needed.

David


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

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