Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem displaying <![CDATA[]] with IE and Mozilla

Status
Not open for further replies.

pie3141516

Programmer
Mar 28, 2005
13
US
I use a style sheet to display xml code.
I am having a problem with rendering a <![CDATA[]]> segment in Mozilla. It works well with Internet Explorer.

Here is a link to the xml:


Open the link with IE, then with Mozilla.
(I use Mozilla ver 3.0.3)
You will see that the Lipid Profile appears
screwy in Mozilla, but it is fine in IE.

I'm stumped. Am I coding the <![CDATA[]]>
wrong?


Here is the xml code snippet:
////////////////////////////////////////////////////////

<TestResult>
<Value><![CDATA[<<]]>173<![CDATA[>> ]]></Value>
<Units><Unit>mg/dL</Unit></Units>
<Description><Text><![CDATA[
Total Cholesterol/HDL Ratio:CHD Risk
Coronary Heart Disease Risk Table
Men Women
1/2 Average Risk 3.4 3.3
Average Risk 5.0 4.4
2 X Average Risk 9.6 7.1
3 X Average Risk 23.4 11.0
Use the calculated Patient Ratio above and the CHD Risk table
to determine the patient's CHD Risk.
]]></Text></Description>
</TestResult>

////////////////////////////////////////////////////////

Here is the style sheet snippet:

////////////////////////////////////////////////////////

<tr> <!-- the problem is in this segment, it works for IE but not Mozilla -->
<td width="40%">
<strong class="clinical">
<xsl:value-of select="a:Description/a:Text"/>
</strong>
</td>
<xsl:choose>
<xsl:when test="a:Flag/a:Text!=''">
<td width="20%" bgcolor="#ff00ff">
<xsl:value-of select="a:TestResult/a:Value"/>
<xsl:value-of select="a:Flag/a:Text"/>
</td>
</xsl:when>
<xsl:eek:therwise>
<td width="20%">
<xsl:value-of select="a:TestResult/a:Value"/>
<xsl:value-of select="a:Flag/a:Text"/>
</td>
</xsl:eek:therwise>
</xsl:choose>
<td width="20%">
<xsl:value-of select="a:NormalResult/a:Normal/a:Value"/>
</td>
<td width="20%">
<xsl:value-of select="a:TestResult/a:Units/a:Unit"/>
</td>
<tr>
<td colspan="4">
<pre>
<strong class="fixed">
<xsl:value-of select="a:TestResult/a:Description/a:Text" />
</strong>
</pre>
</td>
</tr>
</tr>

////////////////////////////////////////////////////////

I would truly appreciate any help whatsoever....
Thanks.
 
please excuse the duplicate post.
i accidentally hit submit twice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top