I agree with Frank and Gregor. And an XPath style navigation language is also useful in AspectJ. We are in the process of extending AspectJ minimally by adding a new traversal declaration like aspect Traversals { declare traversal t1 : "Basket//*" ; declare traversal t2 : "Basket//Weight"; } and a new pointcut, like "traversal(t2)" which includes all join points of the traversal from Basket to Weight. pointcut atWeight(Weight o): traversal(t2) && target(o); is a pointcut for defining advice on the traversal t2 for Weight-objects. More on this topic will appear on this list. The XPath expressions are also useful for defining AspectJ type patterns in a more robust way: Types(traversal(t2)) gives the set of classes involved in the traversal from Basket to Weight. It is interesting to observe that the AspectJ cflow construct and a subset of the XPath expressions (using //) are variants of a more general flow construct applied to different graphs (dynamic call graph for cflow and object graph for navigation specifications). -- Karl Lieberherr From users-admin@aspectj.org Wed Feb 20 16:31:55 2002 From: "Gregor Kiczales" To: "Frank Sauer" , "AspectJ User List" Cc: I believe you are exactly right. Karl Lieberherr will probably have more to say about this, but xpath expressions are quite similar to traversal specifications in Demeter. Both these mechanisms are ways of saying cut through the normal structure (XML or class graph) and let me take action at only these places. ----- Original Message ----- From: "Frank Sauer" To: "AspectJ User List" Sent: Wednesday, February 20, 2002 1:01 PM Subject: XSLT and AOP Something just hit me after doing a lot of XML/XSLT work lately. There seems to be similarity between XSLT 'programming' and AOP: your advice here not all XSLT is similar, but if you use the generic technique and let the engine figure out what templates apply it seems to be similar. Also, a single template can have a far reaching effect on many different locations in your XML (as defined by the xpath expressions, which could be considered pointcuts) any thoughts on this? Am I totally off track, or does this make some sense? Frank Sauer