[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

comparing node types


Subject: comparing node types
From: Oliver Becker <obecker@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 24 Jul 2000 16:33:59 +0200 (MET DST)

Hi,

does anyone know a short expression that returns true if two nodes
($first1 and $first2) are of the same type?

What I currently have is 

   (($first1[self::text()] and $first2[self::text()]) or
    ($first1[self::comment()] and $first2[self::comment()]) or
    ($first1[self::processing-instruction()] and
             $first2[self::processing-instruction()] and
             name($first1)=name($first2)))

(element and attribute nodes omitted in this example ...)

Regards,
Oliver


/-------------------------------------------------------------------\
|  ob|do        Dipl.Inf. Oliver Becker                             |
|  --+--        E-Mail: obecker@xxxxxxxxxxxxxxxxxxxxxxx             |
|  op|qo        WWW:    http://www.informatik.hu-berlin.de/~obecker |
\-------------------------------------------------------------------/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread