W3C home > Mailing lists > Public > www-forms@w3.org > April 2006

Re: How does Xforms handle CDATA?

From: David Landwehr <david.landwehr@solidapp.com>
Date: Thu, 20 Apr 2006 08:35:53 +0200
Message-ID: <44472BC9.4090306@solidapp.com>
To: Flinton Adam <Adam.Flinton@cfh.nhs.uk>
Cc: www-forms@w3.org

Hi Adam,

The short answer is yes :)

The XPath datamodel does not have a separate node type for CDATA. The 
CDATA and the Text nodes both represent textual data and have to be 
treated in the same way. The XPath datamodel is always normalized and
character data is always merged (when siblings). See also 
http://www.w3.org/TR/xpath#section-Text-Nodes

Best regards,
David

Flinton Adam wrote:
> If I have an element such as:
>
> <text><![CDATA[Some<strong> StoryBoard text goes here test text
> </strong>complete <u>with all</u> <em>sorts of markup</em><br />]]>
> </text>
>
> In an instance, I would like to be able to get that text into a
> textarea.
>
> Such as:
>
> <xforms:textarea class="richtext" ref="narative/text/text()" >
>                                 <xforms:label />
>                                 <xforms:hint>Where the Storyboard text
> goes</xforms:hint>
>                             </xforms:textarea>
>
>
> Will/Should XForms return me the content of the text element (including
> the cdata)?
>
>
> Adam
>
> This e-mail is confidential and privileged. If you are not the intended recipient please accept our apologies; please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Please inform us that this message has gone astray before deleting it. Thank you for your co-operation.
>
>
>
>   


-- 
--------------------------------------------
David Landwehr (david.landwehr@solidapp.com)
Chief Executive Officer, SolidApp
Web: http://www.solidapp.com
Office: +45 48268212
Mobile: +45 24275518
--------------------------------------------
Received on Thursday, 20 April 2006 06:35:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:03 GMT