ancestor evaluation in Jade SGML transforms (newbie query)

Subject: ancestor evaluation in Jade SGML transforms (newbie query)
From: Kim Plofker <kim@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 22 Apr 1999 11:45:14 -0400 (EDT)
I'm using Jade for an SGML->SGML transformation that's supposed to assign
an attribute to the current node based on whether _any_ ancestor of
that node has a particular value of a particular attribute; and I'm 
stumped.  I can successfully use the "ancestor" function to perform this
test on the nearest ancestor with a particular GI, as follows:

(default (make element
                attributes: (if
			     (equal?
			       (attribute-string "AncestorAtt" 
				      (ancestor "AncestorGI" (current-node)))
			       "AncestorAttValue")
			     '("NewAtt" "NewValue")
			     '("NewAtt" "AlternateValue")
			     )
		))

   But I can't figure out how to test whether _any_ ancestor of 
current-node has attribute AncestorAtt with value AncestorAttValue.
(Various experiments with the "ancestors" function result in the 
error message "reference to undefined variable 'ancestors'".)  Can
anybody steer me to the right path?  Thanks,

Kim Plofker




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


Current Thread