xsl-list
[Top] [All Lists]

RE: Simple XSLT processor

2003-06-09 11:01:19
[Fatih TURKMEN]

How an XSLT processor, assuming processor is operating
on a DOM tree for stylesheets (that is the style sheet
instructions are on a DOM tree) operates?

Just searches these stylesheet instructions on the DOM
tree(style sheet tree)

Sort of.  The processor creates a tree representing the stylesheet, but
it may not literally be a W3C DOM.  It may be a simplified,
lighter-weight tree instead.

The processor considers the root node of the source xml document.  It
looks to see if it has any templates that apply.  If it does, it applies
the highest priority or best matching one.  If not, it applies the
default template, which gets all the text content.  Usually, that first
template will invoke other templates on other elements.  Processing
continues until there are no more instructions or templates to invoke.

Note that the order of execution is not specified, although of course
the results have to be assembled in the right order at the end.

and according to the
instructions it modifies the result tree ?

It creates the result tree as it goes, but does not modify parts once
they are built.

Lastly, is there a simple XSLT processor that is
useful for understanding the process?


Not sure what you want to know.  Is it coding techniques?  Xalan and
Saxon, among others, have the source available.

Cheers,

Tom P

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>