Subject: Re: [xsl] How do you avoid relearning the same coding technique over and over? From: "Paul Tyson phtyson@xxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 6 Feb 2025 18:55:19 -0000 |
On Feb 6, 2025, at 12:25, Dave Pawson dave.pawson@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: o;?I wonder how we might mix (XML) metadata | documentationwith the XSLT of a stylesheet. Now has that been done before? ;-) Dunno, but I would write GRDDL transform to put everything of interest from xsl stylesheets into RDF, and query with SPARQL. Best,bPaul regards On Thu, 6 Feb 2025 at 18:16, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx <xsl-list-service@lists. mulberrytech.com> 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. XSL-List info and archiveEasyUnsubscribe (by email) XSL-List info and archiveEasyUnsubscribe (by email)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] How do you avoid relearni, Dave Pawson dave.paw | Thread | Re: [xsl] How do you avoid relearni, Bridger Dyson-Smith |
Re: [xsl] How do you avoid relearni, Dimitre Novatchev dn | Date | [xsl] [ADVERT] Saxonica is 21 and w, Michael Kay mike@xxx |
Month |