W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2000

Re: Derivation problems

From: Nick K. Aghazarian <Ace@AceProgrammer.com>
Date: Tue, 12 Sep 2000 15:00:12 -0700
Message-ID: <39BEA76C.5FDD12D1@AceProgrammer.com>
To: www-xml-schema-comments@w3.org
> I can't really help until you send the real files you're using.

Sorry.  Will the real xml file please stand up:

<XMLData xmlns="http://www.company.com/Schemas/XMLData"
  xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
 xsi:schemaLocation="http://www.company.com/Schemas/XMLData
          XMLData.xsd">
 <Service xsi:type="ExtendedServiceType1">
  <InputData>
   <User>MyName</User>
   <Object>Potato</Object>
   <Action>Fry</Action>
  </InputData>
 </Service>
</XMLData>



> > <schema xmlns="http://www.w3.org/1999/XMLSchema"
> >    xmlns:XD="http://www.company.com/Schemas/XMLData"
> >    targetNamespace="http://www.company.com/Schemas/XMLData">
> >
> > <complexType name="Service" content="elementOnly" >

Changed: <complexType name="Service" content="empty" >

>
> > </complexType>
> >
> > <complexType name="T1">
> >    <group ref="XD:T1Fields" />
> > </complexType>
> >
> > <group name="T1Fields">
> >    <all>
> >        <element name="User" type="string" minOccurs="0" />
> >        <element name="TxnDate" type="timeInstant" minOccurs="0" />
> >    </all>
> > </group>
> >
> > <complexType name="ExtendedServiceType1" base="XD:Service"
> >        content="elementOnly" derivedBy="extension">
> >    <all>
> >        <element name="InputData" type="XD:ET1" minOccurs="0" />
> >        <element name="OutputData" type="XD:ET1" minOccurs="0"
> > maxOccurs="1" />
> >
> >    </all>
> >    <attribute name="ServiceType" type="string" use="default"
> > value="ExtendedType1" />
> >
> > </complexType>
> >
> > <complexType name="ET1" base="XD:T1" derivedBy="extension">
> >    <group ref="XD:ET1Fields" />
> > </complexType>
> >
> > <group name="ET1Fields">
> >    <all>
> >        <element name="Object" type="string" minOccurs="0" />
> >        <element name="Action" type="string" minOccurs="0" />
> >    </all>
> > </group>
> >
> > </schema>

> You probably meant the Service type to be
> empty, in which case say so:
>
>  <complexType name="Service" content="empty" />

Done.


New Results:

Problems with the schema-validity of the target

http://www.aceprogrammer.com/XMLData/XMLData.xml:5:2:
  Warning: using xsi:type
{http://www.company.com/Schemas/XMLData}:ExtendedServiceType1

http://www.aceprogrammer.com/XMLData/XMLData.xml:6:3:
  Invalid per cvc-complex-type.1.2.4: element
{http://www.company.com/Schemas/XMLData}:
    InputData not allowed here in element
{http://www.company.com/Schemas/XMLData}:Service:
http://www.aceprogrammer.com/XMLData/XMLData.xml:6:3:
  Invalid per src-resolve: undeclared element
{http://www.company.com/Schemas/XMLData}:InputData
Received on Tuesday, 12 September 2000 17:58:28 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:53 UTC