[Mono-list] mono-xmltool and relaxng compact include

Atsushi Eno atsushi at ximian.com
Mon Dec 17 14:50:14 EST 2007


Travis Staloch wrote:
> Atsushi,
> Thanks for the pointer.  I've been able to get a little further on this 
> with your help.  However, I'm still running into a validation problem 
> when using an include. 
> I've enclosed the include in a grammar as you suggested and that got rid 
> of that error message I mentioned before.  But I'm still getting an 
> error.  If I run  'mono-xmltool --validate simple.rnc simple.xml' 
> against simple.rnc (1), I get the following:
> Argument cannot be null.
> Parameter name: uriString
> However, If I copy the content of Strippable.rnc into simple.rnc and 
> omit the include [as in simple.rnc (2)], mono-xmltool just says "done" 
> which seems to indicate that the validation was a success.   I can only 
> conclude that the include failed.

Yeah there indeed was an issue this time ;) And actually I had to fix
how to resolve "included" file when referenced from *.rnc (it tried
to parse the included file as *.xml, not *.rnc).

The fix is in svn and now it should successfully validates.

> Note that I was only able to use the interleave if I enclosed the 
> interleaved items with parenthesis as in "(child1 & child2)" below.  If 
> the parenthesis are excluded, I get an error.  It doesn't seem correct 
> that these should need to be grouped together in this way?

The section 2 in the compact syntax describes it as an error:

"It is an error for patterns to combine the |, &, , and - operators 
without using parentheses to make the grouping explicit."

Atsushi Eno

More information about the Mono-list mailing list