Reading XML namespaces
Adam Tauno Williams
awilliam at whitemice.org
Sat May 15 17:43:53 EDT 2010
On Sat, 2010-05-15 at 23:25 +0200, Stefan Behnel wrote:
> Ah, you didn't provide that information in your initial post. So you
> control neither the document nor the XPath expression, right?
Correct.
> Can't you get the namespace-prefix mapping from your user?
Nope. Or they are not going to be expecting to have to [since this works
just fine in Java, which for this feature we are pretty much porting
from].
> After all, he/she is the only one who knows the meaning of the XPath expression.
??? The namespaces are embedded in the document. Personally I find it
odd I have to tell xpath about the namespace of the document it is a
$*&@(*& method of.
> I'd just reject any expression with an undefined prefix.
Which I'm okay with; whether the prefix is undefined can be determined
from the document!
> BTW, I'm still not sure I understand your problem. Could you provide some
> more details?
This is an action in a workflow action (business process modeling). It
has an input message of an XML document and a parameter of an xpath; it
invokes a subordinate action [think: foreach] for each node resulting
from the expression.
--
Adam Tauno Williams <awilliam at whitemice.org> LPIC-1, Novell CLA
<http://www.whitemiceconsulting.com>
OpenGroupware, Cyrus IMAPd, Postfix, OpenLDAP, Samba
More information about the Python-list
mailing list