[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Blindstaring on descendent(-or-self), following(-

Subject: Re: Blindstaring on descendent(-or-self), following(-sibling) and the like, from inside an xsl:function
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Tue, 26 Sep 2006 19:22:17 +0200
descenden
Abel Braaksma wrote:
Question: is the first item inside $someparam a text-node or any other node? Whitespace is considered a textnode also.

Putting it a bit clearer: xpath must return true for the following nodes:

<em>some text</em>
<em> <strong>bla</strong></em>
<em>some text<strong>bold text</strong>more text</em>
<em> </em>

and must return false in these scenarios:
<em />
<em><strong>bold text</strong>more text</em>
<em><em>text</em>text<strong>bold text</strong></em>

Consider the node 'em' in the above examples as being in a param for xsl:function:

<xsl:function name="local:myfunc">
   <xsl:param name="param1" />
   <xsl:if test="WHAT_GOES_HERE">
       do something when node starts with text
   </xsl:if>
</xsl:function>

Cheers!

-- Abel

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.