On Wed, 5 Dec 2001, bo wrote: > I wonder if I can determine the relationship among tags, such as tag A > should be within tag B etc. Is that possible? Thanks!
You can use a TagLibraryValidator class to enforce arbitrary characteristics of the XML view of a JSP page, including specific relationships among tags. For an example of a SAX-based approach to validation, see the JstlCoreTLV class in the "Standard" taglib. Tags can also, at runtime, gain access to their parent tag handlers. The most convenient mechanism for doing this is, in most cases, the static TagSupport.findAncestorWithClass() method, part of the JSP API. Hope that helps, Shawn -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>