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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] A parentless element that is not the document node -how?

[ Lists Home | Date Index | Thread Index ]

On Mon, 4 Aug 2003, Roger L. Costello wrote:

> Hi Folks,
> 
> The XSLT 2.0 spec talks about "parentless elements".  As far as I know,
> there can only be one element in a source document that is parentless -
> the document node.  Yet, the XSLT 2.0 spec seems to suggest that there
> may be other parentless element nodes.  Can someone tell me what they
> may be?  /Roger
> 
> 

I always called these things "dangling elements".  I don't know if there
is a correct term for them.  Near and Far (formerly Microstar product) is
the only graphical tool that I know of that actually displays these
'freaks of nature'.  I really wish that tools like XML Spy and
Extensibility would provide the same functionality as Near and Far for XML
Schema's.  Although I don't create DTDs in a graphical tool - Near and Far
is the greatest QA and presentation tool for a DTD.

In SGML I considered these 'dangling elements' poor design (usually
occuring when an organization has created large modular DTD's and when
reuse of the various modules are incorporated into new DTD's, the
'dangling elements' are not used in any content models.  SGML parsers
usually flag the 'dangling elements' as warnings and not errors.  Also, I
have seen SGML DTDs that have been created with more than one root element
by design (also I consider it a poor practice) so that authors could start 
a document at different levels.

My interpretation of the XML specification is that these 'dangling
elements' are errors because there can only be one 'root' element and the
'dangling elements' can be considered a 'root' element because they are on
the same hierarchical level. An XML parser should flag these 'dangling
elements' as an error.

Betty

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Betty Harvey                         | Phone: 410-787-9200 FAX: 9830 
Electronic Commerce Connection, Inc. |        
harvey@eccnet.com                    | Washington,DC XML Users Grp
URL:  http://www.eccnet.com          | http://www.eccnet.com/xmlug
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/  





 

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

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