cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianugo Rabellino <>
Subject Re: SourcepropWritingTransformer
Date Wed, 27 Aug 2003 10:22:00 GMT
Guido Casper wrote:

> 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

Yes, I see your point. It would be easy to get the value as a string, 
but what happens if value is an XML fragment? I'm wondering if it's safe 
to assume that if you call getPropertyValueAsString you know what you're 
doing so that you know that there will be no nested XML. I'm also 
thinking about dealing separately with the two cases, so that when value 
is just element + text node return just the text node, and return the 
(String) XML representation otherwise so that

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


Me, Myself and I


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

returns the untouched XML. Is that overcomplicated?


Gianugo Rabellino
Pro-netics s.r.l. -
Orixo, the XML business alliance -
     (Now blogging at:

View raw message