What steps will reproduce the problem?
1. Find or create an XML file containing an element named 'text'.
2. Try to access that element's content via XPath via the findvalue() function
For example, I'm loading lexicon data from a LIFT file within the context of an 'entry' element. This line fails:
lexeme = context.findvalue('lexical-unit/form/text/descendant-or-self::text()', entry)
xpath.exceptions.XPathParseError: Syntax error:
What is the expected output? What do you see instead?
I was hoping it could handle this kind of input file, since I think it's valid XML. But apparently text (even without parentheses) is some kind of reserved word, either in XPath or py-dom-xpath, I'm not sure.
What version of the product are you using? On what operating system?
Version 0.1, fron 2/22/2009, on WinXP SP3 under Python 2.7.
Please provide any additional information below.
Is there an alternate syntax for this kind of thing? Or is there an easier workaround than what I've come up with? (I.e. making a copy of the source file, renaming all of its text elements to textt, and writing my XPaths to match that. Tedious.)