XSLT参考

<原文路径:http://c.lstc.edu.cn:8090/kj/Manfeel/w3pop/default-5.asp.htm>

一、XSLT元素参考

 来自W3C参考标准所定义(XSLT版本1.0)的XSLT元素。

“元素”列中的链接指出每个特殊元素的属性和更多有用的信息。

  • N: 指出Netscape最早版本的支持标签。
  • IE: 指出最早的支持标签的IE版本。

注意: 在IE5中被支持的元素可能含有非标准的行为(NON-standard behavior),因为IE5在XSLT成为W3C的官方参考标准之前就已经发布了。

Element
元素
Description
描述
IEN
apply-importsApplies a template rule from an imported style sheet
应用输入样式表的模版规则
6.0 
apply-templatesApplies a template rule to the current element or to the current element's child nodes
把模版规则应用到当前元素或当前元素的子元素
5.06.0
attributeAdds an attribute
添加属性
5.06.0
attribute-setDefines a named set of attributes
定义指定属性
6.06.0
call-templateCalls a named template
调用指定模版
6.06.0
chooseUsed in conjunction with <when> and <otherwise> to express multiple conditional tests
通过与<when> 和<otherwise>配合使用来表达多种条件测试
5.06.0
commentCreates a comment node in the result tree
在结果树中创建一个注释节点
5.06.0
copyCreates a copy of the current node (without child nodes and attributes)
复制正确节点(不需要子节点和属性)
5.06.0
copy-ofCreates a copy of the current node (with child nodes and attributes)
复制正确节点(需要子节点和属性)
6.06.0
decimal-formatDefines the characters and symbols to be used when converting numbers into strings, with the format-number() function
定义字符和符号(在通过format-number() 函数,把数字转换成字符的情况下)
6.0 
elementCreates an element node in the output document
在输出文档中创建一个元素节点
5.06.0
fallbackSpecifies an alternate code to run if  the processor does not support an XSLT element
如果处理器不支持XSLT元素,则运行指定的预备代码
6.0 
for-eachLoops through each node in a specified node set
在指定的节点设置中通过每个节点做循环
5.06.0
ifContains a template that will be applied only if a specified condition is true
包含一个只当指定条件为true时才应用的模版
5.06.0
importImports the contents of one style sheet into another. Note: An imported style sheet has lower precedence than the importing style sheet
把一个样式表内容输入到另外一个样式表去。注意:与已输入的样式表相比,正在输入的样式表更具有优先权。
6.06.0
includeIncludes the contents of one style sheet into another. Note: An included style sheet has the same precedence as the including style sheet
把一份样式表的内容嵌到另一份中去 。注意:这两份样式表有相同的优先级。
6.06.0
keyDeclares a named key that can be used in the style sheet with the key() function
通过key() 函数,声明可以用于样式表的指定键
6.06.0
messageWrites a message to the output (used to report errors)
编写信息到输出(用于报告错误)
6.06.0
namespace-aliasReplaces a namespace in the style sheet to a different namespace in the output
在样式表中把命名空间(namespace)替换成一个不同的命名空间输出
6.0 
numberDetermines the integer position of the current node and formats a number
确定当前节点和格式数字的整形位置
6.06.0
otherwiseSpecifies a default action for the <choose> element
指定<choose>元素的错误行为
5.06.0
outputDefines the format of the output document
定义输出文件的格式
6.06.0
paramDeclares a local or global parameter
声明本地或是全球的参数
6.06.0
preserve-spaceDefines the elements for which white space should be preserved
定义储存空白页的元素
6.06.0
processing-instructionWrites a processing instruction to the output
编写输出的处理结构
5.06.0
sortSorts the output
分类输出
6.06.0
strip-spaceDefines the elements for which white space should be removed
定义移除空白页的元素
6.06.0
stylesheetDefines the root element of a style sheet
定义样式表的根元素
5.06.0
templateRules to apply when a specified node is matched
当指定节点匹配时应用的规则
5.06.0
textWrites literal text to the output
编写文字文本到输出
5.06.0
transformDefines the root element of a style sheet
定义样式表的根元素
6.06.0
value-ofExtracts the value of a selected node
摘取选定节点值
5.06.0
variableDeclares a local or global variable
定义本地或全球变量
6.06.0
whenSpecifies an action for the <choose> element
指定<choose>元素的行为
5.06.0
with-paramDefines the value of a parameter to be passed into a template
定义模版内的参数值
6.06.0

二、XSLT函数参考

 XSLT包含了超过100个内置函数。有些是为了字符串值,数字值,数据和时间比较关系,节点和OName操作,序列操作,布尔(逻辑)值,以及更多。
 XQuery 1.0, XPath 2.0, 和XSLT 2.0共享一个函数库。 另外,还有下面的内置XSLT函数:

Name
名称
Description
描述
current()Returns the current node
返回当前节点
document()Used to access the nodes in an external XML document
用来访问一个外部的XML文档内的节点
element-available()Tests whether the element specified is supported by the XSLT processor
测试指定的元素是否被XSLT处理器支持
format-number()Converts a number into a string
将数字转化为字符串
function-available()Tests whether the function specified is supported by the XSLT processor
测试指定的函数是否被XSLT处理器支持
generate-id()Returns a string value that uniquely identifies a specified node
返回一个独立地定义一个指定节点的字符串值
key()Returns a node-set using the index specified by an <xsl:key> element
使用由<xsl:key>元素指定的索引来返回一个节点设置(node-set)
system-property()Returns the value of the system properties
返回系统属性值
unparsed-entity-uri()Returns the URI of an unparsed entity
返回一个未被解析的URI实体

 

转载于:https://www.cnblogs.com/luoxiao/archive/2007/09/03/879312.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值