Gianugo Rabellino wrote:
> Guido Casper wrote:
>
>> Maybe having getValueAsString() not skipping non-text elements
>> (although I might not understand what the rationale for this
>> behaviour is) would be enough to support sources without XMLized
>> properties.
>
> Yes, probably. We'll need to discuss that some more, I was hoping
that
> Stephan would show up and join the party...

Ah, I think SourceProperty is modeled after the slide client webdav
lib's BaseProperty class, that skips non-text nodes in
getPropertyAsString() as well.

>
>
>> But I would also like to change SourceProperty.value to only hold
the
>> property child nodes. This would also simplify
>> WebDAVSource.getSourceProperties().
>
> What do you mean exactly? If a (WebDAV, agreed) property is an XML
> element this means that you might have to rebuild it anyhow, so what
> is the point?

Yes you are right.
Now understanding the above said however (SourceProperty is modeled
after the BaseProperty class) in WebDAVSource.getSourceProperty() you
simply could:

    return new SourceProperty(prop.getElement());


However concerning interface design I think if you give the following
input to SPWT:

    <source:props>
      <my:author xmlns:my="my">Me, Myself and I</my:author>
    </source:props>


One would expect that

      WebdavSource.getSourceProperty("my", "author").getValue();

returns:

      Me, Myself and I


and not

      <my:author xmlns:my="my">Me, Myself and I</my:author>

But in order to not break what we have, we can leave it as it is and
make the above change to WebDAVSource.

Guido


Reply via email to