xsl-list
[Top] [All Lists]

Re: [xsl] how to include nodes inside CData tags

2013-04-30 08:21:53
On 30 April 2013 14:16, Terry Ofner <tdofner(_at_)gmail(_dot_)com> wrote:
I need to generate the following format:

<question>
<![CDATA[The city council passed the new <strong>regulation</strong>.]]>
</question>

from this input:

<question>The city council passed the new 
<strong>regulation</strong>.></question>

when I add cdata-section-elements="question" to my xsl:output statement, I 
get this results:

<question><![CDATA[6. The city council passed the new 
]]><strong>regulation</strong><![CDATA[.]]></question>


Is there a way to include the <strong> element in the CDATA?

You will need use the serialize() function in XSLT 3.0 on the
<question> contents, or the equivalent extension in 2.0.


-- 
Andrew Welch
http://andrewjwelch.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>