Jump to content

Defining global constants


pa7751

Recommended Posts

Hi I am new to schemas. Would really appreciate if someone could provide guidance. Basically, I want to write a schema for declaring some constants (or reserved words, as we may also call it). For eg., if we have to create an xml such that:

<xml><reserved><result>109</result><result1>xyz</result1></reserved> <activity name="xxx"><sometask name="yyy" /></activity> <activity name="xxx"><sometask name="yyy" /></activity></xml>

So in the above xml, there can be only one reserved block but activity tags can come any no. of times. The 'resereved' block delares some constants (result, result1) that should never be overridden e.g., I cannot have an 'activity' or 'sometask' with a name=result or result1. Also I cannot define another 'result' element or give the names 'result' and 'result1' to activity or sometask names. 'result', 'result1' can occur at max one time. Could anyone please suggest how the schema can be created for the 'reserved' element? Thanks

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...