简体   繁体   English

收到“尚未声明命名空间前缀 'bin'”错误 - Saxon 的 XSL3

[英]Receiving “Namespace prefix 'bin' has not been declared” error - Saxon's XSL3

I tried using the bitwise library on Saxon's XSL3 (-PE), but keep receiving the following error message:我尝试在 Saxon 的 XSL3 (-PE) 上使用按位库,但一直收到以下错误消息:

XPST0081: Namespace prefix 'bin' has not been declared

The line that contains the bin code looks like that:包含 bin 代码的行如下所示:

<xsl:variable name="firstCharPos" select="bin:shift(bin:hex('000001'), 17)"/>

And my stylesheet section looks like that:我的样式表部分如下所示:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:saxon="http://saxon.sf.net/"
    xmlns:mf="http://example.com/mf"
    extension-element-prefixes="saxon"
    exclude-result-prefixes="xs saxon mf"
    version="3.0">

Am I missing something?我错过了什么吗? Should I include the 'bin' library somehow?我应该以某种方式包含“bin”库吗?

Thanks!谢谢!

You need to add the namespace declaration您需要添加命名空间声明

 xmlns:bin="http://expath.org/ns/binary"

You might also want to add "bin" to the list of prefixes in exclude-result-prefixes (or change it to exclude-result-prefixes="#all" ).您可能还想将“bin”添加到 exclude-result-prefixes 的前缀列表中(或将其更改为exclude-result-prefixes="#all" )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM