[
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
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/
|