Huma Posted March 13, 2006 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 Link to comment Share on other sites More sharing options...
steve_marjoribanks Posted March 14, 2006 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now