Re: [xsl] Applying lists outside of paragraphs

Subject: Re: [xsl] Applying lists outside of paragraphs
From: "Spencer Tickner" <spencertickner@xxxxxxxxx>
Date: Wed, 20 Sep 2006 11:59:44 -0800
Hi Wendell,


Thanks for the post, node() worked out well. However, you are correct that I would need to find the start of the list element, end one <p> and start another after the list if there is any text() or inline elements after the end of the list. Do you have any suggestions on how this could be done?

Spencer

On 9/20/06, Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> wrote:
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