OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Which elements can be root elements?

[ Lists Home | Date Index | Thread Index ]
  • From: Paul Grosso <pgrosso@arbortext.com>
  • To: xml-dev@lists.oasis-open.org
  • Date: Fri, 23 Jun 2000 12:30:31 -0500

At 09:49 2000 06 23 -0700, Andrew n marshall wrote:
>I can't seem to determine how an XML DTD defines which elements can be
>root elements.  

It doesn't.  Any element can be the document element (which is
what it's called rather than "root element").

>For example:
>
>------------------------------------------------------------------------
>
><?xml version='1.0'?>
><!DOCTYPE a PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>                   "DTD/xhtml1-strict.dtd">
><a href="#">This link IS this document.</a>
>
>------------------------------------------------------------------------
>
>The above seems perfectly legal according to the XML standard, 

It is.

>yet I don't think that was ever intended. 

Yes it was.  (Same this is true for SGML.)

> Am I missing something?

Not really, you're just not believing what you're seeing.

>By the way, I came across this problem when trying to determine whether
>the root DocBook entity should be 'set' or 'book', so it might actually
>make sense to allow multiple possible root elements.

It absolutely does make sense which is why it is allowed.

paul

***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************




 

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

Copyright 2001 XML.org. This site is hosted by OASIS