W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2008

Re: Newbie: Question about XSD

From: Pete Cordell <petexmldev@codalogic.com>
Date: Mon, 14 Jul 2008 09:57:24 +0100
Message-ID: <009e01c8e58f$a534bcc0$ea00a8c0@Codalogic>
To: "Michael Kay" <mike@saxonica.com>, "'Mathieu Malaterre'" <mathieu.malaterre@gmail.com>, <xmlschema-dev@w3.org>

----- Original Message From: "Michael Kay"
To: "'Mathieu Malaterre'"

>> B.
>>   I have to manipulate entry which value can be multiple, how
>> would do that ?
>> 1. As attribute:
>> <entry>1,2,3</entry>
>>
>> 2. As element:
>> <entry>
>>   <value>1</value>
>>   <value>2</value>
>>   <value>3</value>
>> </entry>
>
> (2) will be easier to validate and to process.

A variation on this might be to use XSD's xs:list construct.  XML schema 
lists are always white space separated (you can't choose the separator), so 
your list could look like:

    <entry>1 2 3</entry>

HTH,

Pete Cordell
Codalogic
For XML C++ data binding visit http://www.codalogic.com/lmx/
Received on Monday, 14 July 2008 08:58:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:15:06 GMT