Re: [xsl] Applying lists outside of paragraphs

Subject: Re: [xsl] Applying lists outside of paragraphs
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 20 Sep 2006 15:15:49 -0400
Spencer,

At 01:53 PM 9/20/2006, you wrote:
I can't quite figure out why <xsl:apply-templates
select="*[not(descendant-or-self::list.appl)]"/> does not want to
apply the default text() template. I've also tried no axis, child::,
descendant:: and even self:: but none give the desired output... Any
ideas? I'm using Saxon 8.7.1

It's because you're asking for elements, not text nodes.


* in this context is short for child::*, meaning all child elements.

You want (or perhaps you think you want)

node()[not(descesdant-or-self::list.appl)]

which selects all node children of any type, including elements and test, which are not themselves list.appl elements and have no list.appl element descendants.

That will get you at least part of the way there. But if you're trying to split your paragraphs around the list, it won't get you all the way, as the list is going to appear only after the paragraph -- so out of order, unless your list is always the last thing in the paragraph (as in your example). Maybe that's okay with you....

Cheers,
Wendell

Current Thread