Jump to content

Defining global constants


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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...