xsl-list
[Top] [All Lists]

Re: HTML RANDOM NODE LIST

2004-02-20 12:55:23
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



<Prev in Thread] Current Thread [Next in Thread>