XSLT专业站 - 提供xslt和xml相关的资料书籍和教程  
XSLT专业站 - 提供xslt和xml相关的资料书籍和教程
网站地图  收藏本站
首页 | 热门文章 | 精彩实例 | 经典教程 | XSLT语法详解 | 资料下载 | 休闲天地 | 交流论坛
  当前位置:首页>热门文章>XSL>文章内容
XSL 函数介绍(3)
来源:XSLT.org.cn 作者:XSLT专业站 发布时间:2007-08-04  
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 下一页
上一篇:XSL 函数介绍(2)   下一篇:XSL 函数介绍(4)
  XSL热点文章
·XSL 函数介绍(1)
·XSL 样式表和特定于处理器的特性
·根据 XML 内容设置 XSL 样式表
·XSL 函数介绍(2)
·XSL 函数介绍(4)
  XSL相关文章
·XSL 函数介绍(2)
·XSL 函数介绍(4)
·XSL 函数介绍(1)
·根据 XML 内容设置 XSL 样式表
·XSL 样式表和特定于处理器的特性
Copyright© 2007 xslt.org.cn All rights reserved.