AW: AW: p.wrap and attributes

Thanks again. Yes, I've thought about that as well, but then went with the XSLT approach. I'll open an issue for being able to specify elements and attributes in one step. 

> -----Ursprüngliche Nachricht-----
> Von: Norm Tovey-Walsh <ndw@nwalsh.com>
> Gesendet: Donnerstag, 9. Januar 2025 16:19
> An: Maier, Denis Christian (UB) <denis.maier@unibe.ch>
> Cc: gerrit.imsieke@le-tex.de; xproc-dev@w3.org
> Betreff: Re: AW: p.wrap and attributes
> 
> <denis.maier@unibe.ch> writes:
> > In a future xproc version, would it make sense to add something to cover the
> attributes here as well? Something like:
> 
> Yes, perhaps. I tend (personally) to favor small, simple composable steps over
> large, complicated ones. After all, you've got access to XQuery or XSLT if you
> want to do something complicated. But in the steps that add elements, being
> able to specify attributes for those elements might make sense.
> 
> Just in passing, I'll observe that the simpler-than-XSLT workaround is:
> 
> <p:wrap match="xhtml:p[@class='reflist-item']"
>         wrapper="ex:my-random-name"
>         group-adjacent="@class"/>
> 
> <p:set-attributes match="ex:may-random-name"
>         ./>
> 
> <p:rename match="ex:my-random-name"
>           new-name="{{httpns}}div"/>
> 
>                                         Be seeing you,
>                                           norm
> 
> --
> Norm Tovey-Walsh <ndw@nwalsh.com>
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fnorm
> .tovey-
> walsh.com%2F&data=05%7C02%7Cdenis.maier%40unibe.ch%7Cc89086038
> 4f84c01caea08dd30c0fe08%7Cd400387a212f43eaac7f77aa12d7977e%7C1
> %7C0%7C638720327817351656%7CUnknown%7CTWFpbGZsb3d8eyJFbXB
> 0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFp
> bCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=0p3tZ5dH5EHVyVIFs
> vUefcXBJTYp88MYddjwI8krC%2F8%3D&reserved=0
> 
> > Life is pain...anyone who tells you differently is selling
> > something.--Wesley (The Princess Bride)

Received on Friday, 10 January 2025 13:27:02 UTC