Namespaces in xproc

Hi,

In my pipeline I have an xproc step that should wrap all adjacent elements with a given class in a div.
<p:wrap match="xhtml:p[@class='reflist-item']" wrapper="xhtml:div" group-adjacent="@class"/>

First, this works but it feels a bit cumbersome as I need to supply the grouping information twice, once in @match then in @group-adjacent. Maybe there's a better way, but anyway....

Now to my real question: I don't quite understand how namespaces are handled here. I need the namespace prefix when matching, but how can I write a simple div element in the xhtml namespace? If I use the prefix, it will write out the prefix as well, if I omit the prefix it will add an empty namespace declaration.

Best,
Denis

Received on Wednesday, 8 January 2025 13:15:20 UTC