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

RE: Testing for certain combinations

Subject: RE: Testing for certain combinations
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Thu, 8 Nov 2001 13:45:42 -0000
mike capalbo
> I need a way of testing whether or not I have 3 or more <a> 
> links separated
> only by <br/> tags within a <p>.

Perhaps:

if test="count(a)>=3 and normalize-space(.)='' and 
not(*[not self::a or self::br])

Mike Kay

  This is hard to explain so 
> here are some
> examples:
> 
> 
> This should test positive:
> 
> <p>
> <a href="urlwhatever">Labelwhatever</a><br/>
> <a href="urlwhatever">Labelwhatever</a><br/>
> <a href="urlwhatever">Labelwhatever</a><br/>
> </p>
> 
> 
> This should test negative since there are only 2 links:
> 
> <p>
> <a href="urlwhatever">Labelwhatever</a><br/>
> <a href="urlwhatever">Labelwhatever</a><br/>
> </p>
> 
> 
> This should also test negative since it contains text outside of <a>:
> 
> <p>
> See our great <a href="urlwhatever">products</a> or read
> <a href="urlwhatever">about us</a>. Feel free to
> <a href="urlwhatever">contact us</a> any time.
> </p>
> 
> 
> For those interested, I'm developing a stylesheet to 
> transform our XML into
> WML for UP browsers.  The UP browser (eg Siemens and Motorola phones)
> displays option lists better than link lists.  Eg:
> 
> <select>
> <option onpick="urlwhatever">Labelwhatever</option>
> <option onpick="urlwhatever">Labelwhatever</option>
> <option onpick="urlwhatever">Labelwhatever</option>
> </select>
> 
> 
> Thanks in advance for any help you can give me,
> 
> Neil.
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.