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

Re: Processing xs:group as a finite automata same as processing xs:choice?

From: Michael Kay <mike@saxonica.com>
Date: Tue, 20 Jul 2010 19:14:24 +0100
Message-ID: <4C45E780.7040704@saxonica.com>
To: Casey Jordan <casey.jordan@jorsek.com>
CC: xmlschema-dev@w3.org
If a group has minOccurs = maxOccurs = 1, you can just replace the group 
reference by the content of the group.

In other cases, you can treat it the same as a singleton sequence or a 
singleton choice - there's no difference, but a sequence seems 
conceptually simpler, since a singleton choice gives you no choice at all.

Michael Kay

On 20/07/2010 18:17, Casey Jordan wrote:
> Friends,
> I have been writing an XML schema validator in javascript. I am done 
> with everything but the required processing for xs:group element.
> It seems to me that an xs:group can be processed identically to an 
> xs:choice declaration.
> The spec is kinda ambigious so I just wanted to make sure I was right. 
> If anyone can substantiate this that would be great.
> Cheers,
> Casey
> -- 
> --
> Casey Jordan
> Jorsek Software LLC.
> "CaseyDJordan" on LinkedIn, Twitter & Facebook
> Cell (585) 348 7399
> Office (585) 239 6060
> Jorsek.com
> This message is intended only for the use of the Addressee(s) and may
> contain information that is privileged, confidential, and/or exempt from
> disclosure under applicable law.  If you are not the intended recipient,
> please be advised that any disclosure  copying, distribution, or use of
> the information contained herein is prohibited.  If you have received
> this communication in error, please destroy all copies of the message,
> whether in electronic or hard copy format, as well as attachments, and
> immediately contact the sender by replying to this e-mail or by phone.
> Thank you.
Received on Tuesday, 20 July 2010 18:14:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:56 UTC