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: Casey Jordan <casey.jordan@jorsek.com>
Date: Tue, 20 Jul 2010 15:20:37 -0400
Message-ID: <AANLkTil5NLXrzXLwnBbgPt880GUei4gDlv34Ngh0f_Dw@mail.gmail.com>
To: Michael Kay <mike@saxonica.com>
Cc: xmlschema-dev@w3.org
That is good to know.

It looks like for efficiency purposes I am going to pre-process the schema
and flatten/resolve all group declarations into choice|sequence|all. For
schemas with heavy use of groups it will mean a little more wait time up
front but for validations on the client it will save considerable time.

Thanks guys this helps alot.

Cheers,

Casey

On Tue, Jul 20, 2010 at 2:14 PM, Michael Kay <mike@saxonica.com> wrote:

> 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
> Saxonica
>
>
> 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.
>>
>
>


-- 
--
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 19:21:05 GMT

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