Hi,

We probably should call the "trim()" in SimpleTypeMapperExtension.

Thanks,
Raymond

----- Original Message ----- From: "Venkata Krishnan" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, October 08, 2006 2:55 AM
Subject: About Node2Object Databinding Transformer


Hi Raymond,

Presently the :
org.apache.tuscany.core.databinding.xml.Node2Objecttransformer's
'getText' method returns the xml text as is packed with
whitespaces.  Can it return the text after trimming it ? ...

protected String getText(Node source) {
       if (source instanceof Document) {
           source = ((Document)source).getDocumentElement();
       }
       return source.getTextContent().trim();
   }

The reason I ask for this is that it makes a difference when configuring
component properties. i.e.

<property name="greeting">Hi There</property>

is different from ...

<property name="greeting">
     Hi There
</property>

The second one returns the property value packed with whitespaces (including
the newline char).  Also for numerical property values we might have have
problems in parsing.

Thanks

- Venkat



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to