hxt icon indicating copy to clipboard operation
hxt copied to clipboard

XML schema data types in hxt-relaxng don't support constants

Open blamario opened this issue 8 years ago • 1 comments

Take this schema and call it integer.rng:

<grammar xmlns="http://relaxng.org/ns/structure/1.0">
  <start>
    <choice>
      <element name="test1">
        <data type="integer" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
      </element>
      <element name="test2">
        <value type="integer" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">4</value>
      </element>
    </choice>
  </start>
</grammar>

The instance <test1>4</test1> validates perfectly, while equally valid <test2>4</test2> doesn't.

blamario avatar Nov 16 '16 21:11 blamario

The problem appears to be in function datatypeEqualW3C in module DataTypeLibW3C. The data-type map norm in there is either used in a wrong way, or it should map all missing entries to id like it does for string.

blamario avatar Nov 16 '16 21:11 blamario