Subject: Re: [xsl] How do you avoid relearning the same coding technique over and over? From: "Dave Pawson dave.pawson@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 6 Feb 2025 18:24:57 -0000 |
I wonder how we might mix (XML) metadata | documentation with the XSLT of a stylesheet. Now has that been done before? ;-) regards On Thu, 6 Feb 2025 at 18:16, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > On Thu, 2025-02-06 at 12:19 +0000, Roger L Costello costello@xxxxxxxxx > wrote: > > > > What's the solution? Discipline? No matter how much I'm in a hurry, > > stop and create an example. Is that the solution? > > Well, > > locate .xsl | grep $HOME | xargs grel -l expath > > will go a long way for me (Linux). Or, > find . -name "*.xsl*" -print0 | xargs -0 grep -l expath > if there might be spaces in filenames. > > Often, though, i remember a particular occasion, a particular > transformation. If not, i go looking at the spec. If i canbt puzzle it > out from the spec i go looking for examples. > > Asking an unreliable source such as chatgpt can be worse than a waste > of time, as it might plant ideas that lead to wrong underlying > assumptions that can be difficult to work past. > > As Wendell out-pointed, you have to think about the bigger picture. An > example will just show you how to do one thing but not tell you the > best approach. > > For example, if youbre using saxon, you can use collection() or uri- > collection() with try/catch to run XSLT over every file in a directory, > optionally recursively descending into subdirs (nested folders), and > not falling over if therebs malformed XML in there. In that case you > can use the doc() function. > > Debbie Lapeyre and i once watched the late Michael Sperberg-McQueen > writing in a notepad. Asked what he was doing, he said he was working > on a list of things to think about. > > Problem solving is a case of working out the right questions to think > about. > > liam > > > -- > Liam Quin, https://www.delightfulcomputing.com/ > Available for XML/Document/Information Architecture/XSLT/ > XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. > Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org > > > -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] How do you avoid relearni, Liam R. E. Quin liam | Thread | Re: [xsl] How do you avoid relearni, Paul Tyson phtyson@x |
Re: [xsl] How do you avoid relearni, Liam R. E. Quin liam | Date | Re: [xsl] How do you avoid relearni, Bridger Dyson-Smith |
Month |