At last, I've been able to find a solution! Here is the code, featuring a wikify widget to get the text of the transclusion available for buildig the url string.
\whitespace trim \define wcag(ref) <$set name="base" value="https://www.w3.org/WAI/WCAG21/Techniques"> <$set name="codeFam" filter="$ref$ +[splitregexp[\d+]] +[join[]]"> <$wikify name="wcagDir" text="""<$transclude tiddler="$:/user/dict/wcag/ref/cat" index=<<codeFam>> />""" > <$vars url={{{ [<base>] [<wcagDir>] $ref$ +[join[/]] }}} > * ref: $ref$ codeFam: <<codeFam>> * dir: <<wcagDir>> * prot: <<prot>> base: <<base>> * url: <<url>> * link <a href=<<url>> target="w3.org/WAI/">$ref$</a> </$vars> </$wikify> </$set> </$set> \end [image: wcag-macro.png] As you can see in the picture, the link is perfectly OK. Thank you so much to you all for your patience with me! This has not be in vain. Le mercredi 30 septembre 2020 à 01:54:06 UTC+2, Jean-Pierre Rivière a écrit : > Following your post, I tried wikify and terxt widget. I can't get a simple > URL: see the picture. the url stop at the base although the text would be > good (otherwise). There is something I have not done here, but what? > > the macros code: > > \whitespace trim > > \define wcagDir() <$transclude tiddler="$:/user/dict/wcag/ref/cat" > index="$(codeFam)$"/> > > \define wcag(ref) > <$set name="base" value="https://www.w3.org/WAI/WCAG21/Techniques"> > <$set name="codeFam" filter="$ref$ +[splitregexp[\d+]] +[join[]]"> > ref: $ref$ > base: <<base>> > codeFam: <<codeFam>> > dir: <<wcagDir>> > <$set name="url" filter="[<base>] [<wcagDir>] $ref$ +[join[/]]"> > <$wikify name="target" text=<<url>> > > > * wikify only: a href=<<target>> target="w3.org/WAI/" LABEL $ref$ > * wikify then text: a href=<$text text=<<target>>/> target="w3.org/WAI/" > LABEL $ref$ > > </$wikify> > </$set> > </$set> > </$set> > \end > > > > Le mercredi 30 septembre 2020 à 01:27:32 UTC+2, Eric Shulman a écrit : > >> On Tuesday, September 29, 2020 at 3:49:08 PM UTC-7, TW Tones wrote: >>> >>> For example [[title[$ref$]] +join[]] has 2 syntax errors >>> "[title[$ref$]join[]]" but [[$ref$]join[]] if it was logical >>> But what are you joining? so I don't understand it logically. >>> >> >> The syntax in his last post in only part of a larger filter for >> concatenating multiple parts, like this: >> \define makeURL(ref) >> <$vars base="https://www.w3.org/WAI/WCAG21/Techniques/"> >> <$set name="url" filter="[<base>] [<macro1>] [[/]] [<macro2>] [[/$ref$]] >> +[join[]]"> >> <<url>> >> </$set> >> </$vars> >> \end >> <$wikify name="url" text=<<makeURL>> >> ... >> </$wikify> >> >> Note that this could also be written without the makeURL macro or $wikify >> like this: >> <$vars base="https://www.w3.org/WAI/WCAG21/Techniques/"> >> <$vars url={{{ [<base>] [<macro1>] [[/]] [<macro2>] [[/something]] >> +[join[]] }}} >> ... >> </$vars> >> </$vars> >> >> -e >> >> >> -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/068da85e-347e-4a6e-b29f-7542662fbf40n%40googlegroups.com.

