From: thierry pilet (tpilet@geomatic.ch)
Date: 16/06/2003 - 10:12
J'ai une liste d'entreprises qui sont dans une localité.
Pour chacune de ces entreprises, je dispose d'une typlogie (Restaurant, Santé, Formation) particulière. Chacune de ces entreprises peut être de plusieurs types.
J'aimerais rechercher les entreprises pour une localité donnée, puis afficher à l'écran que la liste des types uniques pour la localité recherchée.
ex pour Roche
j'aurais:
Hébergement
Restaurant
Services
Je mets mon fichier xml en annexe.
les tests de mon fichier xsl ..... faux
<xsl:key name="distinct-value" match="value_RUBRIQUE" use="."/>
....
<xsl:for-each select="(/RESULTAT/CHA_ENTREPRISE[LOCALITE_18='ROCHE']) and (//value_RUBRIQUE[generate-id()=generate-id(key('distinct-value',.))])">
<xsl:sort order="ascending" select="." />
XML
<?xml version="1.0" encoding="ISO-8859-1" ?>
<RESULTAT>
<CHA_ENTREPRISE>
<ID_OBJET>554</ID_OBJET>
<NOM_ENTREPRISE>Entreprise A</NOM_ENTREPRISE>
<NPA>1852</NPA>
<LOCALITE_18>Roche</LOCALITE_18>
<RUBRIQUE LIBELLE="Rubrique">
<value_RUBRIQUE>Services</value_RUBRIQUE>
<value_RUBRIQUE>Restaurant</value_RUBRIQUE>
</RUBRIQUE>
<CHA_ENTREPRISE>
<CHA_ENTREPRISE>
<ID_OBJET>555</ID_OBJET>
<NOM_ENTREPRISE>Entreprise B</NOM_ENTREPRISE>
<NPA>1852</NPA>
<LOCALITE_18>Roche</LOCALITE_18>
<RUBRIQUE LIBELLE="Rubrique">
<value_RUBRIQUE>Restaurant</value_RUBRIQUE>
<value_RUBRIQUE>Hebergement</value_RUBRIQUE>
</RUBRIQUE>
<CHA_ENTREPRISE>
<CHA_ENTREPRISE>
<ID_OBJET>554</ID_OBJET>
<NOM_ENTREPRISE>Entreprise C</NOM_ENTREPRISE>
<NPA>1867</NPA>
<LOCALITE_18>Ollon</LOCALITE_18>
<RUBRIQUE LIBELLE="Rubrique">
<value_RUBRIQUE>Services</value_RUBRIQUE>
<value_RUBRIQUE>Facilités</value_RUBRIQUE>
</RUBRIQUE>
<CHA_ENTREPRISE>
<CHA_ENTREPRISE>
<ID_OBJET>555</ID_OBJET>
<NOM_ENTREPRISE>Entreprise D</NOM_ENTREPRISE>
<NPA>1867</NPA>
<LOCALITE_18>Ollon</LOCALITE_18>
<RUBRIQUE LIBELLE="Rubrique">
<value_RUBRIQUE>Services</value_RUBRIQUE>
<value_RUBRIQUE>Restaurant</value_RUBRIQUE>
</RUBRIQUE>
<CHA_ENTREPRISE>
</RESULTAT>
----------------------------------------------------------------------------------
Visitez http://www.swissgeo.ch
----------------------------------------------------------------------------------
Thierry Pilet Tel. ++41 21 651 30 32
Geomatic Ingenierie ++41 21 651 30 00
Ch. des Croisettes 26-28 Fax ++41 21 651 30 35
Mobile: ++41 76 325 69 20
CH-1066 Epalinges E-M tpilet@geomatic.ch
site web : www.geomatic.ch
plan dynamique:
tpilet@geomatic.ch;269933">http://www.swissgeo.ch/mailit.php?tpilet@geomatic.ch;269933
-----------------------------------------------------------------------------------
Geomatic Ingenierie: la maitrise de l'information geographique
-----------------------------------------------------------------------------------
--
Devenez redacteur <XML>fr et contribuez au developpement du
xml francophone (http://xmlfr.org/infos/redacteurs/) !
Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
Cette liste est a votre disposition pour discuter en francais de
tout sujet technique lie a XML.
Pour resilier votre abonnement, envoyez un message contenant
la commande "unsubscribe" a xml-tech-request@xmlfr.org
(mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
Archive générée par hypermail 2.1.3 le 28/06/2004 - 11:06 UTC
webmaster@xmlfr.org
|