Re: (dsssl) Jade and processing instructions

Subject: Re: (dsssl) Jade and processing instructions
From: Brandon Ibach <bibach@xxxxxxxxxxxxxx>
Date: Tue, 9 Jan 2001 02:56:27 -0600
Quoting jany.quintard@xxxxxxx <jany.quintard@xxxxxxx>:
> Is there a possibility to process PIs (processing instructions)
> using Jade?
> I have not been able to find something about it in the spec.
   I don't think the spec really addresses the issue directly.  To the
best of my knowledge (and recollection... it's been a little while
since I've looked at this sort of thing), the only "automatic" way to
process PIs is with a (query) rule.  I know that some work was done to
support these in a newer version of OpenJade, but I don't recall which
version it was, nor how usable it is.
   The other alternative, which would be most viable if you have some
knowledge of where in your document the PIs will generally occur,
would be to manually locate them while processing some other rule,
such as the (root).
   Using this approach, you could find and process them all at once,
or, if you knew they were all at a certain nesting level within your
document, you could alternate between processing groups of non-PI
nodes and individual PIs, essentially creating your own version of
(process-children) that breaks up the children node list at PIs.
   Of course, if you wanted to get quite elaborate, you could just
generate a (descendants) node-list from the root of the document,
locate all of the PIs within it, and break the processing up as needed
so that you can process the PIs in the appropriate locations.  Of
course, the more you override Jade's built-in traversal of the
document grove, the slower things will tend to be, but if you optimize
the break-up of the "master node-list" enough (and don't have too many
PIs), it might not be too bad.
   Let me know if you need more details about any of this.

-Brandon :)

 DSSSList info and archive:

Current Thread