accès aux groupes de discussion, consultation et publication d'articles, recherche de "newsgroups"...
membres, identifiez-vous
é-mail Mot de passe
nouveau ? mot de passe oublié ?
Chargement... Chargement en cours...

Groupes français belges canadiens suisses internationaux Nétiquette
Échangez opinions et commentaires dans les forums de discussion.

Re: [XSLT] Dynamiczne szablony

 [  Nouvelle Discussion Nouvelle discussion  |  Répondre au groupe Répondre au groupe  |  pl.comp.xml ] 

Retour : Accueil du site pl comp xml  


  Sujet:   Re: [XSLT] Dynamiczne szablony  
 De: ser...@poczta.onet.pl (Mariusz S.)
 Groupes: pl.comp.xml
 Organisation: Onet.pl
 Date: 15. Sep 2008, 18:58:17
 References: 1 2 3 4
Andrew Cohen pisze:
> Mariusz S. pisze:
>> Przegl±da³em dokumentacjê i wiem, ¿e zaprezentowane przeze mnie 
>> przyk³ady s± b³êdne. Chodzi³o tylko o zobrazowanie problemu.
>   Mo¿e problem tkwi gdzie indziej? Co Ci daje trzymanie URI szablonów w 
> jakim¶ pliku XML?

G³ównie chodzi oto aby importowaæ szablon pod konkretn± akcjê.
Je¿eli wywo³am parametr GET ?akcja=lista to automatycznie pobierany jest 
szablon odpowiadaj±cy za wy¶wietlenie danych w tabelce.
Natomiast jak wywo³am parametr GET ?akcja=dodaj to wywo³ywany jest 
formularz. Obecnie rozpoznaje akcjê przy pomocy <xsl:choose> ale nie 
jest to najlepsze rozwi±zanie.

<?xml version="1.0"?>
<root>
   <layout>szablon.xsl</layout>
   ...
</root>

> 
>> Obecnie stosuje instrukcje warunkowe, ale to nie jest najlepsze 
>> rozwi±zanie.
>   A jak to wygl±da? Mo¿esz daæ fragment kodu?

<xsl:template match="zakladka" mode="Akcja">
   <xsl:choose>
      <xsl:when test="./@akcja='dodaj'">
         <xsl:apply-templates select="." mode="Dodaj"/>
      </xsl:when>
      <xsl:otherwise>
         <xsl:apply-templates select="." mode="Lista"/>
      </xsl:otherwise>
   </xsl:choose>
</xsl:template>


DateSujet  Auteur
15.09.
* [XSLT] Dynamiczne sz
Mariusz S.
15.09.
`* Re: [XSLT] Dynamiczne sz
Andrew Cohen
15.09.
 `* Re: [XSLT] Dynamiczne sz
Mariusz S.
15.09.
  +- Re: [XSLT] Dynamiczne sz
szomiz
15.09.
  `* Re: [XSLT] Dynamiczne sz
Andrew Cohen
15.09.
   `*   Re: [XSLT] Dynamiczne sz
Mariusz S.
15.09.
    +* Re: [XSLT] Dynamiczne sz
szomiz
15.09.
    |`* Re: [XSLT] Dynamiczne sz
Mariusz S.
15.09.
    | +* Re: [XSLT] Dynamiczne sz
Andrew Cohen
15.09.
    | |`* Re: [XSLT] Dynamiczne sz
Mariusz S.
15.09.
    | | `* Re: [XSLT] Dynamiczne sz
Andrew Cohen
16.09.
    | |  `* Re: [XSLT] Dynamiczne sz
Mariusz S.
16.09.
    | |   +* Re: [XSLT] Dynamiczne sz
Andrew Cohen
16.09.
    | |   |`* Re: [XSLT] Dynamiczne sz
Mariusz S.
16.09.
    | |   | `- Re: [XSLT] Dynamiczne sz
Andrew Cohen
16.09.
    | |   `* Re: [XSLT] Dynamiczne sz
NotBear
17.09.
    | |    `- Re: [XSLT] Dynamiczne sz
Mariusz S.
15.09.
    | `* Re: [XSLT] Dynamiczne sz
szomiz
15.09.
    |  `* Re: [XSLT] Dynamiczne sz
Andrew Cohen
15.09.
    |   +* Re: [XSLT] Dynamiczne sz
szomiz
15.09.
    |   |`* Re: [XSLT] Dynamiczne sz
Andrew Cohen
15.09.
    |   | `* Re: [XSLT] Dynamiczne sz
szomiz
15.09.
    |   |  `* Re: [XSLT] Dynamiczne sz
Andrew Cohen
15.09.
    |   |   `* Re: [XSLT] Dynamiczne sz
szomiz
15.09.
    |   |    `- Re: [XSLT] Dynamiczne sz
Andrew Cohen
15.09.
    |   `- Re: [XSLT] Dynamiczne sz
Mariusz S.
15.09.
    `* Re: [XSLT] Dynamiczne sz
Andrew Cohen
15.09.
     `- Re: [XSLT] Dynamiczne sz
Mariusz S.
Groups Explorer contact votre avis comment ça marche? rechercher un groupe suggérer un groupe abuse accueil du site   Imprimer cette page   Envoyer cette page à un(e) ami(e)
Free counter and web stats