[SR-Users] xmlops & XPath question

Alex Balashov abalashov at evaristesys.com
Sat May 3 10:33:04 CEST 2014

On 05/03/2014 04:31 AM, Daniel-Constantin Mierla wrote:

> This kind usage of xmlns in an xml doc is a hack done by SIMPLE WG
> breaking XML standard, because any ns has to use a prefix for each
> corresponding name. If you search on google, you will fine some
> discussions on the web (iirc, Inaki was there as well) - libxml2 devs
> said they don't want to break the xml standard to handle this case,
> probably they didn't change the mind meanwhile.
> Anyhow, set a prefix for the namespace via xml_ns parameter and then use
> it in xpath
> modparam("xmlops", "xml_ns", "di=urn:ietf:params:xml:ns:dialog-info")
> $xml(u=>xpath:/di:dialog-info/di:dialog[1]/di:state/text())
> Hope i remembered correctly, anyhow it is somewhere in this direction.
> If not, search on mailing list archive, the situation popped up few
> times around.

Thanks Daniel. I was heading in this direction, too, before I got lazy 
and just hacked out the xmlns attribute with {re.subst}. :-)

Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

More information about the sr-users mailing list