Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/104.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
Ios libxslt:编译错误_Ios_Libxslt - Fatal编程技术网

Ios libxslt:编译错误

Ios libxslt:编译错误,ios,libxslt,Ios,Libxslt,我在iOS上使用libxslt,并且从应该是简单的xslt中得到编译错误,例如: compilation error: file /Users/yada/Library/Developer/CoreSimulator/Devices/ACE15E20-3230-4966-ACDE-DCADABF48B32/data/Containers/Bundle/Application/A4EC9B34-3A96-42E0-B58F-6EB44C942874/appname.app/upconversion

我在iOS上使用libxslt,并且从应该是简单的xslt中得到编译错误,例如:

compilation error: file /Users/yada/Library/Developer/CoreSimulator/Devices/ACE15E20-3230-4966-ACDE-DCADABF48B32/data/Containers/Bundle/Application/A4EC9B34-3A96-42E0-B58F-6EB44C942874/appname.app/upconversion-options.xsl line 19 element function
xsltStylePreCompute: unknown xsl:function
compilation error: file /Users/yada/Library/Developer/CoreSimulator/Devices/ACE15E20-3230-4966-ACDE-DCADABF48B32/data/Containers/Bundle/Application/A4EC9B34-3A96-42E0-B58F-6EB44C942874/appname.app/upconversion-options.xsl line 20 element param
element param only allowed within a template, variable or param
。。。当我这样做的时候,更多的是这样的:

xmlSubstituteEntitiesDefault(1);
xmlLoadExtDtdDefaultValue = 1;

NSString * pMathMLTocMathMLXSLPath = [[NSBundle mainBundle] pathForResource:@"upconversion-options" ofType:@"xsl"];
xsltStylesheetPtr pMathMLTocMathMLXSLStyleSheet = xsltParseStylesheetFile((const xmlChar *)[pMathMLTocMathMLXSLPath cStringUsingEncoding:NSUTF8StringEncoding]);
xsl文件如下所示:

<xsl:stylesheet version="2.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:s="http://www.ph.ed.ac.uk/snuggletex"
  xmlns="http://www.w3.org/1998/Math/MathML"
  exclude-result-prefixes="xs s"
  xpath-default-namespace="http://www.w3.org/1998/Math/MathML">

  <xsl:function name="s:get-boolean-option" as="xs:boolean">
    <xsl:param name="upconversion-options" as="element(s:upconversion-options)"/>
    <xsl:param name="name" as="xs:string"/>
    <xsl:sequence select="boolean($upconversion-options/s:option[@name=$name]/@value='true')"/>
  </xsl:function>

  <xsl:function name="s:get-upconversion-option" as="xs:string?">
    <xsl:param name="upconversion-options" as="element(s:upconversion-options)"/>
    <xsl:param name="name" as="xs:string"/>
    <xsl:sequence select="$upconversion-options/s:option[@name=$name]/@value"/>
  </xsl:function>

  <xsl:function name="s:get-symbol-assumption" as="element(s:symbol)?">
    <xsl:param name="element" as="element()"/>
    <xsl:param name="upconversion-options" as="element(s:upconversion-options)"/>
    <xsl:sequence select="$upconversion-options/s:symbol[deep-equal(*, $element)]"/>
  </xsl:function>

  <xsl:function name="s:is-assumed-symbol" as="xs:boolean">
    <xsl:param name="element" as="element()"/>
    <xsl:param name="upconversion-options" as="element(s:upconversion-options)"/>
    <xsl:param name="assume" as="xs:string"/>
    <xsl:sequence select="exists($upconversion-options/s:symbol[@assume=$assume and deep-equal($element, *)])"/>
  </xsl:function>

  <xsl:function name="s:is-assumed-function" as="xs:boolean">
    <xsl:param name="element" as="element()"/>
    <xsl:param name="upconversion-options" as="element(s:upconversion-options)"/>
    <xsl:sequence select="s:is-assumed-symbol($element, $upconversion-options, 'function')"/>
  </xsl:function>

</xsl:stylesheet>


有什么建议吗?

libxslt不支持XSLT2.0。您要么需要使用尚未离开测试版的版本,要么返回XSLT1.0。如果您恢复到1.0并需要额外的功能,请查看EXSLT