[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: RE: XML Schema to relaxNG xslt


relaxng maxinclusive
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/


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.