Subject: Re: [xsl] Unix Philosophy Applied to XSLT Development From: "Steven D. Majewski steve.majewski@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sat, 23 Jul 2022 20:13:12 -0000 |
I often run my xslt:transform from XQuery and use the => operator to chain transforms together. This also only parses and serializes only at the start and end of the process. Also, I probably structure my XQuery code with more small functions. I know you can write functions in XSLT, but the XQuery syntax just leads me to organize things by function rather than template. Also, XQuery feels (to me) more like a scripting language where you can interactively try things out, where XSLT feels like it requires more up-front thinking and analysis. I would also add the push style programming with templates in XSLT, already provides a different method of separation of concerns, in that each template may only do one simple thing - the complex part is handled my the dispatcher doing the pattern matching. However, Ibm not sure that the way to structure templates to make the easily extensible comes easily b or at least, doing so isnbt (in my experience) how itbs taught or commonly done. Ibm thinking of things like using apply-imports to allow customizations of templates by adding another module import. b Steve M. > On Jul 23, 2022, at 11:17 AM, Norm Tovey-Walsh ndw@xxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > >> To recap: Identify general tools. Implement the tools. Use the tools >> to solve many problems, not just one specific problem. Arrange the >> tools in any order. > > Therebs a certain elegant simplicity to running everything through pipes > on the Unix command line, but be aware that youbre serializing at the > end of each step and parsing again at the beginning of each step. > > This can be expensive and may involve loss of information (schema types, > for example, from a validated instance in the first step wonbt be > preserved in the second unless you re-validate after re-parsing). > > What you want is an XProc pipeline :-) > > Be seeing you, > norm > > -- > Norman Tovey-Walsh <ndw@xxxxxxxxxx> > https://nwalsh.com/ > >> It is as easy for the strong man to be strong, as it is for the weak to >> be weak.--Emerson
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Unix Philosophy Applied t, Michael Kay mike@xxx | Thread | [xsl] replacing <!DOCTYPE> with <?x, Chris Papademetrious |
Re: [xsl] Unix Philosophy Applied t, Michael Kay mike@xxx | Date | Re: [xsl] Grouping help, Imsieke, Gerrit, le- |
Month |