[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] SaxonProcessorVsParser


Subject: RE: [xsl] SaxonProcessorVsParser
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 17 Aug 2004 23:47:16 +0100

> I need to clear the diferrence between an xml parser and an xslt
> processor.I mean
> doesn't an xslt processor ought to have parsing capabilities 
> as well in
> order to first parse
> the input document and used xslt document into trees and then apply
> templates producing the final tree?
> In this case we are talking about the same software (parser 
> and processor),
> meaning that
> a processor has to be a parser as well.Is this true?

An "XSLT processor", as defined in the specs, starts with a tree
representation of the source document, which is the output of the "XML
processor" (which is usually referred to as an XML parser).

In practice most products that include an XSLT processor either bundle an
XML parser with the product, or invoke the XML parser provided by the
platform.

> Among the core services MSXML 4.0 provided was developer 
> support for DOM,
> SAX and XSLT1.
> I mean as far as i can understand the MSXML environment incorporated a
> parser and an xslt
> processor as well.

Correct.

> Does the same thing stand for saxon?I might sound naive with 
> this question,
> but i need to clear
> it out.I ' ve used saxon succesfully for my transformations 
> and my question
> only has theoretical
> interest.Does saxon use DOM API to parse the input documents 
> into trees and
> then carries out
> with the rest of the transformation procedure to the final 
> serialization of
> the output tree
> into the output xml?
> 

Saxon accepts input from the SAX stream or DOM tree produced by an XML
parser; alternatively if you give it a raw XML document it will invoke the
XML parser of your choice to parse the XML. But the XML parser is not part
of the Saxon product.

Michael Kay


Current Thread
Keywords