Philip Manual

Greenhorn
+ Follow
since Jul 20, 2005
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Philip Manual

Hi Madhav,

Thanks for your reply.
Based on the requirements, I cannot make them as attributes. The XML i gave in my original post was just an example. The actual XML is for registration purpose. A snippet of the XML would be

<UserType>A</UserType>
<Access>1</Access>

Designing them as Individual elements/tags instead of attributes, makes sure all valiation is done by the XML parser instead of validating these elements in code.

So, the workaround/solution I used for this issue is to create complexTypes for various valid combination (Just the way you mentioned). Luckily, I had just two combination.

Regards,
Philip
Hi All,

Need some help with XML validation. A valid xml file should look like (a) or (b) or (c)..

(a)
<root>
<apples/>
</root>

(b)
<root>
<oranges/>
</root>

(c)
<root>
<apples/>
<oranges/>
</root>

That is, either it should be <apples> tag or <oranges> tag or (<apples> AND <oranges> tags).

I tried the following xsd schema, but one test case fails (two <apples> is valid with this xsd, which is incorrect)

<choice minOccurs="1" maxOccurs="2">
<element name="apples"/>
<element name="oranges"/>
</choice>

Can this requirement be met using any other tags ? Any help is appreciated.

Regards,
Philip
Hi All,

Is there a way to restrict the value of one xml element on the basis of another xml element's value ?

(e.g)
Valid values for Item = Type1, Type2, Type3
Valid values for SKU = Value1, Value2, Value3

If the value of Item is Type1, then the value of SKU should be Value1.

Valid XML
<XMLRoot>
<Item>Type1</Item>
<SKU>Value1</SKU>
</XMLRoot>

Invalid XML
<XMLRoot>
<Item>Type1</Item>
<SKU>Value2</SKU>
</XMLRoot>

Any help is appreciated.

Thanks
Philip
Would U please send me a copy too -- philipxwk@yahoo.com
Thank you very much.
Hello Anil,
I will be thankful to u if u send me the zip files of the tuts along with mock tests. My e mail id is philipxwk@yahoo.com
Thanx in advance.
Philip
Hi, Can someone send me the RHE CD Test too, my email is philipxwk@yahoo.com, Thanks a lot.