Accept-Language is also used to provide the script with the wanted language.
For calendar server in first line. For example the language of the country tag.
Roads and telephone numbers are pretty language independant, but country names not.
There might be other tags as well that has different value per language.
The xpointer is "abused" to provide a pointer into the run script.
for c in code:
(p, ext) = os.path.splitext(c.href)
if ext in valid_scripts:
for c in code:
(p, ext) = os.path.splitext(c.href)
if ext in valid_scripts:
- exe = os.path.join(os.path.abspath(dirname)+'/'+c.href)
- xml = subprocess.Popen([exe],stdout=subprocess.PIPE)
+ exe = []
+ exe.append(os.path.join(os.path.abspath(dirname)+'/'+c.href))
+ if c.xml_select(u"//xi:include[@accept-language]"):
+ alang = c.xml_attributes[None, "accept-language"]
+ exe.append("lang="+alang)
+ if c.xml_select(u"//xi:include[@xpointer]"):
+ exe.append("xptr="+c.xpointer)
+ xml = subprocess.Popen(exe,stdout=subprocess.PIPE)
xstr = bindery.parse(str(xml.stdout.read()))
idp = c.xml_index_on_parent
for x in xstr.xml_children:
xstr = bindery.parse(str(xml.stdout.read()))
idp = c.xml_index_on_parent
for x in xstr.xml_children: