[xsl] Why no namespace node KindTest?

Subject: [xsl] Why no namespace node KindTest?
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Sat, 26 Aug 2006 22:07:18 +0200 (CEST)
  Hi

  I wonder why there is no KindTest for namepace nodes.  In
particular, we can't write something like:

    if ( $arg instance of namespace() ) ...

  Of course, as this is the only kind of node that doesn't
have a KindTest, it is possible to rewrite it as:

    if ( $arg instance of namespace() ) ...

    if ( $item instance of node()
           and not($item instance of attribute()
                     or $item instance of comment()
                     or $item instance of document-node()
                     or $item instance of element()
                     or $item instance of processing-instruction()
                     or $item instance of text() ) ) ...

  But it is not as clear as it could be, IMHO.  I guess
there are only a few need for such a test, but I actually
need it in a development (not really, since I have a
switch/case on each node kind, so it is just the default
branch).

  I just wonder why such an asymmetrical choice was made by
the WG.

  Regards,

--drkm






















	
 p5.vert.ukl.yahoo.com uncompressed/chunked Sat Aug 26 19:13:38 GMT 2006 
	
		
___________________________________________________________________________ 
Dicouvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! 
Yahoo! Questions/Riponses pour partager vos connaissances, vos opinions et vos expiriences. 
http://fr.answers.yahoo.com 

Current Thread