Re: [xsl] Avoiding boneheaded mistakes in XSLT?

Subject: Re: [xsl] Avoiding boneheaded mistakes in XSLT?
From: Syd Bauman <Syd_Bauman@xxxxxxxxx>
Date: Wed, 29 Dec 2010 08:42:29 -0500
> 1. In an XPath expression, using "something/node" where I wanted
> "something/node()" [ditto text vs. text()]: always means zero
> results and can drive you crazy if you don't notice the missing
> parentheses;

But just fantasizing for a moment, here, wouldn't it be nice to have
a function what-is-this(), to which one could hand an expression and
be told what the processor knows it is supposed to be, so you can
compare that to what you think it is supposed to be?

Stuff kinda like:
  what-is-this( something/node ) => "sequence of 0 or more ns:node element nodes"
  what-is-this( something/node() ) => "sequence of 0 or more element, attribute, comment, text, or processing-instruction nodes"
  what-is-this( 1+1 ) => "xs:integer"
  what-is-this( $teiHeader ) => "variable holding a result tree fragment"

I'll bet oXygen's XSLT debugger (and perhaps others as well, I've
only used oXygen's) gives you this information somehow.

Current Thread