Hello, I've been experimenting with the org.dom4j.rule.* package and was
wondering if there were plans to add support for named template rules and
adding a callTemplate(String name) method to the Stylesheet class?
Currently I extend Rule and Stylesheet to add this behavior, but if others
could see a use for it, then I could work on a patch for Rule and
Stylesheet.
Also, I think the Action interface is somewhat deficient in that it has no
way to get a reference to the associated Stylesheet. Actions might need
their Stylsheet so that they can call applyTemplates(...). This is
equiv. to the following xsl:
<template match="/">
<apply-templates select="myelement"/>
</template>
would become the following Rule/Action:
new Rule(DocumentHelper.createPattern("/"), new Action() {
run(Stylesheet stylesheet, Node contextNode) {
stylesheet.applyTemplates(contextNode, "myelement");
}
}
);
Or am I missing something about how to implement an Action?
Regards,
--mike
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user