RE: content type for WebDAV request/response bodies, was: [ACL] Access Control Protocol -07 submitted

> > To get the namespace URI and local name from a property URI, just scan
> > backwards for the last '#', '/', or ':', and split the URI.  If the left
> > part ends in #, then remove it.
>
> That doesn't give you a one-to-one mapping.
>
> For instance:
>
> <foo xmlns="http://a.b.c/d#"/> and <foo xmlns="http://a.b.c/d"/>
>
> would map to the same URI.
>
> How would you map
>
> <foo xmlns="http://a.b.c/d#e"/>

I've seen this done before.  MTimmerman's rules for undoing the
concatenation were correct as I recall, but he didn't put the rules for
concatenation in, which would have cleared things up.
 - If the namespace ends in '/' or ':', concatenate.
 - If the namespace ends in anything else, add a '#' and concatenate.

Thus, you'd transform <foo xmlns="http://a.b.c/d#"/> to
"http://a.b.c/d##foo".  Clearly different than "http://a.b.c/d#foo" since
you only remove the last '#' when un-concatenating.

You ask how to map <foo xmlns="http://a.b.c/d#e"/>: since it ends in 'e',
add a '#', and it becomes "http://a.b.c/d#e#foo".  When going back to real
XML form, scan backward from the end for the last '#', remove it.


Lisa

Received on Wednesday, 21 November 2001 13:37:37 UTC