IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

XSL/XSLT/XPATH XML Discussion :

[XSLT] problème affichage dans Firefox Recherche :


Sujet :

XSL/XSLT/XPATH XML

  1. #1
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Septembre 2009
    Messages
    2
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2009
    Messages : 2
    Points : 1
    Points
    1
    Par défaut [XSLT] problème affichage dans Firefox Recherche :
    Bonjour

    Pouvez-vous m'aider :

    J'ai crée un fichier catalogue.xml
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
       1. <?xml version="1.0" encoding="iso-8859-1"?>
       2. <?xml-stylesheet version="1.1" type="text/xsl" href="catalogue.xsl"?>
       3. <catalogue>
       4.    <categorie>
       5.       <nom>A</nom>
       6.        <categorie>
       7.     <nom> ALBERT toto </nom>
       8.  <document>
       9.             <titre>Envoyer un message</titre>
      10.               <grade>xxx</grade>
      11.       <poste>yyyy</poste>
      12.       <secteur>zzzzzzzzzzzz</secteur>
      13.               <tel>00.00.00.00.00</tel>
      14.               <ref>mailto:xx@toto.fr</ref>
      15.  </document>       
      16. </categorie>
      17. </categorie>
      18. <categorie>
      19.       <nom>B</nom>
      20. <categorie> 
      21.           <nom>BONSOIR Vous</nom>
      22.  <document>
      23.   <titre>Envoyer un message</titre>
      24.          <grade>xxx</grade>
      25.          <poste>zzzz</poste>
      26.          <secteur>ffffffffffff</secteur>
      27.          <tel>00.00.00.00.01</tel>
      28.   <ref>mailto:zz@toto.fr</ref>
      29.   </document>
      30.     </categorie>
      31. </categorie>
      32. </catalogue>
    J'ai crée un fichier catalogue.xls

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
       1. <?xml version="1.0" encoding="ISO-8859-1" ?>
       2. - <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">
       3. - <xsl:template match="/">
       4. - <html>
       5. - <head>
       6.   <link rel="stylesheet" type="text/css" href="catalogue.css" />
       7.   <title>Annuaire </title>
       8.   <base target="_new" />
       9. - <script>
      10. - <xsl:comment>
      11. - <![CDATA[
      12. var deplier = true;
      13. var replier = false;
      14.
      15. function deplirepli(titre, depli)
      16. {
      17. plus = titre.children[0];
      18. moins = titre.children[1];
      19. div = titre.parentElement;
      20. moins.style.display = depli ? "" : "none";
      21. plus.style.display = depli ? "none" : "";
      22. titre.title="Cliquer pour " + (depli ? "re" : "dé" ) + "plier";
      23. div.children[1].style.display= depli ? "" : "none";
      24. }
      25.
      26. function deplirepliTout(action)
      27. {
      28.
      29. coll = document.all.tags("div" );
      30. for (i=0; i<coll.length; i++)
      31. {
      32. if (coll[i].className == "title" )
      33.  {
      34.  deplirepli(coll[i], action);
      35.  }
      36. }
      37. }
      38.
      39.
      40. function toggleDisplay(titre)
      41. {
      42. plus = titre.children[0];
      43.
      44. if (plus.style.display=="" )
      45. // déplier
      46. {
      47. deplirepli(titre, deplier);
      48. }
      49. else
      50. // replier
      51. {
      52. deplirepli(titre, replier);
      53. }
      54. }
      55.
      56.
      57. function display(identifieur)
      58. {
      59. if (identifieur!=null) {
      60. deplirepliTout(replier);
      61. personne=document.getElementById(identifieur);
      62. var parent=personne.parentNode;
      63. while (parent.tagName!="BODY" )
      64. {
      65. parent.style.display="";
      66. parent=parent.parentNode;
      67. }
      68. }
      69.
      70. nom = personne.children(0);
      71. nom.style.backgroundColor="navajowhite";
      72. nom.style.color="white";
      73. nom.style.fontSize="larger";
      74. document.location="#"+identifieur
      75. }
      76.
      77. function changeButton(selection)
      78. {
      79. document.all.bouton.title=document.getElementById(selection.value).children[0].innerText;
      80. }
      81.
      82.
      83.
      84.   ]]>
      85.   </xsl:comment>
      86.   </script>
      87.   </head>
      88. - <BODY>
      89. - <DIV id="listing">
      90.   <xsl:apply-templates select="catalogue" />
      91.   </DIV>
      92. - <P class="petit">
      93.   <A HREF="mailto:aaa@toto.fr">Signaler toute anomalie</A>
      94.   </P>
      95.   </BODY>
      96.   </html>
      97.   </xsl:template>
      98. - <xsl:template match="catalogue">
      99. - <h1 id="titre">
     100.   <input class="grosbouton" style="float:left" type="button" value="++" title="Tout déplier" onclick="deplirepliTout(deplier)" />
     101.   <input class="grosbouton" style="float:right" type="button" value="--" title="Tout replier" onclick="deplirepliTout(replier)" />
     102.   Annuaire
     103.   <span style="cursor:hand" title="Annuaire">HHHHH</span>
     104.   </h1>
     105.   <xsl:apply-templates select="categorie" order-by="nom" />
     106.   </xsl:template>
     107. - <xsl:template match="categorie">
     108. - <DIV CLASS="wrapping">
     109. - <DIV CLASS="title" onclick="toggleDisplay(this)">
     110. - <xsl:attribute name="title">
     111. - <xsl:if test="aide">
     112.   <xsl:value-of select="aide" />
     113.   <xsl:eval>"\r"</xsl:eval>
     114.   </xsl:if>
     115.   Cliquez vite pour en savoir plus
     116.   </xsl:attribute>
     117.   <SPAN>+</SPAN>
     118.   <SPAN STYLE="display:none">-</SPAN>
     119.   <xsl:value-of select="nom" />
     120.   </DIV>
     121. - <DIV CLASS="wrapping" STYLE="display:none">
     122.   <xsl:apply-templates select="categorie" order-by="nom" />
     123. - <xsl:if test="document">
     124. - <table class="persons">
     125.   <xsl:apply-templates select="document" order-by="titre" />
     126.   </table>
     127.   </xsl:if>
     128.   </DIV>
     129.   </DIV>
     130.   </xsl:template>
     131. - <xsl:template match="document">
     132. - <tr class="document">
     133. - <xsl:attribute name="ID">
     134.   <xsl:eval>uniqueID(this)</xsl:eval>
     135.   </xsl:attribute>
     136.
     137.
     138. - <td>
     139. - <a>
     140. - <xsl:attribute name="name">
     141.   <xsl:eval>uniqueID(this)</xsl:eval>
     142.   </xsl:attribute>
     143.   </a>
     144. - <a>
     145.   <xsl:attribute name="title">Cliquer pour envoyer un message</xsl:attribute>
     146. - <xsl:attribute name="href">
     147.   <xsl:value-of select="ref" />
     148.   </xsl:attribute>
     149.   <xsl:value-of select="titre" />
     150.   </a>
     151.   </td>
     152. - <td>
     153.   <xsl:value-of select="poste" />
     154.   </td>
     155. - <td>
     156.   <xsl:value-of select="secteur" />
     157.   </td>
     158. - <td>
     159.   <xsl:value-of select="tel" />
     160.   </td>
     161. - <td>
     162.   <xsl:value-of select="grade" />
     163.   </td>
     164.   </tr>
     165.   </xsl:template>
     166.   <xsl:script />
     167.   </xsl:stylesheet>
    je n'ai aucun soucis pour visualiser le fichier xml dans Internet Explorer mais avec Firefox , j'ai le message suivant
    Erreur lors du chargement de la feuille de style : Échec de l'analyse d'une feuille de style XSLT.

    Où est l'erreur ?

    Merci d'avance

  2. #2
    Membre éprouvé Avatar de alain.couthures
    Profil pro
    Gérant
    Inscrit en
    Avril 2007
    Messages
    902
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Gérant

    Informations forums :
    Inscription : Avril 2007
    Messages : 902
    Points : 1 247
    Points
    1 247
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <?xml-stylesheet version="1.0" type="text/xsl" href="catalogue.xsl"?>
    et
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    ?
    Formulaires XForms sur tous navigateurs sans extension à installer (architecture XRX) : http://www.agencexml.com/xsltforms/

  3. #3
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Septembre 2009
    Messages
    2
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2009
    Messages : 2
    Points : 1
    Points
    1
    Par défaut
    Bonsoir

    désolé pour le retard ( problèmes personnels)

    j'ai essayé avec le code mais cela ne marche toujours pas avec Firefox et ne marche plus avec Internet explorer

    pour celui ou celle qui veut testez ci-dessous le fichier catalogue.css
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    body {
    font-size: small;
    background-color: #FFFFFF;
    font-family: Verdana, Arial, sans-serif;
    }
     
    H1, H2, H3, H4 {
    color:#258;
     
    }
     
    h1 {
    margin-top: 30px;
    text-align: center;
    font-size: 14pt;
    }
     
    h3 {
    letter-spacing: 5 px;
    font-weight: normal;
    }
     
    table.persons {
    width: 90%;
    background-color: #69C;
    border: outset;
    }
     
    table.persons th {
    color: white;
    text-transform: capitalize;
    letter-spacing: 0.5em;
    padding: 7px;
    }
     
    table.persons td {
    font-size: 10pt;
    padding: 7px;
    border: inset 2px;
    background-color: oldlace;
    }
     
    tr.chef td {
    background-color: navajowhite;
    }
     
    table.address {
    width: 90%;
    background-color: navajowhite;
    border: outset 5px;
    }
     
    table.address td {
    width: 90%;
    padding:10px;
    }
     
    .wrapping .wrapping {
    margin-left:20px;
    }
     
    .title {
    font-size: 10pt;
    color:#258;
    margin: 10px;
    cursor:hand;
    }
     
    .firstname {
    text-transform: uppercase;
    }
     
    .address {
    margin-bottom: 10px;
    margin-left: -20px;
    }
     
    #bouton {
    color: black;
    position: relative;
    top: 2;
    margin-top: 5px;
    }
     
    .grosbouton {
    font-weight: bold;
    font-size: 12pt;
    color: black;
    }
     
    form {
    margin: -20px;
    border: inset;
    text-align:center;
    color: white;
    background-color: #69C;
    padding: 10px;
    }
     
     
     
    .flag {
    width:26px;
    height:18px;
    float:right;
    }
     
    .petit {
    font-size:smaller
    A noter avec mon code et ie tab cela fonctionne dans Firefox
    mais comment faire pour le faire fonctionner dans Firefox sans ie tab

    Merci d'avance

Discussions similaires

  1. [AC-2003] Problème affichage dans un formulaire de recherche
    Par sassene dans le forum IHM
    Réponses: 1
    Dernier message: 16/07/2010, 11h05
  2. Réponses: 5
    Dernier message: 20/02/2009, 22h07
  3. [JpGraph] Problème d'affichage dans Firefox
    Par Eric_M_78 dans le forum Bibliothèques et frameworks
    Réponses: 1
    Dernier message: 18/01/2008, 15h21
  4. [XSLT] Problème affichage sous Firefox et pour IE OK
    Par SkyDev dans le forum XSL/XSLT/XPATH
    Réponses: 1
    Dernier message: 26/02/2007, 10h09
  5. Problème d'affichage dans Firefox
    Par virgul dans le forum Mise en page CSS
    Réponses: 4
    Dernier message: 19/12/2006, 11h09

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo