[Zope3-Users] XML schema definitions,zope.schema and z3c.form

Nylan Nylan at gmx.net
Tue May 6 06:03:38 EDT 2008


Hello,

I need some advice from experienced zope3 developers. ;-)

Use case:
1. Receive xsd from a server(see example xsd)
2. use xsd with zope3(add,edit forms with z3c.form)


I've found this solution(supports only simple elements at root level):
http://blogs.nuxeo.com/sections/blogs/julien_anguenot/2005_08_19_xml-schema-support-on

Are there other solutions, besides the link above, I haven't found/noticed?
Something able to manage more complex types?

Any help or advice appreciated!

best regards


Example XSD:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://schemas.domain.com/SQLSource"
  xmlns:tns="http://schemas.domain.com/SQLSource"
  elementFormDefault="qualified">

  <element name="source" type="tns:sourcetype" />

  <complexType name="sourcetype">
    <sequence>
      <element name="connection">
        <complexType>
          <attribute name="nameref" type="string" />
        </complexType>
      </element>
      <element name="query" type="string" minOccurs="0" maxOccurs="1"/>
      <element name="alias_map">
        <complexType>
          <sequence>
            <element name="alias" minOccurs="0"
              maxOccurs="unbounded">
              <complexType>
                <simpleContent>
                  <extension base="int">
                    <attribute name="name"
                      type="string" />
                  </extension>
                </simpleContent>
              </complexType>
            </element>
          </sequence>
        </complexType>
      </element>
    </sequence>
    <attribute name="name" type="string" />
    <attribute name="type" type="string" />
  </complexType>
</schema>



More information about the Zope3-users mailing list