Re: [xml] xmllint reports non-determinist content model for schema
- From: Johan Corveleyn <jcorvel gmail com>
- To: veillard redhat com
- Cc: xml gnome org
- Subject: Re: [xml] xmllint reports non-determinist content model for schema
- Date: Fri, 17 Aug 2012 22:32:03 +0200
On Fri, Feb 24, 2012 at 2:14 PM, Johan Corveleyn <jcorvel gmail com> wrote:
...
I'm running into a "non-determinist" error with a schema even though I
don't think it's non-determinist (and both XSV and Xerces agree with
me; they too have no problem with the schema). I have reduced my
test-case to a simple example, see below.
On Tue, Feb 28, 2012 at 6:00 AM, Daniel Veillard <veillard redhat com> wrote:
...
Well in that case it seems the underlying code is generating a
wrong automata so it should be a matter of running that minimal
test case under gdb with the breakpoint appropriately set to find out
what wrong transition got added ...
I'd like to take a stab at this issue. I've been able to get the
latest 2.9.0 snapshot (from
ftp://xmlsoft.org/libxml2/libxml2-git-snapshot.tar.gz) to build in
Visual Studio 2010. I can still reproduce the issue.
But I need some guidance. What part of the code should I be looking
at? Where do I have to set the "breakpoint appropriately to find out
the wrong transition that got added"?
Alternatively, if you or anyone else on this list can fix the issue
already, that would be even better :-).
To summarize, the issue is this:
Given the following schema:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="rules">
<xs:complexType>
<xs:sequence>
<xs:element name="rule" minOccurs="0" maxOccurs="unbounded"/>
<xs:sequence minOccurs="0" maxOccurs="1">
<xs:element name="specialRule" minOccurs="1" maxOccurs="1"/>
<xs:element name="rule" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
xmllint complains with "Schemas parser error : local
complex type: The content model is not determinist."
But it isn't.
See also https://bugzilla.gnome.org/show_bug.cgi?id=670865.
--
Johan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]