I changed my xsd file to this:

<xs:schema
 targetNamespace="xtecan.eclipsage.org"
 xmlns:xtecan="xtecan.eclipsage.org"
 xmlns:xs="http://www.w3.org/2001/XMLSchema";
 elementFormDefault="qualified">
  <xs:annotation>
    <xs:documentation xml:lang="en"/>
  </xs:annotation>
  <xs:complexType name="HolderTypeLib">
    <xs:sequence>
      <xs:element name="holderType" type="xtecan:HolderType"
minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="HolderType">
    <xs:sequence>
      <xs:element name="holderTypeHolderSlot"
type="xtecan:HolderTypeHolderSlot" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element name="HolderTypeSampleSlot"
type="xtecan:HolderTypeSampleSlot" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="name" type="xs:string"/>
    <xs:attribute name="instanceHaveName" type="xs:boolean"/>
  </xs:complexType>
  <xs:complexType name="HolderTypeHolderSlot">
  <xs:sequence>
    <xs:element name="acceptedHolderType"
type="xtecan:AcceptedHolderType" minOccurs="0" maxOccurs="unbounded"/>
  </xs:sequence>
  <xs:attribute name="number" type="xs:int"/>
  </xs:complexType>
  <xs:complexType name="AcceptedHolderType">
    <xs:sequence>
      <xs:element name="holderTypeName" type="xs:string"/>
    </xs:sequence>
    <xs:attribute name="nbOfSlotsNeeded" type="xs:int"/>
  </xs:complexType>
  <xs:complexType name="HolderTypeSampleSlot">
    <xs:sequence>
      <xs:element name="sampleSlotMaxVolume"
type="xtecan:SampleSlotMaxVolume"/>
    </xs:sequence>
    <xs:attribute name="number" type="xs:int"/>
  </xs:complexType>
  <xs:complexType name="SampleSlotMaxVolume">
    <xs:attribute name="unit">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="ml"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="volume" type="xs:double"/>
  </xs:complexType>
</xs:schema>

and know It WORKS OK.
It seems that I was making mistakes with xs:element in place of
xs:complexType.
and some capitals where also probably wrong.

Thanks to me.
Marouane

On Wed, 2006-04-26 at 18:58, Ben Jelloul Marouane wrote:
> Hello,
> 
> I have an xsd schema and I want to create a jar file 
> with my classes in the java package org.eclipsage.xtecan;
> I precise that I do not own the URL http://eclipsage.org/xtecan
> and I would prefere to write somewhere org.eclipsage.xtecan in place of
> this url in the schema file. 
> 
> the schema file xtecan.xsd:
> =========================================================================================================
> <xs:schema
>    targetNamespace="http://eclipsage.org/xtecan";
>    xmlns:xtecan="http://eclipsage.org/xtecan";
>    xmlns:xs="http://www.w3.org/2001/XMLSchema";
>    elementFormDefault="qualified">
> 
>    <xs:element name="holderTypeLib">
>     <xs:complexType>
>       <xs:sequence>
>         <xs:element name="customer" type="xtecan:holderType"
> minOccurs="0" maxOccurs="unbounded"/>
>       </xs:sequence>
>     </xs:complexType>
>   </xs:element>
>   <xs:element name="holderType">
>     <xs:complexType>
>       <xs:sequence>
>         <xs:element name="holderTypeHolderSlot"
> type="xtecan:holderTypeHolderSlot" minOccurs="0" maxOccurs="unbounded"/>
>         <xs:element name="HolderTypeSampleSlot"
> type="xtecan:holderTypeSampleSlot" minOccurs="0" maxOccurs="unbounded"/>
>       </xs:sequence>
>       <xs:attribute name="name" type="xs:string"/>
>       <xs:attribute name="instanceHaveName" type="xs:boolean"/>
>     </xs:complexType>
>   </xs:element>
>   <xs:element name="holderTypeHolderSlot">
>     <xs:complexType>
>       <xs:sequence>
>         <xs:element name="acceptedHolderType"
> type="xtecan:acceptedHolderType" minOccurs="0" maxOccurs="unbounded"/>
>       </xs:sequence>
>       <xs:attribute name="number" type="xs:int"/>
>     </xs:complexType>
>   </xs:element>
>   <xs:element name="acceptedHolderType">
>     <xs:complexType>
>       <xs:sequence>
>         <xs:element name="holderTypeName" type="xs:string"/>
>       </xs:sequence>
>       <xs:attribute name="nbOfSlotsNeeded" type="xs:int"/>
>     </xs:complexType>
>   </xs:element>
>   <xs:element name="holderTypeSampleSlot">
>     <xs:complexType>
>       <xs:sequence>
>         <xs:element name="sampleSlotMaxVolume"
> type="xtecan:sampleSlotMaxVolume"/>
>       </xs:sequence>
>       <xs:attribute name="number" type="xs:int"/>
>     </xs:complexType>
>   </xs:element>
>   <xs:element name="sampleSlotMaxVolume">
>     <xs:complexType>
>       <xs:attribute name="unit">
>         <xs:simpleType>
>             <xs:restriction base="xs:string">
>                 <xs:enumeration value="ml"/>
>             </xs:restriction>
>         </xs:simpleType>
>       </xs:attribute>
>       <xs:attribute name="volume" type="xs:float"/>
>     </xs:complexType>
>   </xs:element>
> </xs:schema>
> ==========================================================================================
> 
> so I run this command:
> 
> > scomp -src ../data/generatedSrc -out xtecan.jar ../data/xsd/xtecan.xsd
> -verbose -debug
> Apache Software Foundation, org.apache.xmlbeans.XmlBeans version
> 2.1.0-r330131
> Loading schema file ../data/xsd/xtecan.xsd
> xtecan.xsd:10:9: error: src-resolve.a: Could not find type
> '[EMAIL PROTECTED]://eclipsage.org/xtecan'. Do you mean to refer to the
> element with that name (in xtecan.xsd)?
> xtecan.xsd:18:9: error: src-resolve.a: Could not find type
> '[EMAIL PROTECTED]://eclipsage.org/xtecan'. Do you mean to refer
> to the element with that name (in xtecan.xsd)?
> xtecan.xsd:19:9: error: src-resolve.a: Could not find type
> '[EMAIL PROTECTED]://eclipsage.org/xtecan'. Do you mean to refer
> to the element with that name (in xtecan.xsd)?
> xtecan.xsd:29:9: error: src-resolve.a: Could not find type
> '[EMAIL PROTECTED]://eclipsage.org/xtecan'. Do you mean to refer
> to the element with that name (in xtecan.xsd)?
> xtecan.xsd:46:9: error: src-resolve.a: Could not find type
> '[EMAIL PROTECTED]://eclipsage.org/xtecan'. Do you mean to refer
> to the element with that name (in xtecan.xsd)?
> Time to build schema type system: 1.542 seconds
> BUILD FAILED
> 
> 1/ I tryed replacing the type="xtecan:sampleSlotMaxVolume" by
> type="sampleSlotMaxVolume" and all the others too but it does not work
> (same error).
> 
> 2/ I tryed replacing:
>      targetNamespace="http://eclipsage.org/xtecan";
>      xmlns:xtecan="http://eclipsage.org/xtecan";
>    By: 
>      targetNamespace="org.eclipsage.xtecan"
>      xmlns:xtecan="org.eclipsage.xtecan"
>    With and without type="xtecan: ...
>    It does not work (same error).
> 
> Do you have an idea why?
> I do not know a lot about xmlbean and namespaces but the
> easypo.xsd(tutorial) works and for my schema no way,I realy do not get
> it.
> Thanks,
> Marouane
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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

Reply via email to