Re: Node list notation for examples

Subject: Re: Node list notation for examples
From: Tony Graham <tgraham@xxxxxxxxxxxxxxxx>
Date: Wed, 5 Nov 1997 13:02:36 -0500 (EST)
At 5 Nov 1997 11:45 -0500, Chris Maden wrote:
 > I think a shorthand for some of the crucial information could be
 > developed.  The node type, and the system data (for PIs and SDATA
 > entities) or GI (for elements) would be a start: "((element: PARA)
 > (pi: "troff .ti 75") (element: PARA))" is somewhat verbose, but more
 > informative.

If we are mostly talking about nodes of class "element", and we mostly
identify elements by their GI (i.e. their "gi" property), then perhaps
the default representation should be the GI of the element.  The
pattern in match-element?, select-elements, and q-element uses the
bare GI, but they are all explicitly matching nodes of class

What if the "element:" keyword were ommissible?

Here's a test case for trying out representations:

<para id="p1001" role="example">
This is an <emphasis>example</emphasis>.</para>

Trying out ideas, this could be represented as any of the following:

(element: PARA)

(element: PARA (attr: ID attr-assignment: "P1001")
               (attr: ROLE attr-assignment: "example"))

(PARA (attr: (ID "P1001") (ROLE "example")))

(PARA (attr: (ID "P1001") (ROLE "example))
  "This is an "
  (EMPHASIS "example")

(PARA attr: children:)

The last example, in particular, is more useful for examples or
illustrating a pattern than it is useful as a debug dump.

Representations such as these, i.e. that use lots of parentheses,
might not go over too well if used with XSL.


Tony Graham
Tony Graham
Mulberry Technologies, Inc.                         Phone: 301-315-9632
17 West Jefferson Street, Suite 207                 Fax:   301-315-8285
Rockville, MD USA 20850                 email: tgraham@xxxxxxxxxxxxxxxx

 DSSSList info and archive:

Current Thread