Re: [xsl] Cannot process a result tree fragment as a node-set under XSLT 1.0 - The extension don´t function

Subject: Re: [xsl] Cannot process a result tree fragment as a node-set under XSLT 1.0 - The extension don´t function
From: "ALEXCONTINI@xxxxxxxx" <ALEXCONTINI@xxxxxxxx>
Date: Fri, 18 Apr 2008 09:41:01 +0200 (MEST)
Hi,

the extension don't function, whatB4s up?

The namespace for xslt system document is:

<xsl:stylesheet xmlns:java="http://xml.apache.org/xslt/java"; exclude-
result-prefixes="java" xmlns:i18n="http://apache.org/cocoon/i18n/2.0";
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; xmlns:dt="http:
//xsltsl.org/date-time" xmlns:str="http://xsltsl.org/string";  xmlns:
exsl="http://exslt.org/common"; extension-element-prefixes="exsl"
version="1.0">

<xsl:output method="html" media-type="text/html;charset=iso-8859-1"
indent="yes" encoding="ISO-8859-1" omit-xml-declaration="yes"/>

........

<xsl:variable name="aux2">
     <xsl:call-template name="str:to-upper">
          <xsl:with-param name="text" select="$titulo"></xsl:with-
param>
     </xsl:call-template>
</xsl:variable>

<xsl:variable name="filtro">
          <xsl:for-each select="//PATRIH-DescriptivoEx2
[(($desde>=concat(substring(F_INICIO_PUB,1,8), '000000') and $desde&lt;
=concat(substring(F_FIN_PUB,1,8), '000000')) or ($hasta >= concat
(substring(F_INICIO_PUB,1,8), '000000') and $hasta &lt;= concat
(substring(F_FIN_PUB,1,8), '000000')) or ($desde&lt;=concat(substring
(F_INICIO_PUB,1,8), '000000') and $hasta>=concat(substring(F_INICIO_PUB,
1,8), '000000'))) and (CODCATEGORIA=$conferencias or
CODCATEGORIA=$exposiciones or CODCATEGORIA=$cursos or
CODCATEGORIA=$dia_libro or CODCATEGORIA=$ferias or
CODCATEGORIA=$jornadas or CODCATEGORIA=$premios or
CODCATEGORIA=$seminarios or CODCATEGORIA=$becas or
CODCATEGORIA=$otros)] | //PATRIH-DescriptivoEx2[(($desde>=concat
(substring(F_INICIO_PUB,1,8), '000000') and $desde&lt;=concat(substring
(F_FIN_PUB,1,8), '000000')) or ($hasta >= concat(substring(F_INICIO_PUB,
1,8), '000000') and $hasta &lt;= concat(substring(F_FIN_PUB,1,8),
'000000')) or ($desde&lt;=concat(substring(F_INICIO_PUB,1,8), '000000')
and $hasta>=concat(substring(F_INICIO_PUB,1,8), '000000'))) and (not
($conferencias) and not($exposiciones) and not($cursos) and not
($dia_libro) and not($ferias) and not($jornadas) and not($premios) and
not($seminarios) and not($becas) and not($otros))]">
                     <xsl:variable name="aux1">
            	            <xsl:call-template name="str:to-upper">
            		<xsl:with-param name="text" select="DESCRIPCION_COMUN"
></xsl:with-param>
             	            </xsl:call-template>
            	</xsl:variable>
            	<xsl:if test="contains($aux1,$aux2)">
            	          <xsl:copy-of select="." />
            	</xsl:if>
      </xsl:for-each>

</xsl:variable>


<xsl:variable name="total" select="count(exsl:node-set($filtro)/PATRIH-
DescriptivoEx2)"></xsl:variable>            !!DonB4t function!!

Thank you very much,



----Mensaje original----
De: davidc@xxxxxxxxx
Recibido: 17/04/2008 14:53
Para: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Asunto: Re: Re: Re: [xsl] Cannot process a result tree fragment as a
node-set under XSLT 1.0 - My alternative donB4t function

<xsl:variable name="filter">
 <xsl:for-each....  //Recurso[condition]    (condition call to one
template!!)

</xsl:for-each>
</xsl:variable>

I can't fill that in as I don't know what program logic you need, but
that will make a result tree fragment containing some number of
variables.

I thought the question was to find the number of elements generated
which would be

<xsl:variable name="total" select="count(x:node-set($filter)/*)"/>

where you have defined xmlns:x="..." whatever namespace your xslt
system
docuemnts is needed for this extension function.

David




Ahora tambiC)n puedes acceder a tu correo Terra desde el mC3vil.
InfC3rmate pinchando aquC-.

Current Thread