1.1 --- a/XSLForms/Output.py Sun May 15 19:54:13 2005 +0000
1.2 +++ b/XSLForms/Output.py Sun May 15 23:33:34 2005 +0000
1.3 @@ -80,14 +80,13 @@
1.4 """
1.5
1.6 context = libxml2mod.xmlXPathParserGetContext(context)
1.7 - #context = libxsltmod.xsltXPathGetTransformContext(pctxt)
1.8 transform_context = libxsltmod.xsltXPathGetTransformContext(context)
1.9 name_var = libxsltmod.xsltVariableLookup(transform_context, "this-name", None)
1.10 if multivalue_name is not None:
1.11 name = multivalue_name
1.12 multivalue = 1
1.13 elif name_var is not None:
1.14 - name = name_var[0].content
1.15 + name = libxml2mod.xmlNodeGetContent(name_var[0])
1.16 multivalue = 0
1.17 else:
1.18 name = None
1.19 @@ -96,22 +95,27 @@
1.20 return path_to_node(node, attribute_ref, name, multivalue)
1.21
1.22 def this_position(context):
1.23 + #print "this_position"
1.24 r = path_to_context(context, 0)
1.25 return r.encode("utf-8")
1.26
1.27 def field_name(context):
1.28 + #print "field_name"
1.29 r = path_to_context(context, 1)
1.30 return r.encode("utf-8")
1.31
1.32 def multi_field_name(context, multivalue_name):
1.33 + #print "multi_field_name"
1.34 r = path_to_context(context, 1, multivalue_name)
1.35 return r.encode("utf-8")
1.36
1.37 def new_field(context, name):
1.38 + #print "new_field"
1.39 r = path_to_context(context, 0) + "/" + name
1.40 return r.encode("utf-8")
1.41
1.42 def other_field_names(context, nodes):
1.43 + #print "other_field_names"
1.44 names = []
1.45 for node in nodes:
1.46 name = path_to_node(libxml2dom.Node(node), 0, None, 0)
1.47 @@ -121,6 +125,7 @@
1.48 return r.encode("utf-8")
1.49
1.50 def other_multi_field_names(context, multivalue_name, nodes):
1.51 + #print "other_multi_field_names"
1.52 names = []
1.53 for node in nodes:
1.54 name = path_to_node(libxml2dom.Node(node), 1, multivalue_name, 1)