HI Daniel thanks a lot.
Each xcap document is stored for a specific user, whose ID is taken from first parameter of xcap_put(...)/etc. Now the user id can be the same as in xcap url or something known only internally, looked up via some logic in config. In this way you have full flexibility, not hardcoding to use only what xcap url gives. Also, as you notice, the xcap url can have different variants, you can normalized to a desired one by script operations.
Yes, it make sense.:)
Not sure you spotted yet, there is a tutorial that might be useful reading as well:
Yes, I have read your great tutorial.
BTW, it seems jitsi does not support RLS at this moment even though it store the contact list in the xcap?? I guess I should asked this in the jitsi mailing list.
min