Re: [xslt] Error xpath.c:7416: Invalid type



Sebastian Rahtz writes:
 > what is the namespace for "libxslt", please?

looks like it is  "http://xmlsoft.org/XSLT/namespace" (amazing what
you can find when your search the changelog...)

so now I run:

  <xsl:template match="/">

    <xsl:variable name="x">
      <a><xsl:copy-of select=".//xptr"/> </a>
    </xsl:variable>
   <xsl:message>
     [<xsl:value-of select="count(libxslt:node-set($x)/a/*)"/>]
    </xsl:message>  
  </xsl:template>

on:


 <foo>
  <xptr doc="TUG"/>
  <xptr doc="TUG"/>
 </foo>

and get the answer

Building variable x
Evaluating variable x
Object is an XSLT value tree :
1  ELEMENT a
    namespace exsl href=http://exslt.org/common
    namespace libxslt href=http://xmlsoft.org/XSLT/namespace
Lookup variable x
found variable x

            [0]


I suggest that this is not correct, the answer should be [2]

Sebastian






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]