当前位置: 首页 > 网络学院 > XML相关教程 > XSL/XSLT > XSLT 介绍
XSLT is a language for transforming XML documents into XHTML documents or to other XML documents.
XSLT是一种把XML文件转换成XHTML文档或者其他的XML文档的语言。
XPath is a language for navigating in XML documents.
XPath是一种用于导航XML文档的语言。
Before you continue you should have a basic understanding of the following:
如果你想继续下面的学习,你必须得掌握下面这些基本知识。
If you want to study these subjects first, find the tutorials on our Home page.
如果你想学习上述语言,可以在网络学院找到这些教程.
XSLT is the most important part of XSL.
XSLT是XSL的最重要的一部分。
XSLT is used to transform an XML document into another XML document, or another type of document that is recognized by a browser, like HTML and XHTML. Normally XSLT does this by transforming each XML element into an (X)HTML element.
XSLT用于把XML文档转换成其它的XML文件,或者转换成另一种能被浏览器所识别的诸如HTML和XHTML类型的文档。通常情况下,XSLT是通过把每个XML元素转换成一个(X)HTML元素来完成的。
With XSLT you can add/remove elements and attributes to or from the output file. You can also rearrange and sort elements, perform tests and make decisions about which elements to hide and display, and a lot more.
通过XSLT,你可以在已输出的文件里添加或删除元素和属性。你也可以把元素重新进行排列和分类,执行测试语句,决定是否隐藏元素,或者实现其它更多的功能。
A common way to describe the transformation process is to say that XSLT transforms an XML source-tree into an XML result-tree.
我们通常这样来描述转换过程:XSLT把XML树形结构源文件换成XML树形结果。
XSLT uses XPath to find information in an XML document. XPath is used to navigate through elements and attributes in XML documents.
XSLT使用XPath查找XML文档中的信息。XPath用于对XML文件中的元素和属性进行定位或导航。
If you want to study XPath first, please read our XPath Tutorial.
如果你想先学习XPath的相关知识,请先阅读我们的XPath教程.
In the transformation process, XSLT uses XPath to define parts of the source document that should match one or more predefined templates. When a match is found, XSLT will transform the matching part of the source document into the result document.
在转换过程当中,XSLT使用XPath来定义源文档的某些部分,而这些源文档必须与一个或多个预定义的模版相匹配。当其中一个所匹配的源文件被找到以后,XSLT将会把这个源文件中相匹配的部分转换到结果文档中。
XSLT became a W3C Recommendation 16. November 1999.
XSLT在1999年11月16日成为W3C推荐的标准。