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

Re: A parentless element that is not the document node -how?


dangling elements
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@e...                    | Washington,DC XML Users Grp
URL:  http://www.eccnet.com          | http://www.eccnet.com/xmlug
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/  


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.