> > My approach doesn't work (at least with microsoft web-folders). This is
> > because it applies to all the properties, and some of these are
> > apparently treated specially. Having the resourcetype property not be
> > <collection/> (exactly. Putting it in a CDATA section is too big a
> > change, apparently) for a directory seems to break MS web-folders.
> 
> I tried that before (use writeData everywhere), but it's not a good idea to
> do that when the property value is an XML node.

Yes, so I found. Basically, slide tries to be extremely general all the
way through (which is definately a good thing!), but we run into
problems once we have to interface with the outside world - all
surmountable problems, but it's hard to catch every point where extra
processing is required.

> 
> More generally, WebDAV makes the implicit requirement that a property value
> is valid XML. I would be considering adding (and enforcing) this requirement
> for Slide.

Well, I just looked. It's actually an explicit requirement (section 4.4
of the RFC) that property values be well formed (but not 'valid', of
course - I guess you were using that in the english-word sense rather
than the technical-xml sense. Confusing language ;-)

> 
> I think we can come up with something nice eventually.
> Here's an option : setProperty could parse the property value to check if
> it's a valid XML fragment, and wrap the value with a CDATA if it turns out
> it's not.

Hrmm. Yes, that sounds like a nice solution (though it's not exactly
trivial to implement in absolute generality, it's not too hard to catch
all the cases where it's ever likely to be an issue (unbalanced tags,
loose special characters, etc, without bothering to check every little
detail - that'd be too slow).

If I have time soon (unfortunately highly unlikely - I'm snowed under
with all sorts of things), I'll do this, but for now your current
solution works.

Michael

Reply via email to