Re: Bugzilla issue 10, was: Plan to resolve issues in 2518bis

   My DAV implementation (http://svn.red-bean.com/wsanchez/trunk/ 
TwistedDAV/) removes the property value element from the DOM in the  
request and creates a new XML document with that element as the new  
document's root element.  I let the PyXML engine render the new  
document and store the result in the property store for the resource.

   My intention is that when a client requests a property value, that  
the value sent back is semantically equal to the original. It is not  
character-for-character equal.  If you want that, don't send me XML,  
but escape your XML on the way in, and undo that on the way out.

   For example:

     <D:propertyupdate xmlns:D="DAV:" xmlns:A="http://apache.org/foo/">
     <D:set><D:prop><A:prop0><A:value0/></prop0></D:prop></D:set>
     </D:propertyupdate>

   May come back as:

     <D:multistatus xmlns:D="DAV:">
       <D:response>
         <D:href>/foo/</D:href>
         <D:propstat>
           <D:prop>
            <prop0 xmlns="http://apache.org/foo/"><value0/></prop0></ 
D:prop>
           </D:prop>
           <D:status>HTTP/1.1 200 OK</D:status>
         </D:propstat>
       </D:response>
     </D:multistatus>

   I just jiggered that by hand, so the XML may be error-prone, but I  
think the idea should get across.

   Personally, I found the whole notion of preserving XML semantics  
to be quite annoying; it basically means that all of my (dead)  
property storage has to be XML, or I have to tag them as to whether  
they are or aren't XML, but that's even more complexity.

   I'd prefer that XML not be allowed in property values at all.  If  
the values were always CDATA, then the server wouldn't ever have to  
do anything with them at all, which is far more appropriate, I  
think.  And you could always put XML in there escaped as CDATA and  
parse it when you get it back if you need to.  That would require you  
to do what Julian is expecting, which is to make XML in property  
values self-contained and eliminates any ambiguity about who is  
responsible for ensuring that (which I agree should be the client,  
but don't agree that the current spec says so).

     -wsv


On Oct 5, 2005, at 12:38 PM, Lisa Dusseault wrote:

> IMPLEMENTORS -- can we get some sense of what existing server  
> implementations do to preserve prefixes/namespaces in property  
> values?  If I recall correctly,  Xythos WFS preserves the  
> namespaces but generates its own prefixes, and will frequently  
> declare prefixes in another place.

Received on Wednesday, 5 October 2005 20:20:59 UTC