Re: Hypergroves

Subject: Re: Hypergroves
From: Eliot Kimber <eliot@xxxxxxxxxx>
Date: Mon, 22 Feb 1999 23:13:43 -0600
Russell Steven Shawn O'Connor wrote:
> 
> On Sun, 21 Feb 1999, Avi Kivity wrote:
> 
> > > More specifically I want to get an attribute out of another SGML
> > > file that
> > > is pointed to by my current documents.  Can I even do this with the
> > > current version of jade?
> > >
> > Yes, you can. The (sgml-parse) procedure will take an entity system id
> > (=filename) representing an SGML document and return a grove.
> > This is commonly used in conjunction with ENTITY attributes.
> > It works very well with Jade.
> 
> Great.  This is exactly what I want.  However to be more general I want to
> use formal public identifiers.  I'm assuming I want to use a name such as
> "-//Russell O'Connor//DOC name here//EN"
> 
> What do I want to use to say that my file is an SGML document? What
> characters am I allowed to use in "name here"? Is there a standard way of
> escapeing characters that I'm not allowed to use? (obviously "//" won't be
> allowed) Is there a length restriction on FPI? I'm a little concerned that
> mine will get long.

Declare your documents as NDATA (or CDATA) entities with a notation of
SGML:

<!NOTATION SGML PUBLIC "ISO 8879:1986//NOTATION Standard Generalized
Markup Language//EN" >

<!ENTITY mydoc PUBLIC "-//Russel O'Connor//DOCUMENT whatever//EN" NDATA
SGML" >

Note that the details of the public identifier of the entity are
irrelevant--it's the public identifier (or, more generally, the external
identifier--it could be a persistent URL or URN, for example) of the
notation that is important here.

In a fully generalized application, you would use the notation of the
entity to determine what software to use to construct a grove from the
entity. In this case, the entity is an SGML document, so you'll use the
sgml-parse function to construct an SGML document grove from an SGML
document. 

The generalized algorithm is:

1. Get entity node from entity name in attribute value
2. Get notation node from entity node
3. Get external ID for notation
4. Using the external ID (public ID or system ID, whichever you have)
select
   the appropriate grove construction function (In Jade, you only have
one
   choice out of the box, sgml-parse, but in a more complete system, you
might
   have many different grove constructors, e.g., the GroveMinder product
(from
   TechnoTeacher or my PHyLIS system (www.phylis.com)).
5. Pass the entity node to the grove constructor and get the root of a
new grove
   back.

In your case, since you probably already know that your attribute will
only be pointing to SGML documents, you can bypass the first four steps.

Cheers,

E.


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread