XSL 函数介绍(3)
示例:与当前结点同名的元素在其父元素内的个数
childNumber(this.selectNodes("../"+this.nodeName+"[end()]").item(0))
当前元素内名字为“skill”的元素的个数
childNumber(this.selectNodes("skill[end()]").item(0))
二十、selectSingleNode
含义:与selectNodes类似,不同的只返回匹配的第一个结点、而不是结点集合
语法:pNode.selectSingleNode("pattern")
示例:与当前结点同名的元素在其父元素内的个数
childNumber(this.selectSingleNode("../"+this.nodeName+"[end()]"))
当前元素内名字为“skill”的元素的个数
childNumber(this.selectSingleNode("skill[end()]"))
二十一、text
含义:返回结点与它的子树内的文字内容
语法:pNode.text
示例:整个文档内的文字内容
this.ownerDocument.text
当前元素及其子树的文字内容
this.text
二十二、xml
含义:返回结点及其后代的XML表示
语法:pNode.xml
示例:当前文档的XML内容
this.ownerDocument.xml
另有几个函数不作介绍,列于其下以供参考,如感兴趣,请访问http://msdn.microsoft.com获取详细说明。
formatTime(varTime, bstrFormat,varDestLocale)
formatDate(varDate, bstrFormat,varDestLocale)
apendChild(newChild)
definition
CloneNode
insertBefore(newChild, refChild)
parsed
removeChild(oldChild)
replaceChild(newChild, oldChild)
specified
transformNode(stylesheet)
transformNodeToObject(stylesheet,outputObject)
uniqueID(pNode)
标题: XSL 函数介绍(3)
关键字:函数 元素 语法 value 示例
共2页: 上一页 [1] 2 下一页
|