[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: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Thu, 8 Nov 2001 13:09:08 +0000
Re:  Testing for certain combinations
Hi Neil,

> I need a way of testing whether or not I have 3 or more <a> links
> separated only by <br/> tags within a <p>.

Given the current node is a p element, perhaps something like:

  not(text()[normalize-space()]) and
  a[3] and br[3] and
  not(a[following-sibling::*[1][not(self::br)]])

This would return true for a p element if:

 - it doesn't contain text that contains anything other than whitespace
 - it has at least three a and br element children
 - all its a element children's immediately following siblings are br
   elements

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

Sounds as though it would be easier if you changed the XML so that
it's more content-oriented. If it looked like:

<links>
  <link href="urlwhatever">Labelwhatever</link>
  ...
</links>

then you could transform it easily both into the WML and HTML (or
whatever) formats.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 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.