Huma 0 Posted March 13, 2006 Report Share Posted March 13, 2006 Hello All,I am new with schema.In schema file i want to restrict that in my xml file artist either has a child fullname or combination of firstname and lastname in arbitrary order, but each just once.xml file is like this.<catalog><cd><artist>Huma Khan</artist><country>Pakistan</country></cd><cd><artist><firstname>mona</firstname><lastname>ali</lastname></artist><country>India</country></cd><cd><artist><lastname>Khan</lastname><firstname>Imran</firstname></artist><country>Pakistan</country></cd></catalog>How can i restrict this in schema file.Thanx in advanceHuma Quote Link to post Share on other sites
steve_marjoribanks 0 Posted March 14, 2006 Report Share Posted March 14, 2006 This cannot be done simply by using the XML Schema langiage. Instead you have to use something like Schematron (do a google search) and use it within your schema Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.