?
Solved

XSD PLEASE HELP

Posted on 2005-04-07
3
Medium Priority
?
169 Views
Last Modified: 2010-04-17


THIS IS HOW THE XMLFILE IS

<INTRO>
<GROUPS>
<ADD1 GROUP="G1" MODE="INPROC">
</GROUPS>
<PROPERTY>
<ADD KEY="KEY3" MODE="OUTPROC">
<ADD KEY="KEY4" GROUP="G1" MODE="INPROC">
<ADD KEY="KEY2" ABS="FDG" SLI="GD">
</PROPERTY>
</INTRO>


THE PROBLEM IS
1) IN THE <PROPERTY> TAG THE USER HAS THE CHOICE TO INCLUDE GROUP NAME OR NOT FOR EACH  <ADD> ELEMENT

IF THE USER INCLUDES THE <GROUP>TAG THEN THE < MODE> SHOULD INCLUDE THE THE SAME MODE VALUE AS THE CORRESPONDING <GROUP> IN THE <GROUPS> ELEMENT


IF THE <GROUP> TAG IS NOT INCLUDEED THEN THE USER CAN USE ANY MODE HE WISHES.

2)
HOW DO WE USE THE <CHOICE> TAG FOR ATTRIBUTES

THE USER HAS THE OPTION TO EITHER <ABS> OR THE <SLI> TAG.
OR THE USE R SIMPLY DOES NOT USE EITHER.



APPRECIATE HELP ON XSD FOR THE ABOVE 2 PROBLEMS



0
Comment
Question by:me_new
1 Comment
 
LVL 14

Accepted Solution

by:
Shiju Sasidharan earned 200 total points
ID: 13726173
hi
i think this is the proper and easy way of handling xml nodes
it is always better to avoid attributes for a tag, instead keep them as child nodes.
putting child nodes doesnt make any overload. its easy to trace and handle

'================================
<INTRO>
<GROUPS>
      <ADD1>
            <GROUP>G1</GROUP>
            <MODE>INPROC</MODE>
      </ADD1>
</GROUPS>
<PROPERTY>
      <ADD>
            <KEY>KEY3</KEY>
            <MODE>OUTPROC</MODE>
      </ADD>
      <ADD>
            <KEY>KEY4</KEY>
            <GROUP>G1</GROUP>
            <MODE>INPROC</MODE>
      </ADD>
      <ADD>
            <KEY>KEY2</KEY>
            <ABS>FDG</ABS>
            <SLI>GD</SLI>
      </ADD>
</PROPERTY>
</INTRO>
'======================================

;-)
Shiju
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question