pie3141516
Programmer
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="aescription/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>
<xsltherwise>
<td width="20%">
<xsl:value-of select="a:TestResult/a:Value"/>
<xsl:value-of select="a:Flag/a:Text"/>
</td>
</xsltherwise>
</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/aescription/a:Text" />
</strong>
</pre>
</td>
</tr>
</tr>
////////////////////////////////////////////////////////
I would truly appreciate any help whatsoever....
Thanks.
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="aescription/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>
<xsltherwise>
<td width="20%">
<xsl:value-of select="a:TestResult/a:Value"/>
<xsl:value-of select="a:Flag/a:Text"/>
</td>
</xsltherwise>
</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/aescription/a:Text" />
</strong>
</pre>
</td>
</tr>
</tr>
////////////////////////////////////////////////////////
I would truly appreciate any help whatsoever....
Thanks.