Bug 237039 - libvirt.rng contains invalid regular expressions
libvirt.rng contains invalid regular expressions
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
rawhide
All All
medium Severity low
: ---
: ---
Assigned To: Daniel Veillard
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-18 20:16 EDT by Robin Green
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-19 03:57:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
fix (1022 bytes, patch)
2007-04-18 20:24 EDT, Robin Green
no flags Details | Diff

  None (edit)
Description Robin Green 2007-04-18 20:16:22 EDT
Description of problem:
I tried to use trang to convert libvirt.rng to an XML schema file, but it failed
with errors about four of the regular expressions.

Version-Release number of selected component (if applicable):
libvirt-0.2.1-2.fc7

How reproducible:
Always

Steps to Reproduce:
1. /usr/lib/jvm/java-sun/bin/java -jar /usr/local/trang-20030619/trang.jar
/usr/share/doc/libvirt-0.2.1/libvirt.rng ~/libvirt.xsd
  
Actual results:
/usr/share/doc/libvirt-0.2.1/libvirt.rng:711:29: error: invalid parameter:
invalid regular expression: illegal escape
/usr/share/doc/libvirt-0.2.1/libvirt.rng:716:29: error: invalid parameter:
invalid regular expression: illegal escape
/usr/share/doc/libvirt-0.2.1/libvirt.rng:721:29: error: invalid parameter:
invalid regular expression: illegal escape
/usr/share/doc/libvirt-0.2.1/libvirt.rng:726:29: error: invalid parameter:
invalid regular expression: illegal escape

Expected results:
conversion successful

Additional info:
I had to use sun Java (I used 1.5) to run trang because gij crashed with a NPE
when I tried it.
Comment 1 Robin Green 2007-04-18 20:24:06 EDT
Created attachment 152971 [details]
fix
Comment 2 Daniel Veillard 2007-04-19 03:57:20 EDT
Hum, it seems my regexp parser in libxml2 is a bit laxist
  http://www.w3.org/TR/xmlschema-2/#dt-cces1

I'm trying to fix this in libxml2, in the meantime I applied the patch, thanks.
Note however that the rng is lagging behind, it was not updated while elements
and constructs have been added in the code, which seriously reduces its
usefulness.
Maybe when libvirt developments slows down a bit it will be easier to 
resynchronize (any way I take patches ! I tried to keep the rng readable and
commented)

  thanks,

Daniel

Note You need to log in before you can comment on or make changes to this bug.