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

xml-add_ns: properly handle namespace definition w/o prefix #5007

Closed

Conversation

ksmurchison
Copy link
Contributor

More correct fix for #4489. Supersedes #5003

@dilyanpalauzov
Copy link
Contributor

Will this work when the same prefix is overwritten for a child, like this PROPFIND request:

<D:propfind xmlns:D='DAV:'>
 <D:prop>
   <D:calendar-color xmlns:D="http://apple.com/ns/ical/"/>
   <D:calendar-color/>
 </D:prop>
</D:propfind>

?

@ksmurchison
Copy link
Contributor Author

Will this work when the same prefix is overwritten for a child, like this PROPFIND request:

<D:propfind xmlns:D='DAV:'>
 <D:prop>
   <D:calendar-color xmlns:D="http://apple.com/ns/ical/"/>
   <D:calendar-color/>
 </D:prop>
</D:propfind>

?

Is this even valid XML?

@dilyanpalauzov
Copy link
Contributor

Why should it be invalid XML? Everywhere the empty string can be used as namespace prefix, some other string can be used on this place as prefix, too.

@ksmurchison
Copy link
Contributor Author

In the example above it states that D: is for DAV. Then you have a single property that defines D: to something else for its our purpose. I'm questioning whether that is legal and/or would any sane client actually do that.

@dilyanpalauzov
Copy link
Contributor

I think my example is legal. Irrespecitive of this, the next example should undoubtfully be valid. Will your change work for PROPFIND?

<propfind xmlns='DAV:'>
 <prop>
   <D:uu xmlns:D="http://abc.de/ef/ghi/"/>
   <D:calendar-color xmlns:D="http://apple.com/ns/ical/"/>
   <calendar-color/>
 </prop>
</propfind>

@ksmurchison
Copy link
Contributor Author

@dilyanpalauzov Yeah. Good point. I'm going to close this and will ask you to extend the Caldav:calendar_setcolor test to include the set of problematic PROPFINDs in your #5003 PR

@ksmurchison ksmurchison deleted the xml_add_ns_no_prefix branch August 28, 2024 17:19
This pull request was closed.
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