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

Subject: Re: [xsl] Cannot process a result tree fragment as a node-set under XSLT 1.0 - My alternative don´t function
From: "ALEXCONTINI@xxxxxxxx" <ALEXCONTINI@xxxxxxxx>
Date: Thu, 17 Apr 2008 12:44:50 +0200 (MEST)
OK, but i need also to obtain the value of total variable. Any
suggestion?

<xsl:param name="titulo"></xsl:param>

<xsl:variable name="filter" select="exp[condition]"/>

<xsl:variable name="total" select="count($filter)"></xsl:variable>

xsl:choose>
<xsl:when test="$total=0">
     <p>No events</p>
</xsl:when>
<xsl:otherwise>
     <xsl:for-each select="$filter">
        <p><xsl:value-of select="TITULO"/></p>
            ......
    </xsl:for-each>


   <xsl:if test="$total > 10">
     <xsl:call-template name="pagination">
              <xsl:with-param name="curpage" select="$page"/>
              <xsl:with-param name="lastpage" select="ceiling($total
div 10)"/>
              <xsl:with-param name="pages" select="4"/>
             <xsl:with-param name="url" select="$url"></xsl:with-
param>
     </xsl:call-template>
</xsl:if>

</xsl:otherwise>

</xsl:choose>

Thank you very much,
Alexander


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

> PD: str:to-upper is a template that converts all lowercase letters
to
> uppercase and I use xml v1.0 version

Can't you just use the translate function, then as it is all Xpath it
is
trivial to put it into an Xpath filter.

If you can't (perhaps because you need an s sharp ligature to
uppercase
to SS) then you can't do it in a single xpath filter in XSLT 1 you
will
need something like
<xsl:for-each select="exp">
 <xsl:variable name="x">
  <xsl:call-template...
  </xsl:variable<

 <xsl:if test="contains(...)

    ... do something
 </xsl:if>
</xsl:for-each>

David

--------------------------

Hi,

<xsl:variable name="filter" select="exp[condition]"/>

I need that condition is:

      contains(<xsl:call-template name="str:to-upper"><xsl:with-param
name="text" select="TITULO"></xsl:with-param></xsl:call-template>,
<xsl:
call-template name="str:to-upper"><xsl:with-param name="text"
select="$titulo"></xsl:with-param></xsl:call-template>)

and no:

    contains(TITULO,$titulo)

Some suggestion?

Thank you very much,
Alexander


PD: str:to-upper is a template that converts all lowercase letters to
uppercase and i use xml v1.0 version

<xsl:param name="titulo"></xsl:param>

<xsl:variable name="filter" select="exp[condition]"/>

<xsl:variable name="total" select="count($filter)"></xsl:variable>

<xsl:for-each select="$filter">
          <p><xsl:value-of select="TITULO"/></p>
            ......
</xsl:for-each>

....

<xsl:if test="$total > 10">
    <xsl:call-template name="pagination">
        <xsl:with-param name="curpage" select="$page"/>
        <xsl:with-param name="lastpage" select="ceiling($total div
$por_pagina)"/>
        <xsl:with-param name="pages" select="4"/>
        <xsl:with-param name="url" select="$url"></xsl:with-param>
    </xsl:call-template>
</xsl:if>





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

Current Thread