# HG changeset patch # User paulb # Date 1103571757 0 # Node ID 3538ac58ecce2e65250d58375892b82539c027db # Parent aea4c12cebfd800a3278c5eae4290f032da31285 [project @ 2004-12-20 19:42:37 by paulb] Changed the "this-position" extension function so that only paths to elements are returned. diff -r aea4c12cebfd -r 3538ac58ecce XSLForms/Output.py --- a/XSLForms/Output.py Mon Dec 20 18:56:12 2004 +0000 +++ b/XSLForms/Output.py Mon Dec 20 19:42:37 2004 +0000 @@ -20,10 +20,9 @@ "Generate an XSLForms path to the given 'node'." l = [] - # Attribute reference. - l.insert(0, node.name) - l.insert(0, "/") - node = node.parent + # Skip attribute reference. + if node.type == "attribute": + node = node.parent # Element references. while node is not None and node.type != "document_xml": l.insert(0, str(int(node.xpathEval("count(preceding-sibling::*) + 1"))))