Re: Two questions: (sgml-parse) and (data)

Subject: Re: Two questions: (sgml-parse) and (data)
From: James Clark <jjc@xxxxxxxxxx>
Date: Fri, 30 May 1997 12:14:21 +0700
At 22:06 29/05/97 -0900, W. Eliot Kimber wrote:
>Two questions, largely unrelated except by arising from the same document
>1. I've figured out a way to get the content of an element in order to set the
>   running head. 

I would suggest something like:

   left-header: (with-mode header (process-first-descendant 'title))

(mode header
  (element title (process-children))

This will also work better when title has substructure.

>2. Autonumbering through sgml-parse
>I got sgml-parse to work for processing subdocuments (very cool, I must
>say--I had the document already and was just waiting for the function to be
>implemented), but realized that I don't know how to look up through the
>reference in order to autonumber the document element of the included
>subdoc based on the child number of the referencing document. 

I don't see any way to do this in DSSSL at the moment.

>Is there a way to get back to the element from which the subdoc was
>referenced so that I can count it?  I thought the (source) function would
>do it, but (source) doesn't appear to be supported by 0.8.

The source property is on nodes in auxiliary groves; (sgml-parse) returns a
normal SGML grove, not an auxiliary grove.

If I'm right and there's no way to do this, then this is clearly a defect in
DSSSL that must be fixed.  I don't think any solution in terms of grove
properties is going to work since you can have the same grove being included
in multiple places.  One possible solution is the first-class-modes kind of
thing I mentioned a couple of days ago: this allows you to pass information
down into the processing of the subdocuments.  Another possibility would be
some facilities for counting in the flow object tree.


 DSSSList info and archive:

Current Thread