XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Does DTD allow deriving all possible paths in an XMLdocument?

On Mon, Oct 12, 2009 at 07:10:26PM -0400, ycao5@scs.carleton.ca wrote:
>     I have one question about XML DTD. In a paper, the authors say that 
> DTD allows deriving all possible paths from the root to the leaves 
> appearing in related XML documents. Does this statement correct? Based on 
> my knowledge, DTD may not contain all possible elements in an XML 
> document. I would like to get your opinion. Thanks.

If you say that the XML document must be dtd-valid, then all elements
in the document must be listed (and defined) in the DTD.

A ontent model like
<!ELEMENT mayhem ANY>
means that "mayhem" elements may contain any elements at all as children
(as well as text), but for the document to be valid the elemets must
still be declared.

However, it is not possible to precompute all paths to leaves, because
(1) mayhem could have any elements as children
(2) a recursive content content model does not generate a finite
    grammar - there's an unbounded set of possible valid input
    documents.

e.g. <!ELEMENT doll (doll?)>
allows
    <doll><doll><doll /></doll></doll>
to any depth.

These two points, ANY and cursion, are also rtue for SGML.

Liam


-- 
Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/
http://www.holoweb.net/~liam/ * http://www.fromoldbooks.org/


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS