<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi David,</p>
<p>Oxygen uses the Jing parser to validate XML documents with
RNG/RNC schemas so we present the messages as they are given by
the parser.</p>
<p>I added an issue on the parser's GitHub issues list:<br>
</p>
<p><a class="moz-txt-link-freetext" href="https://github.com/relaxng/jing-trang/issues/268">https://github.com/relaxng/jing-trang/issues/268</a></p>
<p>If you want you can provide more details on it, for example if
you have an idea about how the error message should be rephrased.<br>
</p>
<p>Regards,</p>
<p>Radu</p>
<pre class="moz-signature" cols="72">Radu Coravu
Oxygen XML Editor</pre>
<div class="moz-cite-prefix">On 9/18/22 19:38, David Birnbaum wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAP4v81qE-s0aZ+xSYmNh0-DWxvPzjPxEuKVddraSin8L7zs6fA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Dear <a href="mailto:oxygen-user@oxygenxml.com"
moz-do-not-send="true" class="moz-txt-link-freetext">oxygen-user@oxygenxml.com</a>,
<div><br>
</div>
<div>I have a question about the error messages <oXygen/>
reports when validating a Relax NG rule that types an item as
xsd:integer. My test XML is:<br>
<br>
</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><?xml version="1.0" encoding="UTF-8"?></div>
<div><?xml-model href="n.rnc"
type="application/relax-ng-compact-syntax"?></div>
<div><stuff>1</stuff></div>
</blockquote>
<div><br>
</div>
<div>and my test Relax NG is:</div>
<div><br>
</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div>start = stuff</div>
<div>stuff = element stuff { xsd:integer {minInclusive = "1"
maxInclusive = "1"} }</div>
</blockquote>
<div><br>
</div>
<div>As I expected, both "1" and "01" pass validation. Initially
I (erroneously) expected "1.0" to pass because I thought
validation cared only about the value space, and not the
lexical space, and it didn't because I had misunderstood how
integer was defined. Section 3.3.13 integer of <a
href="https://www.w3.org/TR/xmlschema-2/"
moz-do-not-send="true" class="moz-txt-link-freetext">https://www.w3.org/TR/xmlschema-2/</a>
plainly says "disallowing the trailing decimal point", a
limitation of the lexical space that automatically disallows
the trailing zero.</div>
<div><br>
</div>
<div>I am, though, puzzled by the error message that
<oXygen/> displays for "1.0", which reads:</div>
<div><br>
</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div>character content of element "stuff" invalid; must be a
decimal number without any significant digits after the
decimal point</div>
</blockquote>
<div><br>
</div>
<div>I think that the wording of the error message suggests that
"1." should pass, since the message seems to implies that the
decimal point is fine, and the mistake was putting a zero
after it. Yet validating "1." raises:</div>
<div><br>
</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div>character content of element "stuff" invalid; must be an
integer</div>
</blockquote>
<div><br>
</div>
<div>This is consistent with the spec, as cited above, but also,
I think, misleading because the <b>value</b> of "1.0" is an
integer, and the prohibited trailing decimal point is about
the lexical representation of the value. The error message
doesn't distinguish value space from lexical space, although
it could.</div>
<div><br>
</div>
<div>Am I alone in thinking that these two error messages could
be clearer because the error in both cases is the same: the
lexical space of xsd:integer does not permit a decimal point?
Neither of these messages fingers the decimal point as the
invalid part of the content.</div>
<div><br>
</div>
<div>Sincerely,</div>
<div><br>
</div>
<div>David</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
oXygen-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a>
<a class="moz-txt-link-freetext" href="https://www.oxygenxml.com/mailman/listinfo/oxygen-user">https://www.oxygenxml.com/mailman/listinfo/oxygen-user</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>