Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » some kind of restriction(restricing a group of elements)
some kind of restriction [message #724406] Mon, 12 September 2011 09:55 Go to next message
Drd  is currently offline Drd Friend
Messages: 20
Registered: August 2011
Junior Member
I have this sequence of elements in the xml:

<CONFIGURATION type="choice">
<AUTOSAVE>DISABLED</AUTOSAVE>
<PLAUSIBILITY>DISABLED</PLAUSIBILITY>
<PARA_CONF_FCT>DISABLED</PARA_CONF_FCT>
<CHECKSUM>DISABLED</CHECKSUM>
<PROTECTION_2OF3>ENABLED</PROTECTION_2OF3>
<PROTECTION_HAMMING>DISABLED</PROTECTION_HAMMING>
<EM_GROUP>1</EM_GROUP>
<description>
<!-- you can choose only one of the elements from the configuration to ENABLE ( EM_GROUP is not affected by this) -->
<!-- example:if the element AUTOSAVE is DISABLED then he will appear like so: EM_DISABLE_AUTOSAVE -->
<!-- example:if the element AUTOSAVE is ENABLED then he will appear like so: EM_ENABLE_AUTOSAVE -->
<!-- example:if EM_GROUP has the value 1 then the code will appear EM_GROUP_1 -->
</description>
</CONFIGURATION>

**************

basically I need in the xsd to respect that description:
ONLY ONE of the elements can have the value ENABLED
please help and thx in advance
Re: some kind of restriction [message #724535 is a reply to message #724406] Mon, 12 September 2011 14:52 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
This forum/newsgroup is for helping to understand and use the
org.eclipse.xsd API, not as a general XML Schema help forum.


On 12/09/2011 2:55 AM, Drd wrote:
> I have this sequence of elements in the xml:
>
> <CONFIGURATION type="choice">
> <AUTOSAVE>DISABLED</AUTOSAVE>
> <PLAUSIBILITY>DISABLED</PLAUSIBILITY>
> <PARA_CONF_FCT>DISABLED</PARA_CONF_FCT>
> <CHECKSUM>DISABLED</CHECKSUM>
> <PROTECTION_2OF3>ENABLED</PROTECTION_2OF3>
> <PROTECTION_HAMMING>DISABLED</PROTECTION_HAMMING>
> <EM_GROUP>1</EM_GROUP>
> <description>
> <!-- you can choose only one of the elements from the configuration to
> ENABLE ( EM_GROUP is not affected by this) -->
> <!-- example:if the element AUTOSAVE is DISABLED then he will appear
> like so: EM_DISABLE_AUTOSAVE -->
> <!-- example:if the element AUTOSAVE is ENABLED then he will appear
> like so: EM_ENABLE_AUTOSAVE -->
> <!-- example:if EM_GROUP has the value 1 then the code will appear
> EM_GROUP_1 -->
> </description>
> </CONFIGURATION>
> **************
>
> basically I need in the xsd to respect that description:
> ONLY ONE of the elements can have the value ENABLED
> please help and thx in advance
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:NewXMLGenerator.createCMDocument() returns null
Next Topic:Exclude files/folders from validation programmatically
Goto Forum:
  


Current Time: Thu Apr 25 00:42:16 GMT 2024

Powered by FUDForum. Page generated in 0.02476 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top