Re: [xml] relaxng in xmllint



On Fri, Feb 07, 2003 at 10:47:36AM +0100, Morus Walter wrote:
Hi Daniel,

there seems to be a minor bug with the --relaxng option in xmllint.

  <grin/> yep I noticed that just after the release ...

While the relaxng code is included depending on LIBXML_SCHEMAS_ENABLED,
the --relaxng option is included in the output of `xmllint -h' depending
on LIBXML_XINCLUDE_ENABLED. (xmllint.c line 1218)

  minor problem, but that was sufficient to hide the second point.

Second: LIBXML_SCHEMAS_ENABLED wasn't set after I did a 
./configure
(that's how I found the above problem, xmllint -h listed --relaxng but it 
didn't recognize the option)

  yup, the real problem ! Damn ....

[...]
I'm not familiar with configure, but if I compare the 
with-regexps and the with-schema part in configure.in I'd say, the section
[...]
should read

AC_ARG_WITH(schemas, [  --with-schemas              Add experimental Schemas/RelaxNG support (on)])
if test "$with_schemas" = "no" ; then
    echo "Disabled Schemas/Relax-NG support"
    WITH_SCHEMAS=0
    TEST_SCHEMAS=
else    
    echo "Enabled Schemas/Relax-NG support"
    WITH_SCHEMAS=1
    TEST_SCHEMAS="Schemastests Relaxtests"
    with_regexps=yes
fi

if schema support should be configured in by default.

  Right, I nicely scr...ed that up :-\ . I should not try to
make those change in a rush just before a release ...


Apart from these minor problems, I'd like to say that it's great to have
relaxng support in libxml. Thank you very much.

  Well, it's beta :-)

Can you say something on how complete this support is, and what's missing?
(I understand that it's alpha, but that does not imply anything about
completeness.)

  It should be mostly feature complete, inclusing XML Schemas datatype 
bindings, but:
   - the XML Schemas datatype support ain't complete, I already commited
     more basic type support since the release but it's far from perfect
   - datatype "facets" are not supported yet.
   - I still have some troubles with large interleaves validations,
     there is of course the danger of the explosion of the number of 
     permutations and somehow something seems broken there.
   - it should pass all the examples from the RelaxNG tutorial since I 
     based my current regression tests on those [*].
   - the API is basic, it just allows to validate a full instance ATM,
     I want to plug it in with the existing reader streaming interface
     but that requires a bit of work to detect patterns compilable as
     determinist automatas, and use them when possible to avoid memory
     usage explosion :-)
   - more work on optimization, maybe also add a guard in the interleave
     code to block exponential combinatory explosion leading in DoS for
     some types of documents.

[*] I had a problem interpreting the last example, it seems to me it contradict
    with section 7.4 of the spec. I tried to subscribe and mail to the RelaxNG
    mailing list on Monday to get an explanation but so far my mail and my
    subscription are blocked without any explanation, too bad, I'm not gonna
    chase them if they don't care. I just note that when I found a bug in
    XML Schemas XPath specification I got immediate feedback from the spec
    author ;-) !

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]