[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

schema dialect conversion

  • From: Nick Laqua <nick.laqua@n...>
  • To: xml-dev@l..., "'castor-dev@e...'" <castor-dev@e...>
  • Date: Tue, 13 Mar 2001 19:53:08 +0100

dialect conversion
Hi,
 
does anybody know reliable tools for schema 2 schema mapping , it should support sox, xdr and xsd, I tried XML Authority and it has some bugs which make the resulting xsd files invalid.
 
Thx
 
Nick
-----Original Message-----
From: Lyndon J B Nixon [mailto:nixon@f...]
Sent: Tuesday, March 13, 2001 4:54 PM
To: xml-dev@l...
Subject: XML Schema restriction contradiction?

hi,

is the current definition of <restriction> in the XML Schema CR 24/10/2001 contradictory or am i missing something?

in Part 1:Structures Appendix A: Schema for XML Schemas (normative)

<complexType name="restrictionType">
        <complexContent>
                <extension base="annotated">
                        <sequence>
                                <choice>
                                        <group ref="typeDefParticle" minOccurs="0"/>
                                        <group ref="simpleRestrictionModel" minOccurs="0"/>
                                </choice>
                        <group ref="attrDecls"/>
                        </sequence>
                <attribute name="base" type="QName" use="required"/>
                </extension>
        </complexContent>
</complexType>

This seems to conform to the Schema validation that I am using (XML Spy 3.5) which returns an error that the base attribute is required when i use a XML Schema containing restrictions without a base but with a simpleType child.

However in Part 2:Datatypes section 5.1.1

"Either the base  [attribute] or the simpleType  [child] must be present, but not both."

which matches with the given Schema for Datatype Definitions which states

<element name="restriction" substitutionGroup="simpleDerivation" id="restriction">
        <complexType>
                <annotation>
                        <documentation xml:lang="en" source="http://www.w3.org/TR/xmlschema-2/#element-restriction">
                        base attribute and simpleType child are mutually exclusive, but one or other is required
                                </documentation>
                </annotation>
                <complexContent>
                        <extension base="annotated">
                                <group ref="simpleRestrictionModel"/>
                                <attribute name="base" type="QName" use="optional"/>
                        </extension>
                </complexContent>
        </complexType>
</element>

So, is the base attribute optional or required? Is the XML Spy validator correctly validating my XML Schema?
The offending (error producing) XML Schema code is:

<simpleType name="SFColor">
      <restriction>
         <simpleType>
            <list itemType="xmta:ZeroToOneFloat"/>
         </simpleType>
         <length value="3"/>
      </restriction>
   </simpleType>

regards

lyndon


Lyndon J B Nixon ... MAGIC Centre, GMD FOKUS ... Berlin, Germany
"what is now proved was once only imagined" - william blake
PhD Student, Integration of Internet into MPEG-4 & MPEG-7
nixon@f...   members.tripod.co.uk/~madeejit/phd.htm

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.