You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Claudio Tasso <c....@kion.it> on 2003/10/08 11:31:34 UTC

comparing numbers and nodesets

Hi!
I've a problem with an XPath expression which I can't understand.
This the document:

<?xml version="1.0" encoding="ISO-8859-1"?>
<doc>
	<chapter>
		<elem>1</elem>
	</chapter>
	<chapter>
		<elem/>
	</chapter>
</doc>

The following XPath expression selects all the chapter elements:

/doc/chapter[elem=1]

I think that the second chapter element should not be selectd.
What happens?

________________________________________________

dott. Claudio TASSO      mail: c.tasso@kion.it
Sviluppatore WEB         tel:   +39 051 6111458

KION Srl                 	web: www.kion.it           
Via Cristoni, 86            	tel:   +39 051 6111411
40033 Casalecchio di Reno (BO)	fax:  +39 051 570423
ITALIA
________________________________________________
 

RE: comparing numbers and nodesets

Posted by Gary L Peskin <ga...@firstech.com>.
I only get the first chapter element using XalanJ, versions 2.4.1 and 2.5.1.
How are you invoking Xalan?  What makes you think you're getting both
elements?  What version of Xalan are you using?

Gary

> -----Original Message-----
> From: Claudio Tasso [mailto:c.tasso@kion.it] 
> Sent: Wednesday, October 08, 2003 2:32 AM
> To: xalan-j-users@xml.apache.org
> Subject: comparing numbers and nodesets
> 
> 
> Hi!
> I've a problem with an XPath expression which I can't 
> understand. This the document:
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <doc>
> 	<chapter>
> 		<elem>1</elem>
> 	</chapter>
> 	<chapter>
> 		<elem/>
> 	</chapter>
> </doc>
> 
> The following XPath expression selects all the chapter elements:
> 
> /doc/chapter[elem=1]
> 
> I think that the second chapter element should not be 
> selectd. What happens?
> 
> ________________________________________________
> 
> dott. Claudio TASSO      mail: c.tasso@kion.it
> Sviluppatore WEB         tel:   +39 051 6111458
> 
> KION Srl                 	web: www.kion.it           
> Via Cristoni, 86            	tel:   +39 051 6111411
> 40033 Casalecchio di Reno (BO)	fax:  +39 051 570423
> ITALIA
> ________________________________________________
>  
>