[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

CDATA question

Subject: CDATA question
From: "Uslu, Cihan Y (MED)" <Cihan.Uslu@xxxxxxxxxx>
Date: Wed, 14 Apr 2004 15:57:10 -0500
html cdata
Hi,
I have the following XML structure, and the extract from the XSLT script
which is not producing the desired output. What would be the best way to
get desired output?
 
Thanks,
 
-----------------------------
.................
<distractor>
    <para>Select the<emphasis>GPO Part Additional Info</emphasis> link
in the <emphasis>Navigation</emphasis>screen</para>
</distractor>
......
-----------------------------
 
XSL file:
------------------------------------------------------------------------
--------
<xsl:....cdata-section-elements="mattext feedback">
............
<xsl:template match="distractor | answer">
 <xsl:choose>
 <xsl:when test="(ancestor::assessment[@teds-type = 'M']) or
(ancestor::assessment[@teds-type = 'T']) or
(ancestor::assessment[@teds-type = 'U'])">
 <response_label>
  <material>
   <mattext texttype="text/html">
                <xsl:apply-templates/>
   </mattext>
  </material>
 </response_label>
 </xsl:when>
  </xsl:choose>
</xsl:template>

<xsl:template match="para">
 <xsl:apply-templates/>
</xsl:template>
 
<xsl:template match="emphasis">
 <b><xsl:apply-templates/></b>
</xsl:template>
 
------------------------------------------
 
Current output: 
<material>
<mattext texttype="text/html"><![CDATA[Select the ]]><b>GPO Part
Additional Info</b><![CDATA[ link in the ]]><b>Navigation</b><![CDATA[
screen.]]></mattext>
</material>
 
Desired Output
<material>
<mattext texttype="text/html"><![CDATA[Select the <b>GPO Part Additional
Info</b> link in the <b>Navigation</b>screen.]]></mattext>
</material>
 
---------------------------------------------

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.