[xml] error restricting complexType list (parsing official GML schema)



Hi all,

I have a problem with parsing the OpenGIS GML Schema (actually in
python using lxml.etree, but I've been able to replicate it with
xmllint). My cut-down test-case/error is:

  $ xmllint --schema gml_error.xsd --noout --version

xmllint: using libxml version 20706
   compiled with: Threads Tree Output Push Reader Patterns Writer
SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer
XInclude Iconv ISO8859X Unicode Regexps Automata Expr Schemas
Schematron Modules Debug Zlib

  gml_error.xsd:15: element complexType: Schemas parser error : local
list type: A type, derived by list or union, must have the simple
ur-type definition as base type, not
'{http://www.example.org/gml}doubleList'.

  WXS schema gml_error.xsd failed to compile

My gml_error.xsd (extracted from the full GML schema at [1]) looks like:

<schema targetNamespace="http://www.example.org/gml";
xmlns:gml="http://www.example.org/gml";
xmlns="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified">
  <simpleType name="doubleList">
    <list itemType="double"/>
  </simpleType>

  <complexType name="DirectPositionType">
    <simpleContent>
      <extension base="gml:doubleList">
        <attribute name="count" type="positiveInteger"/>
      </extension>
    </simpleContent>
  </complexType>

  <complexType name="VectorType">
    <simpleContent>
      <restriction base="gml:DirectPositionType"/>
    </simpleContent>
  </complexType>
</schema>

A couple of other emails from 2007/2008 referenced the same problem,
but didn't get any answers:
 * http://mail.gnome.org/archives/xml/2007-June/msg00107.html
 * http://markmail.org/message/anzfqww27wr3jlye

I'm no xml schema expert, so any help or understanding would be appreciated!

Rob :)

[1] http://schemas.opengis.net/gml/gml-3_2_1.zip



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