Marklogic Sc​​hematron变量支持吗?

问题描述

我试图在schematron.sch中使用全局变量,但是当我尝试在Marklogic中验证文档时,出现以下错误

[1.0-ml] XSLT-BADPATTERN:(err:XTSE0340)/ :stylesheet / :template [19]-无效模式:fn:doc(“ / schematron.sch -validator.xsl“)/ :stylesheet / :template [19] / @ match(XDMP-UNEXPECTED:(err:XPST0003)意外的令牌语法错误,意外的Dollar _)

Schematron的Marklogic实现不支持使用变量吗?当我在Oxygen XML Editor中使用相同的schematron.sch文件验证文档时,它可以正常工作。

这是我的schematron.sch文件的示例:

<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:sqf="http://www.schematron-quickfix.com/validator/process"
  schemaVersion="1.0">
  <sch:ns uri="http://www.loc.gov/mods/v3" prefix="mods"/>
  <sch:ns uri="http://digital.library.ptsem.edu/ptsl" prefix="ptsl"/>
  <sch:ns uri="http://www.loc.gov/marc21/slim" prefix="marc"/>
  <sch:ns uri="http://www.w3.org/2001/XMLSchema-instance" prefix="xsi"/>
  <sch:title>Test MODS documents</sch:title>
  <sch:let name="top-level-mods" value="mods:mods[@version='3.7']"/>
  <sch:pattern>
    <sch:rule context="/">
       <sch:assert test="$top-level-mods">Wrong root element.</sch:assert>
    </sch:rule>
    <sch:rule context="$top-level-mods">
       <sch:assert test="@version='3.7'">mods:mods is missing version number</sch:assert>
    </sch:rule>
  </sch:pattern>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...