码迷,mamicode.com
首页 > 其他好文 > 详细

XSLT工作原理

时间:2014-07-11 23:06:54      阅读:504      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   width   2014   art   

1、XSL processing flow

bubuko.com,布布扣

An XML document and an XSL stylesheet are input to the XSL processor. Let‘s look at the steps in Figure 1 in more detail:

  1. Match template patterns. As the XML document content is accessed (element by element), the match attribute for each template rule is compared against that portion (element and its children) of the XML document. The XSL processor accesses the XML document from top to bottom, so the matching process is sequential.
  2. Determine correct template. The XSL processor selects a template rule pattern that matches the XML document. The pattern for a match attribute can be very concise, specifying the path to a particular element or a particular attribute, or more general, allowing matches to any occurrence of an element or attribute within the XML document regardless of its parentage. The determination process takes these factors into account.
  3. Create results for output. The XSL processor deals with the template rule. Depending upon the rule body data, the literal data, XML document content, or both may be put into the output stream or other actions can take place. A result tree is created containing the results of the rule processing. As each rule is processed, information may be added to the results tree.
  4. Any more templates? After checking other templates that need to be processed, the XSL processor continues processing or outputs the results tree and ends the execution.

2、微软MSXML解析器的工作机制:

 

bubuko.com,布布扣

 

3、Diagram of the basic elements and process flow of Extensible Stylesheet Language Transformations.

bubuko.com,布布扣

XSLT工作原理,布布扣,bubuko.com

XSLT工作原理

标签:style   blog   http   width   2014   art   

原文地址:http://www.cnblogs.com/ghpaas/p/3832993.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!