Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
SystemAdmin
SystemAdmin
1138 Posts
ACCEPTED ANSWER

Pinned topic Defining global constants

‏2012-09-18T18:36:00Z |
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. It can occur at max one time.

Could anyone please suggest how the schema can be created for the 'reserved' element?

Thanks