Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look for the DAV: namespace (it may not be the first), and allow resolving other namespaces. #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

inferiorhumanorgans
Copy link
Contributor

Apple's AddressBook.app sends out XML like this:

<?xml version="1.0" encoding="utf-8"?>
  <x0:propfind xmlns:x1="http://calendarserver.org/ns/" xmlns:x0="DAV:" xmlns:x3="http://apple.com/ns/ical/" xmlns:x2="urn:ietf:params:xml:ns:caldav">
    <x0:prop><x1:getctag/></x0:prop>
  </x0:propfind>

Which doesn't match the xpath query for a propfind as x0 isn't DAV:. This pulls the first DAV: namespace.

@chrisroberts
Copy link
Owner

I have been hacking on the prop bits quite a lot lately as I'm working on getting dav4rack through that section of the litmus. Let me test this a bit against what I have locally before I merge this in.

@inferiorhumanorgans
Copy link
Contributor Author

Interesting. Have you seen anything similar for testing CardDAV compliance? Right now I'm kinda stalled writing some sort of test harness and it's ugly (rspec + xsd + xslt). This is the XML that was tripping me up:

<?xml version="1.0" encoding="utf-8"?>
  <x0:propfind xmlns:x1="http://calendarserver.org/ns/" xmlns:x0="DAV:" xmlns:x3="http://apple.com/ns/ical/" xmlns:x2="urn:ietf:params:xml:ns:caldav">
    <x0:prop>
      <x1:getctag/>
    </x0:prop>
  </x0:propfind>

@chrisroberts
Copy link
Owner

I'm out of time to hack on this stuff until tomorrow, but I'll use that to run some tests against and see what I get.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants