This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

comparing node types


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@informatik.hu-berlin.de             |
|  op|qo        WWW:    http://www.informatik.hu-berlin.de/~obecker |
\-------------------------------------------------------------------/


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]