Thanks George,
It looks like rnv obeys the spirit of the spec "Note: Spaces are, in
principle, allowed in the ·lexical space· of anyURI, however, their
use is highly discouraged (unless they are encoded by %20)" and yells
if there are spaces in the URI, but jing obeys the letter (which I
think is the only sensible thing to do). It was spaces in an
xsd:anyUri-typed attribute that were setting off the validation errors
in rnv.
Libxml2 (fronted by xmllint), on the other hand, throws up on its
shoes (complaining about invalid values in a different attribute that
are completely bogus), which is disappointing.
I was getting a bit worried by having three different validators tell
me three different things. Thanks for the clarification.
Best,
Hugh
On Jul 1, 2009, at 12:45 AM, George Cristian Bina wrote:
>
>
> Hi Hugh,
>
> Jing surely checks XML Schema datatypes including anyURI. See en
> example
> below.
>
> test.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?oxygen RNGSchema="test.rng" type="xml"?>
> <test>%</test>
>
> test.rng
>
> <?xml version="1.0" encoding="UTF-8"?>
> <grammar xmlns="http://relaxng.org/ns/structure/1.0"
> xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
> datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
> <start>
> <ref name="test"/>
> </start>
> <define name="test">
> <element name="test">
> <data type="anyURI"/>
> </element>
> </define>
> </grammar>
>
> this gives
>
> SystemID: C:\george\test\test.xml
> Severity: error
> Description: bad character content for element
> Start location: 3:15
>
> Best Regards,
> George
> --
> George Cristian Bina
> <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
> http://www.oxygenxml.com
>
> hcayless wrote:
> > Hi,
> >
> > I'm fairly new to RelaxNG, and so my apologies in advance if I'm
> missing something basic. Does the jing command line program take XML
> schema dataypes into account during validation? It appears to me not
> to be doing so. I've got a lot of files I want to validate against a
> RelaxNG schema (a TEI schema, which uses the built in XSD
> datatypes), but it doesn't catch the fact that there's an attribute
> which is supposed to be an xsd:anyUri, but isn't. I've also been
> playing with rnv (http://sourceforge.net/projects/rnv/) which does
> catch this error.
> >
> > My question is whether I'm doing something wrong in invoking jing,
> or if this is expected behavior and I should be implementing my own
> code around jing to do this.
> >
> > Thanks,
> > Hugh
> >
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
>
>