|
Subject: Filtering nodes on other attributes From: Gary Lawrence Murphy <garym@xxxxxxxxxx> Date: 06 May 2000 11:03:43 -0400 |
I'd like to filter a document printout to only include chapters with
specific attribute values; I'd hoped this would be as easy as
giving the command
jade -V STATUS=review tex book.sgml
And having my local stylesheet include
(root
(if ROOTID (process-element-with-id ROOTID)
(if STATUS (process-element-with-status STATUS)
(process-children))))
but, of course, 'process-element-with-status' does not exist so it is
neccessary to invent it. I've started on Prescod' DSSSL tutorial and
the basic building blocks appear to be (attribute-string "status") and
(process-matching-children)
My naive approach to string these together (with a second varable test
to only print a specific chapter) did not work: It prints the whole
document ...
(root
(if ROOTID (process-element-with-id ROOTID)
(if STATUS (process-matching-children
(eq STATUS (attribute-string "status")))
(process-children))))
Am I on the right track? Is there a simple method to do what I want?
--
Gary Lawrence Murphy <garym@xxxxxxxxxx> TeleDynamics Communications Inc
Business Innovations Through Open Source Systems: http://www.teledyn.com
"Computers are useless. They can only give you answers."(Pablo Picasso)
DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: problem with Jade, Carlos Villegas | Thread | Re: Filtering nodes on other attrib, Brandon Ibach |
| problem with Jade, Prapoorna Garimella | Date | Re: problem with Jade, Adam Di Carlo |
| Month |