Hi Keith,
Are you sure these expressions used to work with Xalan J1? They should be
evaluated to false. For instance:
<xsl:when test="summary/patient/field='ON'">
these expression is evaluated in the context of root node (see <xsl:template
match="/"> above). There's no "summary" sub-element in the context of
document root.
Try changing <xsl:template match="/"> to <xsl:template
match="/Module-1801">. This should evaluate your expression correctly. I'm
not sure if it'll be alright with the rest of stylesheet.
Thanks,
Dimitry
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 22, 2003 16:36
To: [EMAIL PROTECTED]
Subject: The test conditional doesn't seem to work
I'm migrating an app from xalan-java-1 to xalan-java 2.4.1 and it seems
that all the conditions evaluate to false.
The stylesheet:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version
="1.0">
<xsl:output method="html" indent="yes" doctype-public="-//W3C//DTD
HTML 4.01 Transitional//EN" encoding="UTF-8"/>
<xsl:template match="/">
<html style="cursor:wait">
<head>
<title>Toolbar</title>
</head>
<body>
<table>
<tr>
<xsl:choose>
<xsl:when test="summary/patient/field='ON'">
<td>Field is ON</td>
</xsl:when>
<xsl:otherwise>
<td>Field is OFF</td>
</xsl:otherwise>
</xsl:choose>
</tr>
<tr>
<xsl:choose>
<xsl:when test
="number(selected_applications/numitems/field)>1">
<td>Numitems gt 1</td>
</xsl:when>
<xsl:otherwise>
<td>Numitems not gt 1</td>
</xsl:otherwise>
</xsl:choose>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Prints out Field is OFF and Numitems not gt 1
The xml doc is:
<Module-1801 binitem="1801">
<selected_applications section="selected applications">
<_9 name="9">
<field>
MMMHISVitals.Vitals
</field>
</_9>
<_8 name="8">
<field>
MMMHISPatList.PatList
</field>
</_8>
<_16 name="16">
<field>
MMMHISAlertrev.Alertrev
</field>
</_16>
<_7 name="7">
<field>
MMMHISProblems.Problem
</field>
</_7>
<_6 name="6">
<field>
MMMHISAllergy.Allergy
</field>
</_6>
<_15 name="15">
<field>
MMMHISResultsReview.Lab
</field>
</_15>
<_5 name="5">
<field>
MMMHISSchedule.Schedule
</field>
</_5>
<_14 name="14">
<field>
MMMHISClinNote.ClinNote
</field>
</_14>
<_4 name="4">
<field>
MMMHISPhoneLog.PhoneLog
</field>
</_4>
<_13 name="13">
<field>
MMMHISImageAcq.ImageAcq
</field>
</_13>
<_3 name="3">
<field>
MMMHISDemogrph.Demogrph
</field>
</_3>
<_12 name="12">
<field>
MMMHISDRU.DRU
</field>
</_12>
<_2 name="2">
<field>
MMMHIS.Enctr
</field>
</_2>
<_11 name="11">
<field>
MMMHISAlertSystemManager.ASM
</field>
</_11>
<_1 name="1">
<field>
MMMHISDemogrph.Demogrph
</field>
</_1>
<_10 name="10">
<field>
MMMHISADEEntry.AdeEntry
</field>
</_10>
<numitems name="numitems">
<field>18</field>
</numitems>
</selected_applications>
<summary section="summary">
<clinician name="clinician">
<field>
ON
</field>
</clinician>
<encounter name="encounter">
<field>
ON
</field>
</encounter>
<patient name="patient">
<field>ON</field>
</patient>
</summary>
</Module-1801>
summary/patient/field is ON and selected_appliations/numitems is > 1.
What has changed that is causing this issue?
Thanks in advance.
Keith...
_____________________________________________________
Revere Data, LLC, formerly known as Sector Data, LLC, is not affiliated with
Sector, Inc., or SIAC.