From 3bbadd1540e8441955f2c361e91d20c82ac3e098 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Tue, 31 Jul 2001 18:35:35 +0000 Subject: [PATCH] Fix attribute test --- xsl/extensions/saxon642/com/nwalsh/saxon/FormatCallout.java | 4 ++-- xsl/extensions/saxon643/com/nwalsh/saxon/FormatCallout.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/FormatCallout.java b/xsl/extensions/saxon642/com/nwalsh/saxon/FormatCallout.java index ed22d1b6f..256a3b513 100644 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/FormatCallout.java +++ b/xsl/extensions/saxon642/com/nwalsh/saxon/FormatCallout.java @@ -46,7 +46,7 @@ public abstract class FormatCallout { public String areaLabel(Element area) { String label = null; - if (area.getAttribute("label") != null) { + if (area.hasAttribute("label")) { // If this area has a label, use it label = area.getAttribute("label"); } else { @@ -54,7 +54,7 @@ public abstract class FormatCallout { Element parent = (Element) area.getParentNode(); if (parent != null && parent.getLocalName().equalsIgnoreCase("areaset") - && parent.getAttribute("label") != null) { + && parent.hasAttribute("label")) { label = parent.getAttribute("label"); } } diff --git a/xsl/extensions/saxon643/com/nwalsh/saxon/FormatCallout.java b/xsl/extensions/saxon643/com/nwalsh/saxon/FormatCallout.java index ed22d1b6f..256a3b513 100644 --- a/xsl/extensions/saxon643/com/nwalsh/saxon/FormatCallout.java +++ b/xsl/extensions/saxon643/com/nwalsh/saxon/FormatCallout.java @@ -46,7 +46,7 @@ public abstract class FormatCallout { public String areaLabel(Element area) { String label = null; - if (area.getAttribute("label") != null) { + if (area.hasAttribute("label")) { // If this area has a label, use it label = area.getAttribute("label"); } else { @@ -54,7 +54,7 @@ public abstract class FormatCallout { Element parent = (Element) area.getParentNode(); if (parent != null && parent.getLocalName().equalsIgnoreCase("areaset") - && parent.getAttribute("label") != null) { + && parent.hasAttribute("label")) { label = parent.getAttribute("label"); } } -- 2.40.0