[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Problem with count() function using Xalan


Subject: Re: [xsl] Problem with count() function using Xalan
From: XSL-List Owner <xsl-list-owner@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 21 Nov 2007 12:54:44 -0500

As the list guidelines say:

Well-composed questions frequently include a small XML sample, an XSLT stylesheet, the results received, and the result that was desired - all in miniature, to make it comprehensible to readers new to your problem.

Remembering that all list postings are permanently public, I suggest that you provide a sample document that demonstrates your problem.


-- Tommie


Hi i'm using XAlan 2.6 within a java application.
I'm getting trouble with the fucntion count().
It always return 1 even if the nodes i wich to count are more than 1.


I have some thing like this witihin my template:


  <xsl:template match="END-OF-PDU-FIELD" mode="service">
     <xsl:variable name="struct_ref" select="BASIC-STRUCTURE-REF/@ID-REF"/>
     <xsl:variable name="struct" select="
//DIAG-DATA-DICTIONARY-SPEC/STRUCTURES/parametre[@xmlDBId  =
$struct_ref]/STRUCTURE"/>
     <xsl:variable name="taille_struct">
       <xsl:value-of select="count($struct/PARAMS/PARAM)"/>
     </xsl:variable>
          .....
  </xsl:template>

My STRUCTURE element contains a child PARAMS. And PARAMS contains  5
child(PARAM) but the count function always return 1
Do anyone come across a such problem yet ?

Thanks !!!
Collins


--

======================================================================
B. Tommie Usdin                        mailto:btusdin@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                           Phone: 301/315-9631
Suite 207                                    Direct Line: 301/315-9634
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in XML and SGML
======================================================================


Current Thread
Keywords