logo       

Re: Pb d'utilisation de la fonction string-length(): msg#00091

Subject: Re: Pb d'utilisation de la fonction string-length()
Le mercredi 26 janvier 2005 à 11:08 +0100, Oscar NIYONKURU a écrit :

> Comment faire pour appliquer substring(Societe//Code_Pays,1,30) à tous
> les noeuds (car visiblement il ne sélectionne que le premier noeud
> dans le cas où il y en a plusieurs...).

Les fonctions portant sur des chaines de caractères sélectionnent
effectivement le premier noeud lorsqu'on leur fourni une liste de noeud
en entrée.

Si on voulait les faire porter sur la concaténation de ces noeuds, il
faudrait faire l'opération en XSL et mettre le résultat dans une
variable, par exemple :

<xsl:variable name="concatenation">
 <xsl:for-each select="Societe//Code_Pays">
  <xsl:value-of select="."/>
 </xsl:for-each>
</xsl:variable>
<xsl:value-of select="substring($concatenation, 1, 30"/>

Cordialement,

Eric van der Vlist
-- 
Tired of typing XML tags?
                                                       http://wikiml.org
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------




Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.drivers.b...    security.firewa...    mathematics.lps...    web.zope.plone....    x25/2005-12/msg...    culture.tv.sout...    pld.user.polish...    qplus.devel/200...    version-control...    openbsd.bugs/20...    distributions.g...    gnu.chess.bugs/...    redhat.release....    emacs.bugs/2002...    java.bio.genera...    ataraid/2005-01...    finance.moneyda...    hardware.microc...    netbsd.ports.xe...    bug-tracking.gn...    text.xml.saxon....    kde.linux/2002-...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo