MarkLogic使用什么引擎根据XML模式版本1.1验证XML文档?

MarkLogic使用什么引擎根据XML模式版本1.1验证XML文档?,marklogic,saxon,xerces,schematron,xsd-1.1,Marklogic,Saxon,Xerces,Schematron,Xsd 1.1,我被要求研究在MarkLogic环境中使用1.1版XML模式将Schematron断言折叠到XML模式中 XSD1.1没有指定的一件事是使用Schematron文件中的自定义错误消息 我发现Saxonica和Xerces都有扩展来解决这个问题 以下是如何处理这个问题: <xs:element name="date"> <xs:simpleType> <xs:restriction base="xs:date" xmlns:saxon="http://s

我被要求研究在MarkLogic环境中使用1.1版XML模式将Schematron断言折叠到XML模式中

XSD1.1没有指定的一件事是使用Schematron文件中的自定义错误消息

我发现Saxonica和Xerces都有扩展来解决这个问题

以下是如何处理这个问题:

<xs:element name="date">
  <xs:simpleType>
     <xs:restriction base="xs:date" xmlns:saxon="http://saxon.sf.net/">
       <xs:assertion test=". lt current-date()"
                  saxon:message="The date must not be in the future"/>
       <xs:pattern value="[^Z:]*" 
                  saxon:message="The date must not have a timezone"/>
     </xs:restriction>   
  </xs:simpleType>
</xs:element>
  <xs:simpleType name="myPrecisionDecimal">
    <xs:restriction base="xs:decimal" xmlns:xerces="http://xerces.apache.org">
       <xs:totalDigits value="6" />
       <xs:fractionDigits value="4" />
       <xs:assertion test="string-length(substring-after(string($value), '.')) ge 2" 
              xerces:message="minScale of this decimal number should be 2" />
    </xs:restriction>
  </xs:simpleType>

以下是如何处理这个问题:

<xs:element name="date">
  <xs:simpleType>
     <xs:restriction base="xs:date" xmlns:saxon="http://saxon.sf.net/">
       <xs:assertion test=". lt current-date()"
                  saxon:message="The date must not be in the future"/>
       <xs:pattern value="[^Z:]*" 
                  saxon:message="The date must not have a timezone"/>
     </xs:restriction>   
  </xs:simpleType>
</xs:element>
  <xs:simpleType name="myPrecisionDecimal">
    <xs:restriction base="xs:decimal" xmlns:xerces="http://xerces.apache.org">
       <xs:totalDigits value="6" />
       <xs:fractionDigits value="4" />
       <xs:assertion test="string-length(substring-after(string($value), '.')) ge 2" 
              xerces:message="minScale of this decimal number should be 2" />
    </xs:restriction>
  </xs:simpleType>


另外:这些扩展是否处理Schematron标记中的
标记?

关于Saxon,无法参数化消息。但是,您可以要求Saxon生成一个XML格式的报告,其中包含关于无效性的所有信息以及关于它们出现位置的上下文信息,并且您可以对该报告运行转换,以将信息组装成您喜欢的任何形式(例如,包括一个交互式格式副本,该格式副本显示带有红线批注的无效元素的源文档).

MarkLogic使用自己的引擎验证XML模式,IIRC它只支持1.0版,不支持1.1版。我不知道有任何特定于实现的扩展。它位于saxon参考资料下载中名为validation-reports.xsd的文件中,可从