Re: [xsl] inserting a child element while honoring the parent element's content model

Subject: Re: [xsl] inserting a child element while honoring the parent element's content model
From: "Piez, Wendell A. (Fed) wendell.piez@xxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 21 Feb 2023 15:35:29 -0000
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: [xsl] 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

Current Thread