|
Rank: Newbie
Joined: 4/2/2007 Posts: 2 Location: Bangalore
|
Hi I am very new to xsd please help me. my requirement is I want to run part of xsd file, means I have an xsd file. <xs:schema targetNamespace="http://openuri.org/easypo" xmlns:po="http://openuri.org/easypo" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="purchase-order"> <xs:complexType> <xs:sequence> <xs:element name="customer" type="po:customer"/> <xs:element name="line-item" type="po:line-item" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="shipper" type="po:shipper" minOccurs="0"/> </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: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:double"/> <xs:element name="quantity" type="xs:int"/> </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>
In the above xsd file have three complex types customer, line-item and shipper. I need to run only customer complex type no need to run entire xsd file. Is there any way to do like my requirement? plz let me know is there any way or not if is it possible then reply to me how can I solve my problem. Plz reply ASAP.
|
|
Rank: Advanced Member
Joined: 9/9/2005 Posts: 483 Location: AT
|
Hello,
What exactly do you mean when you say 'run'? What process are you attempting here? Please go into as much detail as possible...
|
|
Rank: Newbie
Joined: 4/2/2007 Posts: 2 Location: Bangalore
|
Hi Paul, Hi Paul,
I am using xml beans whenever I am compiling above xsd file the xml bean software generating the interfaces and implementation classes for every complex type like in the above xsd file customer, line-item, shipper are 3 complex types, then I got there interfaces and implementation classes. But my requirement is I need to generate only customer related beans, no need to generate remains like line-item and shipper. Ultimately my requirement is I need to compile part of xsd file means in my example need to compile only customer complex type. Is there any possibility to use or compile part of xsd file. Please let me know ASAP.
Thanks raov
|
|
Rank: Advanced Member
Joined: 9/9/2005 Posts: 483 Location: AT
|
Hello Raov,
As I understand it then, you are generating code (using XMLSpy) for your schema, but just require some sections of it?
That being so, it may be possible to be selective about what classes are generated by editing the SPL templates, but probably the quickest/simplest thing would be to manually extract only the elements you need into a separate file and generate code from that.
|
|
guest |