Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

XML Schema problem...Thanks

Thread view: 
Mavis - 06 Jun 2006 02:52 GMT
If I want to assign different value to different versions as the
followings:

     <versions>
                   <version>
                             <name> a20 </name>
                             <value> 10 </value>
                   </version>

                   <version>
                             <name> b40 </name>
                             <value> 50 </value>
                   </version>

                   <version>
                             <name> others</name>
                             <value> 5 </value>
                   </version>
          </versions>

I guess it cannot be simplified as below, even if we can use <xs:choice
maxOccurs="unbounded"> to define elements in any order with any
occurrences.. the problem is we cannot identify corresponding value for
each version...

         <versions>
                   <version> a20 </version>
                   <value> 10 </value>

                   <version> b40 </version>
                   <value> 50 <value>

                   <version> others </version>
                   <value> 5 </value>
          </versions>

Am I right? Could anyone confirm me about this if possible?
Thanks a lot!
jmcgill - 06 Jun 2006 03:04 GMT
> I guess it cannot be simplified as below, even if we can use <xs:choice
> maxOccurs="unbounded"> to define elements in any order with any
[quoted text clipped - 14 lines]
> Am I right? Could anyone confirm me about this if possible?
> Thanks a lot!

It is only because of the way you read it that this is distinct from:

           <versions>
                     <value> 50 <value>
                     <value> 10 </value>>
                     <value> 5 </value>
                     <version> a20 </version>>
                     <version> b40 </version>
                     <version> others </version>
           </versions>

Although you may be able indicate the ordering of each element as a
sequence.

I liked your first version much, much better.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.