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

Handle namespace in props fetched by stat() #210

Open
yoh1496 opened this issue Jun 9, 2020 · 3 comments
Open

Handle namespace in props fetched by stat() #210

yoh1496 opened this issue Jun 9, 2020 · 3 comments

Comments

@yoh1496
Copy link

yoh1496 commented Jun 9, 2020

Hi, I'm implementing PROPPATCH method ( related to #206 ).

I'm writing test codes. ( I'm referring to to webdav-server test code.)

Some properties have namespace such as

  • <namespace:testcustom>Value</namespace:testcustom>
  • <x:testcustom2 xmlns:x="namespace:">Value</x:testcustom2>

but stat function with { details: true } options returns only tagName without namespaces.

Please let me know how to handle namespaces in result XML ?

FYI, I think combination of xpath and xmldom is useful for handling namespace if stat would return raw XML data.

Thanks.

@perry-mitchell
Copy link
Owner

I actually forced it to strip them, as they're not useful for the majority of basic DAV requests. Why would you need the namespaces?

@yoh1496
Copy link
Author

yoh1496 commented Jul 12, 2020

Thank you for responding to me.

According to RFC4918, property names consist of [namespace name], [local name], [attributes], and [children].

Actually, the webdav-server's test has code for testing that you can correctly assign properties named with namespace.

And the reason I need namespaces are that I encountered usecase of using properties with namespace. In that case, PROPFIND result stripped namespaces cannot be used. ( developers have to use PROPFIND method manually. )

If you need more info, please ask.

Thanks

@perry-mitchell
Copy link
Owner

For this I think I would need either:

  • An example service where namespaces are relevant to this webdav client (for file/directory manipulation)
  • Someone to contribute correct namespace handling code, with test cases against webdav-server

Happy to leave this open as an issue.

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

No branches or pull requests

2 participants