Subject: RE: [xsl] XSLT processor From: "Michael Kay" <mhk@xxxxxxxxx> Date: Sat, 7 Jun 2003 18:02:50 +0100 |
> > What an XSLT processor do? An XSLT processor converts a source tree to a result tree under the control of a stylesheet. > > Does XSLT processor use XML parser to parse XSL > statements? Yes, the first thing an XSLT processor does is to invoke an XML parser to parse the source stylesheet. There is a little bit of ambiguity in the 1.0 spec about whether the XML parsing is done within the XSLT processor or outside it, but this is an academic detail. Most implementations will allow you to supply the stylesheet in either source XML or parsed form (e.g. as a DOM). > I mean I think there are two scenarios for XSL > statements processing: > 1)XSLT processors have their own parser to parse > statements > 2)They use XML parsers to parse XSL stataments and > then walk on the DOM tree generated by the XML parser > to find the XSL expressions.Process these expressions > and modify this tree according to this statements > > I think the second one is more realistic. > Am I right? If someone can explain what XSLT exactly > does, I would be grateful As far as I know most XSLT processors use an off-the-shelf XML parser to parse both the source documents and the stylesheets, though there have been some attempts at integration, for example Xalan and Xerces have a fairly intimate relationship. > > And lastly, what kind of tree(or any other data > structure) is used by XPath to store XML nodes? This is an internal detail of the design of the processor. For Saxon, the article at http://www-106.ibm.com/developerworks/xml/library/x-xslt2/?dwzone=xml might give you a better understanding of the internals. Michael Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT processor, Oleg Tkachenko | Thread | [xsl] Param in xsl:sort select, Marcus Andersson |
RE: [xsl] Could I set an attribute , Michael Kay | Date | RE: [xsl] XPath, Michael Kay |
Month |