[
Lists Home |
Date Index |
Thread Index
]
Steven R. Newcomb scripsit:
> Exactly what I'm wondering, Len. I think so, but I'm
> not comfortable enough with RNG yet to commit myself
> on this question.
I am doing a bit of thinking about what AFNG (to go
with RNG) might look like. Preliminary sketch soon.
> (And when someone does
> this, typically someone else says, "You mean CONCUR?",
> whereupon everyone present makes a rude noise. The
> CONCUR feature of SGML was an earlier attempt to
> address some of the same requirements.)
If I understand this, I actually reinvented CONCUR a couple
of years ago, when I was first thinking about possible ways
of representing non-hierarchical structures. The trick
was to choose a Thoroughly Useless Name Char (I forget
what I picked originally, but U+06DD ARABIC END OF AYAH
will do nicely), and then represent multiple hierarchies
as follows:
1) Every distinct hierarchy gets a distinct name, for use
in making it real later.
2) Every start-tag is represented as an empty-tag with
an element type of HierarchyName+Useless+RealName.
3) Every end-tag is represented as an empty-tag with
an element type of HierarchyName+Useless+RealName+Useless.
4) Every empty-tag is represented by a start-tag followed
by an end-tag.
5) The whole document is wrapped in a new root element which
marks it as being multiple-hierarchy.
Then it is easy to pull out a specific hierarchy, by ignoring
tags with the wrong hierarchy name and converting the good
ones to proper start-tags and end-tags.
Likewise it is easy to "bias" toward a particular hierarchy,
by converting the tags of the specified hierarchy as above,
but leaving the other tags alone.
This scheme predates namespaces.
--
John Cowan http://www.ccil.org/~cowan cowan@ccil.org
Please leave your values | Check your assumptions. In fact,
at the front desk. | check your assumptions at the door.
--sign in Paris hotel | --Miles Vorkosigan
|