Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: at least one

From: George Cristian Bina <george@---------.--->
To: Debora Vanni <debora.vanni@------.--->
Date: 5/22/2006 8:31:00 PM
Hi Debora,

If you know all the elements that can go inside filters then you can 
just have a choice model group that contains all the elements and set 
the occurrence on the choice model group to one or more:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:element name="filters">
     <xs:complexType>
       <xs:choice maxOccurs="unbounded">
         <xs:element name="high"/>
         <xs:element name="medium"/>
         <xs:element name="low"/>
       </xs:choice>
     </xs:complexType>
   </xs:element>
</xs:schema>

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
www.---.com


Debora Vanni wrote:
> Sorry to bother you again,
> I try to look around but I can't find a solution.
> I would like to know if there is some way in XSD to say that a complex
> element should be composed by any but at least one element of a group(=
> some) of elements.
> For example:
> the group is :
> 	<high></high>
> 	<medium></medium>
> 	<low></low>
> 
> This is CORRECT:
> <filters>
> 	<high></high>
> 	<medium></medium>
> 	<low></low>
> </filters>
> 
> This is CORRECT:
> <filters>
> 	<high></high>
> 	<low></low>
> </filters>
> 
> This is INCORRECT:
> <filters>
> 
> </filters>
> I know the maximum number of elements of the group but I don't know
> which and how many they could choose. Everything it's ok but there
> should be at least one!
> Thank you for you help
> Debora Vanni
> 
> 
> 
> 

From Philippe.Poulard@s... Tue May 23 13:37:11 2006
Received: from maggie.w3.org ([19


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent