You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Wayne McFadden <wa...@yahoo.com> on 2006/01/31 23:35:26 UTC
.xsdconfig problem
I am using ant and I'm trying to get the following xsd below into a package.
The last .xsdconfig file (named .xsdconfig) was
<xs:config xmlns:xs="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
<!-- Use the "namespace" element to map a namespace to the Java
package
name that should be generated. -->
<xs:namespace uri="##any">
<xs:package>com.confirmhub.xmlbean.schema</xs:package>
</xs:namespace>
</xs:config>
I can't seem to get the right combination to get the package created, it always puts it into nonamespace, like it isn't even reading my .xsdconfig file. Any help is appreciated.
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:po="http://openuri.org/easypo"
elementFormDefault="qualified">
<xs:element name="purchase-order">
<xs:complexType>
<xs:sequence>
<xs:element name="customer" type="customer"/>
<xs:element name="date" type="xs:dateTime"/>
<xs:element name="line-item" type="line-item" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="shipper" type="shipper" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="customer">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="address" type="xs:string"/>
</xs:sequence>
<xs:attribute name="age" type="xs:int"/>
<xs:attribute name="moo" type="xs:int" default="100"/>
<xs:attribute name="poo" type="xs:int" fixed="200"/>
</xs:complexType>
<xs:complexType name="line-item">
<xs:sequence>
<xs:element name="description" type="xs:string"/>
<xs:element name="per-unit-ounces" type="xs:decimal"/>
<xs:element name="price" type="xs:decimal"/>
<xs:element name="quantity" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="shipper">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="per-ounce-rate" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Re: .xsdconfig problem
Posted by Edward Frederick <ep...@gmail.com>.
Don't you need a target namespace?
On 1/31/06, Wayne McFadden <wa...@yahoo.com> wrote:
> I am using ant and I'm trying to get the following xsd below into a package.
>
> The last .xsdconfig file (named .xsdconfig) was
>
>
> <xs:config
> xmlns:xs="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
>
> <!-- Use the "namespace" element to map a namespace to the Java
> package
> name that should be generated. -->
> <xs:namespace uri="##any">
> <xs:package>com.confirmhub.xmlbean.schema</xs:package>
> </xs:namespace>
>
>
> </xs:config>
>
> I can't seem to get the right combination to get the package created, it
> always puts it into nonamespace, like it isn't even reading my .xsdconfig
> file. Any help is appreciated.
>
>
>
> <xs:schema
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:po="http://openuri.org/easypo"
> elementFormDefault="qualified">
> <xs:element name="purchase-order">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="customer" type="customer"/>
> <xs:element name="date" type="xs:dateTime"/>
> <xs:element name="line-item" type="line-item" minOccurs="0"
> maxOccurs="unbounded"/>
> <xs:element name="shipper" type="shipper" minOccurs="0" maxOccurs="1"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:complexType name="customer">
> <xs:sequence>
> <xs:element name="name" type="xs:string"/>
> <xs:element name="address" type="xs:string"/>
> </xs:sequence>
> <xs:attribute name="age" type="xs:int"/>
> <xs:attribute name="moo" type="xs:int" default="100"/>
> <xs:attribute name="poo" type="xs:int" fixed="200"/>
> </xs:complexType>
> <xs:complexType name="line-item">
> <xs:sequence>
> <xs:element name="description" type="xs:string"/>
> <xs:element name="per-unit-ounces" type="xs:decimal"/>
> <xs:element name="price" type="xs:decimal"/>
> <xs:element name="quantity" type="xs:integer"/>
> </xs:sequence>
> </xs:complexType>
> <xs:complexType name="shipper">
> <xs:sequence>
> <xs:element name="name" type="xs:string"/>
> <xs:element name="per-ounce-rate" type="xs:decimal"/>
> </xs:sequence>
> </xs:complexType>
> </xs:schema>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org