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

Re: HTML RANDOM NODE LIST

Subject: Re: HTML RANDOM NODE LIST
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 20 Feb 2004 14:55:23 -0500
html random
Tracy,

I suggest you check out the page on "Lookup" in the FAQ:

http://www.dpawson.co.uk/xsl/sect2/N4995.html

Using this pattern you can list all the titles you want to suppress in your stylesheet, or elsewhere, and use a test like

test="not(preceding-sibling::TITLE[1] = $suppress-titles)"

where $suppress-titles is the list of titles you want to interdict.

You can use the same list to exclude items from node sets you are counting, etc. But it sounds like you may ultimately want to do this in two passes, to simplify the logic.

Good luck,
Wendell

At 01:19 PM 2/20/2004, you wrote:
Josh,
    the problem with that method is that the real XML document is much larger
with a multitude of different tags and tag levels.  The info contained within
the tags must be output in a linear fashion so I cannot process it with
for-each loops, I have to use nested/recursive template matches.  It is within
the "template-match" for ITEM, the lowest element in the document, that I must
somehow discern between the ITEM's ancestor TITLE's literal value to determine
whether it should be included within my numbered list.  The parameters for
things like count() and position() are all node sets, and I cannot use a test
such as:"not(preceding-sibling::TITLE[1]='Raging River')" to accumulate count
or position.  I'm stumped.
Tracy.

___&&__&_&___&_&__&&&__&_&__&__&&____&&_&___&__&_&&_____&__&__&&_____&_&&_
"Thus I make my own use of the telegraph, without consulting
the directors, like the sparrows, which I perceive use it
extensively for a perch." -- Thoreau



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.