Re: preceding-sibling in a group

"Michael Kay [email protected]" <[email protected]> Wed, 19 May 2021 17:22:55 -0000
Newsgroups gmane.text.xml.xsl.general.mulberrytech
Message-ID <[email protected]>
--Apple-Mail=_FAFEC495-7858-4050-82F4-A22E640C0F89
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

It would be good to see the problem in context, but if you want to select e=
lements that are both (a) members of the current group, and (b) preceding s=
iblings of the current element, then you could use (preceding-sibling::* in=
tersect current-group()).

I suspect though that there is a better solution.

Michael Kay
Saxonica

> On 19 May 2021, at 17:45, [email protected] <[email protected]=
berrytech.com> wrote:
>=20
> Hi,
>=20=20
> If I am processing elements in the current-group (), is the preceding-sib=
ling axis restricted to the current group? I want to test the value on a pr=
eceding-sibling element, but want to restrict it to the group I am processi=
ng. Any pointers would be appreciated. I am using XSLT 3. Thank you very mu=
ch.
>=20=20
> Rick
>=20=20
> Rick Quatro
> Carmen Publishing Inc.
> 585-729-6746
> [email protected] <mailto:[email protected]>
> http://www.frameexpert.com/store <http://www.frameexpert.com/store>
>=20=20
>=20=20
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/293509> (by=
 email <>)
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/3329386
or by email: [email protected]
--~--

--Apple-Mail=_FAFEC495-7858-4050-82F4-A22E640C0F89
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; charset=
=3Dus-ascii"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode=
: space; line-break: after-white-space;" class=3D"">It would be good to see=
 the problem in context, but if you want to select elements that are both (=
a) members of the current group, and (b) preceding siblings of the current =
element, then you could use (preceding-sibling::* intersect current-group()=
).<div class=3D""><br class=3D""></div><div class=3D"">I suspect though tha=
t there is a better solution.</div><div class=3D""><br class=3D""></div><di=
v class=3D"">Michael Kay</div><div class=3D"">Saxonica<br class=3D""><div><=
br class=3D""><blockquote type=3D"cite" class=3D""><div class=3D"">On 19 Ma=
y 2021, at 17:45, <a href=3D"mailto:[email protected]" class=3D"">rick@ri=
ckquatro.com</a> &lt;<a href=3D"mailto:[email protected].=
com" class=3D"">[email protected]</a>&gt; wrote:</div=
><br class=3D"Apple-interchange-newline"><div class=3D""><meta charset=3D"U=
TF-8" class=3D""><div class=3D"WordSection1" style=3D"page: WordSection1; c=
aret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; font-sty=
le: normal; font-variant-caps: normal; font-weight: normal; letter-spacing:=
 normal; text-align: start; text-indent: 0px; text-transform: none; white-s=
pace: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decor=
ation: none;"><div style=3D"margin: 0in; font-size: 11pt; font-family: Cali=
bri, sans-serif;" class=3D""><span lang=3D"en-BB" class=3D"">Hi,<o:p class=
=3D""></o:p></span></div><div style=3D"margin: 0in; font-size: 11pt; font-f=
amily: Calibri, sans-serif;" class=3D""><span lang=3D"en-BB" class=3D""><o:=
p class=3D"">&nbsp;</o:p></span></div><div style=3D"margin: 0in; font-size:=
 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"en-BB" c=
lass=3D"">If I am processing elements in the current-group (), is the prece=
ding-sibling axis restricted to the current group? I want to test the value=
 on a preceding-sibling element, but want to restrict it to the group I am =
processing. Any pointers would be appreciated. I am using XSLT 3. Thank you=
 very much.<o:p class=3D""></o:p></span></div><div style=3D"margin: 0in; fo=
nt-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><span lang=3D"=
en-BB" class=3D""><o:p class=3D"">&nbsp;</o:p></span></div><div style=3D"ma=
rgin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><=
span lang=3D"en-BB" class=3D"">Rick<o:p class=3D""></o:p></span></div><div =
style=3D"margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" c=
lass=3D""><o:p class=3D"">&nbsp;</o:p></div><div style=3D"margin: 0in; font=
-size: 11pt; font-family: Calibri, sans-serif;" class=3D"">Rick Quatro<o:p =
class=3D""></o:p></div><div style=3D"margin: 0in; font-size: 11pt; font-fam=
ily: Calibri, sans-serif;" class=3D"">Carmen Publishing Inc.<o:p class=3D""=
></o:p></div><div style=3D"margin: 0in; font-size: 11pt; font-family: Calib=
ri, sans-serif;" class=3D"">585-729-6746<o:p class=3D""></o:p></div><div st=
yle=3D"margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" cla=
ss=3D""><a href=3D"mailto:[email protected]" class=3D"">rick@frameexpert=
.com</a><o:p class=3D""></o:p></div><div style=3D"margin: 0in; font-size: 1=
1pt; font-family: Calibri, sans-serif;" class=3D""><a href=3D"http://www.fr=
ameexpert.com/store" class=3D"">http://www.frameexpert.com/store</a><o:p cl=
ass=3D""></o:p></div><div style=3D"margin: 0in; font-size: 11pt; font-famil=
y: Calibri, sans-serif;" class=3D""><o:p class=3D"">&nbsp;</o:p></div><div =
style=3D"margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" c=
lass=3D""><span lang=3D"en-BB" class=3D""><o:p class=3D"">&nbsp;</o:p></spa=
n></div></div><div style=3D"caret-color: rgb(0, 0, 0); font-family: Helveti=
ca; font-size: 13px; font-style: normal; font-variant-caps: normal; font-we=
ight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-=
stroke-width: 0px; text-decoration: none;" class=3D""><div style=3D"border-=
top-width: 1px; border-top-style: solid; border-top-color: black; backgroun=
d-color: rgb(221, 221, 221); color: rgb(136, 136, 136); font-size: smaller;=
 padding: 5px; text-align: center; font-family: arial, verdana, arial, sans=
-serif; clear: both; margin: auto;" class=3D""><a href=3D"http://www.mulber=
rytech.com/xsl/xsl-list" class=3D"">XSL-List info and archive</a><div style=
=3D"text-align: center;" class=3D""><a href=3D"http://lists.mulberrytech.co=
m/unsub/xsl-list/293509" style=3D"color: blue;" class=3D"">EasyUnsubscribe<=
/a><span class=3D"Apple-converted-space">&nbsp;</span>(<a href=3D"" style=
=3D"color: blue;" class=3D"">by email</a>)</div></div></div></div></blockqu=
ote></div><br class=3D""></div></body></html>
<div><!-- begin bl.html.trailer -->
<div style=3D"border-top:1px solid black; background-color: #dddddd;
color: #888888; font-size: smaller; padding: 5px; text-align: center;
font-family: arial,verdana,arial,sans-serif; margin-top:1em; clear:
both; margin: auto">
<a href=3D"http://www.mulberrytech.com/xsl/xsl-list">
XSL-List info and archive</a>
<div style=3D"text-align:center;">
<a style=3D"color: blue;"
  href=3D"http://lists.mulberrytech.com/unsub/xsl-list/3329386"
>EasyUnsubscribe</a>
(<a style=3D"color: blue;"
href=3D"mailto:[email protected]?subject=3Dremove"
>by email</a>)
</div>
</div>
<!-- end bl.html.trailer --></div>

--Apple-Mail=_FAFEC495-7858-4050-82F4-A22E640C0F89--