title: What engine does MarkLogic use to validate XML documents against an XML Schema version 1.1?
body: <p>I have been asked to look into using version 1.1 XML Schemas in a MarkLogic environment to fold the Schematron asserts into the XML Schema.</p>
  
  <p>One thing that XSD 1.1 does not specify is the use of custom error messages as they are in Schematron files.</p>
  
  <p>I have found that both Saxonica and Xerces have extensions to address that issue.</p>
  
  <p>Here is how <a href="http://saxonica.com/documentation/index.html#!schema-processing/extensions11/saxon.message" rel="nofollow noreferrer">Saxonica</a> deals with the issue:</p>
  
  <pre><code>&lt;xs:element name="date"&gt;
    &lt;xs:simpleType&gt;
       &lt;xs:restriction base="xs:date" xmlns:saxon="http://saxon.sf.net/"&gt;
         &lt;xs:assertion test=". lt current-date()"
                    saxon:message="The date must not be in the future"/&gt;
         &lt;xs:pattern value="[^Z:]*" 
                    saxon:message="The date must not have a timezone"/&gt;
       &lt;/xs:restriction&gt;   
    &lt;/xs:simpleType&gt;
  &lt;/xs:element&gt;
  </code></pre>
  
  <p>Here is how <a href="https://mukulgandhi.blogspot.com/2010/04/xsd-11-xsprecisiondecimal-assertions.html" rel="nofollow noreferrer">Xerces</a> deals with the issue:</p>
  
  <pre><code>  &lt;xs:simpleType name="myPrecisionDecimal"&gt;
      &lt;xs:restriction base="xs:decimal" xmlns:xerces="http://xerces.apache.org"&gt;
         &lt;xs:totalDigits value="6" /&gt;
         &lt;xs:fractionDigits value="4" /&gt;
         &lt;xs:assertion test="string-length(substring-after(string($value), '.')) ge 2" 
                xerces:message="minScale of this decimal number should be 2" /&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;
  </code></pre>
  
  <p>Also: Do either of these extensions handle anything like the <code>&lt;sch:name/&gt;</code> or <code>&lt;sch:value-of/&gt;</code> tags in the Schematron <a href="http://www.datypic.com/sc/schematron/e-sch_assert.html" rel="nofollow noreferrer">assert</a> tag <code>&lt;sch:assert test="..."/&gt;</code>?</p>