Print

Print


I have found the following to be an excellent description of the XSLT
processing model:

Chapter 2: The XSLT Processing Model in XSLT: Programmer's Reference, 2nd
Edition by Michael Kay

Daniel

At 06:37 PM 4/17/2005, Fox, Michael wrote:
>That is my understanding of the inner workings of XSLT.
>
>It utilizes a parser, the W3 DOM model or a SAX-compliant one that
>converts the XML instance into a tree structure. Elements, attributes,
>etc. are all nodes on that tree, ones that XSL can navigate, select, and
>perform complex operations upon.  As XSLT processes through the templates
>in a stylesheet, various nodes in the xML instance are accessed and
>transformed and an output tree is built in memory.  When the templates in
>the stylesheet have all been processed, the result tree is serialized as
>output in whatever form the stylesheet specifies.
>
>Michael
>
>
>-----Original Message-----
>From: Encoded Archival Description List on behalf of MicheleR
>Sent: Sun 4/17/2005 12:18 PM
>To: [log in to unmask]
>Subject: Re: I/O flow with XSLT
>
> > You put your finger exactly on the difference in the last paragraph.
> > XSLT is not a sequential processing language.  It proceeds through
> > the templates rather than the document, processing those parts of the
> > document that relate to each template, and then putting the whole
> > thing together at the end.  It is the templates that are "processed" not
> > the document.
>
>Thanks, Michael, this was just the info I was looking for.  Am I right in
>thinking then that the first thing XSLT does it read in the entire XML
>instance and store it in memory?  And that it then works through the
>templates as laid out in the style sheet, picking elements off the
>memory-resident document tree as needed?  In other words, no matter which
>template is being processed, the transformation has access to the entire XML
>instance at all times?
>
>This is pretty slick.
>
>Thanks --
>
>Michele

Daniel V. Pitti, Associate Director
Institute for Advanced Technology in the Humanities
319 Alderman Library
P.O. Box 400115
University of Virginia
Charlottesville, Virginia 22911-4115
434 924-6594
fax 434 982-2363