Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML Schema choice and axis

Reply
Thread Tools

XML Schema choice and axis

 
 
DayCoder
Guest
Posts: n/a
 
      08-06-2007
In my schema file, I have defined a choice as follows:

<xs:complexType name="myChoicesType">
<xs:choice>
<xs:element name="choice1" type="xs:string/>
<xs:element name="choice2" type="xs:string"/>
<xs:element name="choice3" type="xs:string"/>
</xs:choice>
</xs:complexType>

When a client using axis creates an instance document and chooses
choice1, axis is doing the following:

<choice1>blah...blah..blah></choice1>
<choice2 nil="true"/>
<choice3 nil="true"/>

Why is axis including choice2 and choice3 in the instance document
with the nillable attribute set? Is it possible to not have it
include choices that are left out.

 
Reply With Quote
 
 
 
 
Boris Kolpackov
Guest
Posts: n/a
 
      08-07-2007
Hi,

DayCoder <(E-Mail Removed)> writes:

> In my schema file, I have defined a choice as follows:
>
> <xs:complexType name="myChoicesType">
> <xs:choice>
> <xs:element name="choice1" type="xs:string/>
> <xs:element name="choice2" type="xs:string"/>
> <xs:element name="choice3" type="xs:string"/>
> </xs:choice>
> </xs:complexType>
>
> When a client using axis creates an instance document and chooses
> choice1, axis is doing the following:
>
> <choice1>blah...blah..blah></choice1>
> <choice2 nil="true"/>
> <choice3 nil="true"/>


Seems like a bug in Axis. This XML is not even valid per your
schema. I suggest that you report this to the Axis developers.


-boris

--
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
web.xml / XML schema issue, why do some XML schema attributes disappear asciz@starmail.com Java 3 02-20-2007 09:56 AM
Validation with XSD using XML::LibXML::Schema, and XML::Validator::Schema huntingseasonson@gmail.com Perl Misc 5 11-29-2006 12:37 PM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
AXIS jars org.apache.axis.wsi.* and org.apache.axis.transport.jms.* unkwb@web.de Java 0 02-23-2005 04:02 PM
XML schema regular expressions question and recommended XML Schema book Fred Smith XML 1 02-05-2004 11:12 AM



Advertisments