Chris,
How about (.|preceding-sibling::node), as in
$fromhere/(.|preceding-sibling::node()) ?
Also useful for counting, as in count(self::h1|preceding-sibling::h1).
Cheers, Wendell
From: Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, February 20, 2023 3:29 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: inserting a child element while honoring the parent
element's content model
Hi Eliot,
I hadn't known about these operators, thank you!
I couldn't see a clean way to use "<<" for a preceding-sibling-or-self:: axis
for this specific case, but I will definitely keep these operators in mind for
future DiTA processing tasks.
* Chris
|