- From: Lisa Dusseault <lisa@xythos.com>
- Date: Tue, 20 Nov 2001 22:35:18 -0800
- To: "Julian Reschke" <julian.reschke@gmx.de>, <mtimmerm@opentext.com>, "'WebDAV'" <w3c-dist-auth@w3.org>
> > 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