Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在icecast服务器的xslt实现中检测node-set()函数的可用性_Xslt_Node Set - Fatal编程技术网

在icecast服务器的xslt实现中检测node-set()函数的可用性

在icecast服务器的xslt实现中检测node-set()函数的可用性,xslt,node-set,Xslt,Node Set,Icecast包含一个基于from的XSLT实现 我想知道它是否支持该功能,最好是以同样适用于其他纯web环境的方式: 遗憾的是,icecast中的XSLT处理器只能通过web访问 icecast进程的接口(因此命令行上没有)。 更糟糕的是:XSLT错误的日志记录有限(当您这样做时) 事情不对劲,冰铸过程往往只是死亡) 我正在运行icecast 2.3.2,因为它是(有),它的libxslt.dll日期是2008年。DLL中没有版本号,我能提供的最好的版本号是(请参阅底部的XSLT代码): 我尝

Icecast包含一个基于from的XSLT实现

我想知道它是否支持该功能,最好是以同样适用于其他纯web环境的方式:

遗憾的是,icecast中的XSLT处理器只能通过web访问 icecast进程的接口(因此命令行上没有)。 更糟糕的是:XSLT错误的日志记录有限(当您这样做时) 事情不对劲,冰铸过程往往只是死亡)

我正在运行icecast 2.3.2,因为它是(有),它的libxslt.dll日期是2008年。DLL中没有版本号,我能提供的最好的版本号是(请参阅底部的XSLT代码):

我尝试运行“”所指的文章中提到的节点集检测

从输出来看,我认为这是失败的:

icemaster@localhost972990localhost00EarthIcecast 2.3.2Sun, 23 Jun 2013 20:02:19 W. Europe Daylight Time202200ice-samplerate=44100;ice-bitrate=64;ice-channels=264StationGenre6424410000http://localhost:8000.....
通过web界面中的XSL文件查找的最佳方法是什么

版本脚本:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
  <xsl:output method="text" encoding="UTF-8" />
  <xsl:template match="/">
Version:    <xsl:value-of select="system-property('xsl:version')" />
Vendor:     <xsl:value-of select="system-property('xsl:vendor')" />
Vendor URL: <xsl:value-of select="system-property('xsl:vendor-url')" />
  </xsl:template>
</xsl:stylesheet>

版本:
小贩:
供应商URL:
我尝试的节点集脚本:

<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:exslt="http://exslt.org/common"
  xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  exclude-result-prefixes="exslt msxsl">

<xsl:output
  omit-xml-declaration="no"
  method="html"
  indent="yes"
  encoding="UTF-8" />

<msxsl:script language="JScript" implements-prefix="exslt">
 this['node-set'] =  function (x) {
  return x;
  }
</msxsl:script>

<xsl:variable name="x">
  <y/>
</xsl:variable>

<xsl:template match="x">
  <html>
    <head><title>test exslt node set</title></head>
    <body>
      <xsl:apply-templates select="exslt:node-set($x)/*"/>
    </body>
  </html>
</xsl:template>

<xsl:template match="y">
  <p>node set!</p>
</xsl:template>

</xsl:stylesheet>

此['node-set']=函数(x){
返回x;
}
测试exslt节点集
节点集


简短回答

在icecast中支持此功能。
在下面,它由 功能

一般答案

我创建了一个解决方案,基于使用

请评论这是否是正确的方法

CSTUG代码处理这些node-set()函数:

  • exslt:node-set()
  • msxml:node-set()
  • xalanc:nodeset()
我还添加了对这些的支持:

  • xt:node-set()
  • saxon6:node-set()
icecast的输出:

Version:    1.0
Vendor:     libxslt
Vendor URL: http://xmlsoft.org/XSLT/
node-set(): xt:node-set()
使用的XSLT:

<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:exslt="http://exslt.org/common"
  xmlns:msxml="urn:schemas-microsoft-com:xslt"
  xmlns:xalanc="http://xml.apache.org/xalanc"
  xmlns:xt="http://www.jclark.com/xt"
  xmlns:saxon6="http://icl.com/saxon"
  extension-element-prefixes="exslt msxml xalanc xt saxon6"
  exclude-result-prefixes="exslt msxml xalanc xt saxon6"
  >

  <xsl:output method="text" encoding="UTF-8" />
  <xsl:template match="/">
    <xsl:text>
Version:    </xsl:text>
    <xsl:value-of select="system-property('xsl:version')" />
    <xsl:text>
Vendor:     </xsl:text>
    <xsl:value-of select="system-property('xsl:vendor')" />
    <xsl:text>
Vendor URL: </xsl:text>
    <xsl:value-of select="system-property('xsl:vendor-url')" />
<!--
Prefixes used for node-set()
exslt: EXSLT aware processors (Saxon, xsltproc, Xalan-J, jd.xslt, 4XSLT)
msxml: MSXML
xalanc: Xalan-C, Xalan-J 2.6.x
xt: XT, libxslt
saxon6: Saxon 6
-->
    <xsl:text>
node-set(): </xsl:text>
    <xsl:choose>
      <xsl:when test="function-available('exslt:node-set')">
        <xsl:text>exslt:node-set()</xsl:text>
      </xsl:when>
      <xsl:when test="function-available('msxml:node-set')">
        <xsl:text>msxml:node-set()</xsl:text>
      </xsl:when>
      <xsl:when test="function-available('xalanc:nodeset')">
        <xsl:text>xalanc:nodeset()</xsl:text>
      </xsl:when>
      <xsl:when test="function-available('xt:node-set')">
        <xsl:text>xt:node-set()</xsl:text>
      </xsl:when>
      <xsl:when test="function-available('saxon6:node-set')">
        <xsl:text>saxon6:node-set()</xsl:text>
      </xsl:when>
      <xsl:otherwise>
        <xsl:text>EXSLT:node-set not found!</xsl:text>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
</xsl:stylesheet>

版本:
小贩:
供应商URL:
node-set():
exslt:node-set()
msxml:node-set()
xalanc:nodeset()
xt:node-set()
saxon6:node-set()
EXSLT:未找到节点集!

如果是XSLT 3,您可以选择:
<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:exslt="http://exslt.org/common"
  xmlns:msxml="urn:schemas-microsoft-com:xslt"
  xmlns:xalanc="http://xml.apache.org/xalanc"
  xmlns:xt="http://www.jclark.com/xt"
  xmlns:saxon6="http://icl.com/saxon"
  extension-element-prefixes="exslt msxml xalanc xt saxon6"
  exclude-result-prefixes="exslt msxml xalanc xt saxon6"
  >

  <xsl:output method="text" encoding="UTF-8" />
  <xsl:template match="/">
    <xsl:text>
Version:    </xsl:text>
    <xsl:value-of select="system-property('xsl:version')" />
    <xsl:text>
Vendor:     </xsl:text>
    <xsl:value-of select="system-property('xsl:vendor')" />
    <xsl:text>
Vendor URL: </xsl:text>
    <xsl:value-of select="system-property('xsl:vendor-url')" />
<!--
Prefixes used for node-set()
exslt: EXSLT aware processors (Saxon, xsltproc, Xalan-J, jd.xslt, 4XSLT)
msxml: MSXML
xalanc: Xalan-C, Xalan-J 2.6.x
xt: XT, libxslt
saxon6: Saxon 6
-->
    <xsl:text>
node-set(): </xsl:text>
    <xsl:choose>
      <xsl:when test="function-available('exslt:node-set')">
        <xsl:text>exslt:node-set()</xsl:text>
      </xsl:when>
      <xsl:when test="function-available('msxml:node-set')">
        <xsl:text>msxml:node-set()</xsl:text>
      </xsl:when>
      <xsl:when test="function-available('xalanc:nodeset')">
        <xsl:text>xalanc:nodeset()</xsl:text>
      </xsl:when>
      <xsl:when test="function-available('xt:node-set')">
        <xsl:text>xt:node-set()</xsl:text>
      </xsl:when>
      <xsl:when test="function-available('saxon6:node-set')">
        <xsl:text>saxon6:node-set()</xsl:text>
      </xsl:when>
      <xsl:otherwise>
        <xsl:text>EXSLT:node-set not found!</xsl:text>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
</xsl:stylesheet>