Re: [xsl] Do you use Knuth's algorithms book to solve XML processing problems via XSLT?

Subject: Re: [xsl] Do you use Knuth's algorithms book to solve XML processing problems via XSLT?
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 9 Jul 2021 16:15:44 -0000
> For example, recently I wrote an XSLT program to output information about
each element (name, type, minOccurs, maxOccurs, facets) in all the files of an
XML Schema. My program had to take into consideration complexTypes with
complexContent, complexTypes with simpleContent, complexTypes with sequence,
complexTypes with choice, complexTypes with sequence containing xs:any, etc. I
looked at my finished program and thought, "What is the underlying algorithm?
Is there something that I could have used from Knuth's books?"

I'm sure you wrote a recursive tree-walking algorithm (it's pretty well
unavoidable if you're processing XML with a recursive content model) and I
suspect Knuth covers recursive tree-walking algorithms somewhere, but the
concept is so deeply embedded in the psyche of every programmer, especially an
XSLT programmer, that going back to see what Knuth said about it 50 years ago
isn't going to yield any great enlightenment.

Michael Kay
Saxonica

Current Thread