blind-coder/rcmcarddav — pull request #8 by adobo (2013-05-22 11:15:38+00:00)
Title: Change XPath custom prefixes to avoid conflicts

If any of the prefixes defined in `carddav_common::registerNamespaces()` is
already used in the XML document generated by the CardDAV server, SimpleXML
will ignore it if it doesn't identify the same namespace, so XPath
queries will not use it as expected. More info can be found on the following StackOverflow question: http://stackoverflow.com/questions/16668780/how-to-solve-a-naming-conflict-when-specifying-a-custom-prefix-using-xpath .

In fact, DAViCal uses 'C' as the prefix for the CalDAV namespace, but the module tries to use it for CardDAV, so they conflict and most XPath queries just don't work.

This PR changes XPath prefixes to other ones that aren't likely to be
already used.

This change is really necessary to make the module work on certain CardDAV servers.