W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > December 1996

Re: RS/RE, again (sorry)

From: W. Eliot Kimber <eliot@isogen.com>
Date: Wed, 18 Dec 1996 07:46:13 -0900
Message-Id: <>
To: w3c-sgml-wg@w3.org
At 06:24 PM 12/17/96 -0800, Jon Bosak wrote:
>[Chris Maden, summarizing a number of replies to my question:]
>| TEI and, I believe, HyQ, use sibling relationships for addressing;
>| e.g., start at the element whose SGML ID is "foo" and traverse three
>| nodes to the right.
>| If DTD-less parsing creates spurious CDATA nodes, then the target of
>| an address can be different from that for a DTD-ful parse.
>What this seems to add up to is that treeloc uses a different way of
>thinking about what a sibling is than I do.  

How do you think of "sibling" that doesn't include the data characters
in mixed content?

Note that the SGML property set makes either every data character node (or
other node type that can occur in the content of an element) or contiguous
lists of data character nodes children of elements along with elements.
There is no way to exclude data from the content tree without excluding
those nodes completely from the grove.

Having said that, it's certainly possible to define a query that ignores
data nodes and only looks at element nodes in the content tree.  E.g., in

;; Function to address only subelements the element content tree:
(define subelement-treeloc treepos
 (; function definition goes here--no idea how to do it off the top
  ; of my head.  I guess you'd have a function that calculates the
  ; the subelement number of each subelement and recurses down each
  ; level of the tree by matching child numbers in the treepos
  ; specification, returning when it runs out of treepos values or
  ; fails to find a node.

I'm sure there's the equivalent for TEI locators.  (It would, I think, be
an interesting exercise to define the SDQL functions that would implement
the TEI locator syntax--hmmm, a person could learn both in one go with that

It would be possible for XML to define its own property set distinct from
the SGML property set and define all XML processing in terms of that
property set.  However, that would *seriously* undermine the claim that XML
is SGML as they would now have fundamentally different data models.  I
wouldn't recommend it.



W. Eliot Kimber (eliot@isogen.com) 
Senior SGML Consulting Engineer, Highland Consulting
2200 North Lamar Street, Suite 230, Dallas, Texas 75202
+1-214-953-0004 +1-214-953-3152 fax
http://www.isogen.com (work) http://www.drmacro.com (home)
"Rats in the morning, rats in the afternoon...if they don't go away, I'll be
re-educated soon..."                 --Austin Lounge Lizards, "1984 Blues"
Received on Wednesday, 18 December 1996 09:47:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:25:05 UTC