Computational nut?

S

Soren Kuula

Hi,

For those of you who like something to think about:

If I give you a DTD, can you (tell me how to) return to me a regular
language over elements on document order in documents that are valid
wrt. the schema?

Ex.:

<!ELEMENT a (b|c)>
<!ELEMENT b (d*)>
<!ELEMENT c(b)>

A valid document

<a>
<b>
<d/> <d/>
</b>
</a>

Parser's document order start tag encounters: a b d d

A regex (just hand made) that should work: a ( (b d*) | ( c b d* ) )

Now generalize :)

Or maybe I'm stupid; is it regular at all -- generally? With cycles in
the schema (x may contain x, and also y, which may contain x ... etc)

;)

My only observation is that descendants go before siblings.

Soren
 
S

Soren Kuula

Soren said:
Hi,

My only observation is that descendants go before siblings.

and that regular languages over regular languages are still regular?

Soren
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,001
Messages
2,570,255
Members
46,852
Latest member
CarlaDowle

Latest Threads

Top