三可扩展样单语言XSL.docx
- 文档编号:3022171
- 上传时间:2022-11-17
- 格式:DOCX
- 页数:77
- 大小:299.28KB
三可扩展样单语言XSL.docx
《三可扩展样单语言XSL.docx》由会员分享,可在线阅读,更多相关《三可扩展样单语言XSL.docx(77页珍藏版)》请在冰豆网上搜索。
三可扩展样单语言XSL
三、可扩展样单语言XSL
(〇)组成标准及关系
XSL(ExtensibleStylesheetLanguage可扩展样单语言)包括如下两个独立的内部标准:
●XSL-FO(XSL-FormattingObjects,XSL-格式化对象)
⏹1.0REC:
2001.10.15——ExtensibleStylesheetLanguage(XSL)Version1.0,W3CRecommendation15October2001
⏹1.1REC:
2006.12.5——ExtensibleStylesheetLanguage(XSL)Version1.1,W3CRecommendation05December2006
●XSLT(XSLTransformations,XSL变换)
⏹1.0REC:
1999.11.16——XSLTransformations(XSLT)Version1.0,W3CRecommendation16November1999
⏹2.0REC:
2007.1.23——XSLTransformations(XSLT)Version2.0,W3CRecommendation23January2007
⏹2.0第二版PER:
2009.4.21——XMLPathLanguage(XPath)2.0(SecondEdition),W3CProposedEditedRecommendation21April2009
和若干相关标准:
●关联样单与XML文档
⏹REC:
1999.6.29——AssociatingStyleSheetswithXMLdocuments,Version1.0,W3CRecommendation29June1999
●XPath(XMLPathLanguage,XML路径语言)
⏹1.0REC:
1999.11.16——XMLPathLanguage(XPath)Version1.0,W3CRecommendation16November1999
⏹2.0REC:
2007.1.23——XMLPathLanguage(XPath)2.0,W3CRecommendation23January2007
●XQuery与XPath的函数与运算符
⏹1.0REC:
2007.1.23——XQuery1.0andXPath2.0FunctionsandOperators,W3CRecommendation23January2007
⏹1.0第二版PER:
2009.4.21——XQuery1.0andXPath2.0FunctionsandOperators(SecondEdition),W3CProposedEditedRecommendation21April2009
⏹1.1WD:
2009.12.15——XPathandXQueryFunctionsandOperators1.1,W3CWorkingDraft15December2009
●XSLT与XQuery的序列化
⏹REC:
2007.1.23——XSLT2.0andXQuery1.0Serialization,W3CRecommendation23January2007
⏹第二版PER:
2009.4.21——XSLT2.0andXQuery1.0Serialization(SecondEdition),W3CProposedEditedRecommendation21April2009
其中,XPath标准是XSLT的基础,它与XSLT同步开发的,它们当前最新版的推荐标准2.0于2007年1月23日一起公布。
XPath除了主要用于XSLT外,还可以用于XPointer、XLink和XQuery等。
而XQuery原草案中的基础部分,现在已并入到XPath2.0中。
XQuery1.0的推荐标准,也与XPath和XSLT的2.0标准同时公布。
XML文档除了可以利用CSS来展现和显示之外,主要靠XSLT来进行转换和显示:
下面分别介绍XSLT和XSL-FO的最新推荐标准2.0和1.1:
(一)XSLT
XSLT(XSLTransformations,XSL变换/样单转换)是一种将一个XML文档转换为另一个XML文档(包括XHTML文档)的语言。
它是作为XSL的一部分开发的,但也可以独立使用。
例如:
xmlversion=”1.0”?
>
stylesheetversion="2.0" xmlns: xsl="http: //www.w3.org/1999/XSL/Transform" xmlns="http: //www.w3.org/TR/xhtml1/strict"> templatematch="/">
TotalAmount:
value-ofselect="expense-report/total"/>
template>
stylesheet>
或其简化样单模块(SimplifiedStylesheetModule)形式:
version="2.0" xmlns: xsl="http: //www.w3.org/1999/XSL/Transform" xmlns="http: //www.w3.org/1999/xhtml">
TotalAmount:
value-ofselect="expense-report/total"/>