Re: [xsl] XPath for expressing contiguous elements?

Subject: Re: [xsl] XPath for expressing contiguous elements?
From: "Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 1 May 2017 13:19:44 -0000
On 01.05.17 15:13, Syd Bauman s.bauman@xxxxxxxxxxxxxxxx wrote:
But if what you really want is a simple Schematron test, then

| <sch:rule context="A">
|   <sch:report test="following-sibling::B[following-sibling::A]">oops</sch:report>
| </sch:rule>

has the advantage of simplicity, but the disadvantage that it will
fire multiple times (twice for your example) rather than just once.
You can reduce the number of times that it fires with

Or let it fire in the context of Text, like Rogerbs initial version:

<sch:rule context="Test">
<sch:report test="A[following-sibling::*[not(self::A)][following-sibling::A]]"> All A's
shall be contiguous within Test. </sch:report>


Current Thread