cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guido Casper" <>
Subject Re: SourcepropWritingTransformer
Date Wed, 27 Aug 2003 09:22:24 GMT
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
> 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
>> 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:

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

One would expect that

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


      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.


View raw message