On 02/07/2024 13:28, Jean-Paul Rehr rehrjb@xxxxxxxxx wrote:
> >Or can the outer div appear at any level/with any nesting and parent
> container?
>
> The fragments I pass to the transformer always start with <div>.
>
> But toB explain the larger context:
>
> These <div> fragments are all _direct children_ of a single <body>,
> but for a few reasons I can't pass the full body to the
> transformation. These fragments are being passed into transformation
> from Xquery which can be reduced to:
>
> for $div in $mydoc//body/div
> return
> B B B transform:transform($div, $myxsl, ())
>
>
That sounds as if
B match="(body/div//head)[1]"
should do as the XSLT processor should still see the parent (or perhaps
not, what is transform:transform?, BaseX or exist-db, would need to
check how their XSLT function works exactly).
|