[Home] [By Thread] [By Date] [Recent Entries]


On Sat, 22 Jun 2002, Dare Obasanjo wrote:

> <element name="favoriteMonth" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" 
>  xmlns="http://relaxng.org/ns/structure/1.0">
>   <data type="gMonth">
>     <param name="maxInclusive">--11--</param>
>   </data>
> </element>
>  RESULTS OF VALIDATION WITH JING:  Fatal error at URL
> "file:/C:/Jing/test.rng", line number 4: exception
> "java.lang.StringIndexOutOfBoundsException" thrown: 7

My version of Jing didn't crash, but it said that the parameter
could only be applied to an ordered datatype.

>  MSV requires one to register on Sun's website which for I'd rather
> avoid doing simply to test MSV. Anyone who has gone through this process
> is free to try out combinations of maxInclusive, minExclusive and other
> constraining facets on all W3C XML Schema datatypes in RELAX NG and
> report back.
> 
> 	Wow. I wonder if you actually tried existing validators. Or otherwise
> 	our documentations must be really bad. Both MSV and Jing supports full
> 	XML Schema Datatypes as a datatype library.
> 	

Well, I won't test them _all_, but gMonth certainly does work fine. Here's
a grammar (so that I could test multiple instances)

<grammar datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
  xmlns="http://relaxng.org/ns/structure/1.0">

<start>
<element name="document">
   <oneOrMore>
      <element name="favoriteMonth">
         <data type="gMonth">
            <param name="maxInclusive">--11--</param>
         </data>
      </element>
   </oneOrMore>
</element>
</start>

</grammar>

And here's my test file:

<document>
	<favoriteMonth>--02--</favoriteMonth>
	<favoriteMonth>--12--</favoriteMonth>
</document>

msvalidate tells me that the second line is out of range:

		david@linux:~/relaxng > msvalidate.sh testor.rng testor.xml
		start parsing a grammar.
		validating testor.xml
		Error at line:3, column:40 of file:///home/david/relaxng/testor.xml
		  the value is out of the range (maxInclusive specifies -11-T::).
		 
		the document is NOT valid.

-- 
J. David Eisenberg  http://catcode.com/


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member