[et-mgmt-tools] [PATCH] Fix Relax-NG pattern matching

David Lutterkort dlutter at redhat.com
Thu Jul 24 22:26:21 UTC 2008


On Thu, 2008-07-24 at 22:11 +0100, John Levon wrote:
> On Thu, Jul 24, 2008 at 01:46:32PM -0700, David Lutterkort wrote:
> 
> > Haven't checked myself, but are you sure that in the Relax-NG '.' and
> > '+' retain their special meaning inside character classes ? In some
> 
> Yep:
> 
> xenbld:virt-convert $ grep '<name>' suse.hvm.virt-image.xml 
>  <name>SUSE_Linux </name>
> xenbld:virt-convert $ xmllint --relaxng doc/image.rng suse.hvm.virt-image.xml 2>&1  | grep 'Error validating'
> xenbld:virt-convert $ vi doc/image.rng  # . -> \.
> xenbld:virt-convert $ xmllint --relaxng doc/image.rng
> suse.hvm.virt-image.xml 2>&1  | grep 'Error validating'
> suse.hvm.virt-image.xml:3: element name: Relax-NG validity error : Error validating datatype string

This is very weird. The image.rng that's upstream has genericName
          <define name='genericName'>
            <data type='string'>
              <param name="pattern">[A-Za-z0-9_.:/+-]+</param>
            </data>
          </define>
When I run 'xmllint --relaxng image.rng --noout image.xml' I do get a
validation failure when I put '<name>my vm</name>' in there.

After playing with it some more, it seems that your patch does at the
very least not break anything - no idea where the observed differences
in xmllint behavior come from.

But anyway: ACK

David





More information about the et-mgmt-tools mailing list