Re: Copy atrribute

Hello Norm and Denis,

The devil on my shoulder would like to know if you can explain why it seems
like step abuse.

My guess is it has something to do with the imagined use case for the
element (hence its name). But of course 'annotate-element' might be just as
good a name. Isn't the real problem the way the step is named and described
in the docs?

Evil-grinningly,
Wendell




On Fri, Mar 21, 2025 at 5:13 AM <denis.maier@unibe.ch> wrote:

> Ha, that's cool, but I also think it would certainly qualify as step
> abuse. Would it make sense to add something like this to p:add-attribute?
> (Sure, I know I can also use a custom step to hide the implementation, but
> anyway.)
>
> Best,
> Denis
>
> > -----Ursprüngliche Nachricht-----
> > Von: Norm Tovey-Walsh <ndw@nwalsh.com>
> > Gesendet: Freitag, 21. März 2025 09:43
> > An: Wendell Piez <wapiez@wendellpiez.com>
> > Cc: Maier, Denis Christian (UB) <denis.maier@unibe.ch>; xproc-dev@w3.org
> > Betreff: Re: Copy atrribute
> >
> > Wendell Piez <wapiez@wendellpiez.com> writes:
> > > On occasion I confess I have used p:label-element to get around this
> -- it
> > accepts an XPath to be evaluated, not just a string.
> >
> > Indeed. I thought about that for 30 seconds and persuaded myself that it
> > couldn't be made to work for this example. Your observation persuaded me
> to
> > think a little longer. It feels a little like "step abuse", but this
> works:
> >
> >   <p:identity>
> >     <p:with-input>
> >       <doc>
> >         <a data-custom-style="spoon"/>
> >         <b data-custom-style="fork"/>
> >       </doc>
> >     </p:with-input>
> >   </p:identity>
> >
> >   <p:label-elements match="*[@data-custom-style]"
> >                     attribute="class"
> >                     label="@data-custom-style"/>
> >
> > producing
> >
> > <doc>
> >    <a data-custom-style="spoon" class="spoon"/>
> >    <b data-custom-style="fork" class="fork"/> </doc>
> >
> >                                         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%7C55c1de727
> > d21482c1fc408dd685456f3%7Cd400387a212f43eaac7f77aa12d7977e%7C
> > 1%7C0%7C638781433647716174%7CUnknown%7CTWFpbGZsb3d8eyJFbX
> > B0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWF
> > pbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=uE5beZZdgSUrWWuYWd
> > E5LBgLEQefmRXMDgV8ag4nIX0%3D&reserved=0
> >
> > > A jester unemployed is nobody's fool.--Danny Kaye
>


-- 
...Wendell Piez... ...wendell -at- nist -dot- gov...
...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org...
...github.com/wendellpiez... ...gitlab.coko.foundation/wendell...

Received on Friday, 21 March 2025 13:03:08 UTC