Hi,

I'm using Xmlbeans 2.0.0. Here is an excerpt of my schema:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://chart.xyz.com";
xmlns:charts="http://chart.xyz.com";
xmlns:xs="http://www.w3.org/2001/XMLSchema"; elementFormDefault="qualified"
attributeFormDefault="unqualified">
        <xs:element name="chartConfiguration"
type="charts:chartConfiguration">
                <xs:annotation>
                        <xs:documentation>The root element that would
contain a chart configuration</xs:documentation>
                </xs:annotation>

                                <key name="datasetKey" >
                                        <selector
xpath="charts:dataSetGenerator"/>
                                        <field xpath="@name"/>
                                </unique>               
                
        </xs:element>
        <xs:complexType name="chartConfiguration">
                <xs:sequence>
                        <xs:element name="dataSet"
type="charts:dataSetGenerator" maxOccurs="unbounded"/>
                        <xs:element name="barChart" type="charts:barChart"
minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element name="pieChart" type="charts:pieChart"
minOccurs="0" maxOccurs="unbounded"/>
                        
                </xs:sequence>
                <xs:attribute name="name" type="xs:string" use="required"/>


I'm using ANT 1.6.4 to compile it. I get the following error. I'm new at
defining 'key' elements. I did it based on the examples on the schema
primer. Whats going wrong here ? 

xmlbean.taskdef:
compile.schema.using.xmlbean:
  [xmlbean] config/chart-configuration.xsd:8: error: cvc-complex-type.2.4a:
Expected elements '[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema
[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema
[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema [EMAIL 
PROTECTED]://www.w3.org/2001/XMLSchema
[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema' instead of 'unique' here in 
element
[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema
  [xmlbean] Time to build schema type system: 1.875 seconds
  [xmlbean] BUILD FAILED


Regards,
Radhakrishnan J
phone: +91-80-51368888 x 582
e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to