[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

No Subject

  • From: roddey@u...
  • To: xml-dev@i...
  • Date: Mon, 17 May 1999 12:23:00 -0600

No Subject



>From: Lars Marius Garshol <larsga@i...>
>Date: 14 May 1999 09:03:17 +0200
>Subject: Re: Again wit da AND and Repetitions
>
>* John Cowan
>|
>| IIRC the canonical way of doing (A & B & C) is to transform it into
>| (A | B | C)* and then do a post-check that each of A, B, C appears
>| exactly once.  As opposed to brute-force expansion into a DFA.
>
>Hmmm. It sounds as if this could be extended to handle {n,m}A as well.
>Just transform it into A+ (or *, depending on n) and do a post-check
>that the number is correct.
>
>In fact, this solution looks relatively easy to implement.
>

I don't think it would work in the general sense, because you have lost the
original semantics of the model when you convert it. You would need some way to
'attach' the original semantics onto particular states of the DFA.

For instance, this model:

     ( (A{1..2},B,C,D?,E?) | (A{3..5},B,C,D,E))

If you converted this to:

     ((A+,B,C,D?,E?) | (A+,B,C,D,E))

And you got a content of:

     A,A,B,C,D,E

what would you do to go back and check it? The original content model is pretty
unambiguous. If you get one to two As, then D and E are optional. If you get 3
to 5 As, then D and E are not. But in the DFA, that would be pretty ambiguous,
wouldn't it? How would you know which of them was the one that the DFA
considered a match? How would you associate some end state (in the very
interwoven set of states that a DFA would create for this model) with some
auxillary data structure that you would use to go back and post check it?

I admit I might be missing something here and didn't have a lot of time to think
this argument out. I think I could have come up with a much worse scenario, but
this one seems hard enough on the surface of it?



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


  • Follow-Ups:
    • Re: none
      • From: Lars Marius Garshol <larsga@i...>

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.