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

JSF Java Discussion :

XML dans une modal Panel


Sujet :

JSF Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre Expert
    Avatar de haskouse
    Homme Profil pro
    Salesforce
    Inscrit en
    Août 2009
    Messages
    923
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : Maroc

    Informations professionnelles :
    Activité : Salesforce
    Secteur : Conseil

    Informations forums :
    Inscription : Août 2009
    Messages : 923
    Par défaut XML dans une modal Panel
    Bonjour tout le monde,

    Voilà j'ai une question, je veux travailler avec du XML avec JAVA, j'ai envie de lire un fichier XML en entier puis l'afficher sur un modal panel ( RichFaces ) .... mais je veux que le fichier garde un format comme si on l'avait ouvert sur Internet Explorer ( c'est-à-dire : indenté, en arborescence et les balises en couleurs ) ...

    Maintenant la question : Est ce que c'est possible ? et si oui qu'est ce que vous me conseillez d'utiliser comme API ou LIBRAIRIE

    ( Je travaille avec : JSF, HIBERNATE, SPRING, RICHFACES, AJAX4JSF)

    Merci d'avance.
    "Le savant qui enseigne le bien aux gens et ne le met pas en pratique, est semblable à la torche qui éclaire en se brûlant." Mohammed le Messager d’Allah (que la paix et le salut d'Allah soient sur lui)

    Tutoriels Talend
    Mes articles publiés
    Mon CV en-ligne

  2. #2
    Membre Expert
    Avatar de haskouse
    Homme Profil pro
    Salesforce
    Inscrit en
    Août 2009
    Messages
    923
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : Maroc

    Informations professionnelles :
    Activité : Salesforce
    Secteur : Conseil

    Informations forums :
    Inscription : Août 2009
    Messages : 923
    Par défaut
    Bon apparemment personne n'a de réponses !!!

    j'ai utilisé la librairie DOM,
    quand j'affiche le XML lu dans la console il est bien indenté mais sans couleur ni arborescence bien sûr,

    mais quand je passe sur le Rich:modalPanel je me retrouve avec un texte non identé et bien sûr toujours pas de couleur ni d'arborescence.

    Des idées ???
    "Le savant qui enseigne le bien aux gens et ne le met pas en pratique, est semblable à la torche qui éclaire en se brûlant." Mohammed le Messager d’Allah (que la paix et le salut d'Allah soient sur lui)

    Tutoriels Talend
    Mes articles publiés
    Mon CV en-ligne

  3. #3
    Membre Expert
    Avatar de haskouse
    Homme Profil pro
    Salesforce
    Inscrit en
    Août 2009
    Messages
    923
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : Maroc

    Informations professionnelles :
    Activité : Salesforce
    Secteur : Conseil

    Informations forums :
    Inscription : Août 2009
    Messages : 923
    Par défaut Enfinnnnnnnnnnnnnnn
    Bon après des heures de recherches je suis arrivé à une solution, c'est une librairie qui affiche en indentation, avec des couleurs comme ceux d'internet Explorer (qu'on peut modifier d'ailleurs) mais sans l'arborescence ( personne n'est parfait !!!)

    Mais je ne vous la donne pas car personne ne m'a répondu


    Je rigggggggggole

    Bon je vous la donne:

    il ya une lib pour ça qui s'appelle JHILIGHT : (https://jhighlight.dev.java.net/)

    pour l'utilisatio il suffit de télécherger le .jar et l'ajouter à votre projet..

    voilà un bout de code expliquant l'utilisation :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    XmlXhtmlRenderer xmlRenderer = new XmlXhtmlRenderer();
    String out =xmlRenderer.highlight("chemin du fichier XML",la chaine contenant le texte du XML, "utf-8",false);
    Notez que le premier attribut "chemin du fichier" n'est utilisé que pour l'affichage, et non pas pr aller chercher le contenu du fichier.

    Le contenu du fichier à afficher doit être contenu dans un String comme dans l'exemple, ou bien dans un inputStrem et utiliser la méthode suivante :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
     
    public void highlight(String name,
                          InputStream in,
                          OutputStream out,
                          String encoding,
                          boolean fragment)
                   throws IOException
    avec :
    name toujours le nom du fichier,
    in : linputStream du XML d'entrée,
    out : l'outputStream de sortie

    En fait cette balise peut être utilisé pour les fichiers de type :
    Java, Groovy, C++, HTML, XHTML, XML and LZX

    Bonne chance.
    "Le savant qui enseigne le bien aux gens et ne le met pas en pratique, est semblable à la torche qui éclaire en se brûlant." Mohammed le Messager d’Allah (que la paix et le salut d'Allah soient sur lui)

    Tutoriels Talend
    Mes articles publiés
    Mon CV en-ligne

  4. #4
    Membre Expert
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    1 466
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 1 466
    Par défaut
    Hello,
    Je connais pas RichFaces, mais si tu peux afficher un pannel avec du HTML, une solution peut être d'appliquer l'XSL-T qu'utilise IE pour mettre en forme par défaut les fichiers XML et de l'affichier dans le pannel HTML.

    J'ai trouve le XSL-T d'IE là http://www.dpawson.co.uk/xsl/sect2/m...html#d6891e200 :
    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
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    <?xml version="1.0"?>
    <!--
      IE5 default style sheet, provides a view of any XML document
      and provides the following features:
      - auto-indenting of the display, expanding of entity references
      - click or tab/return to expand/collapse
      - color coding of markup
      - color coding of recognized namespaces - xml, xmlns, xsl, dt
     
      This style sheet is available in IE5 in a compact form at the URL
      "res://msxml.dll/DEFAULTSS.xsl".  This version differs only in the
      addition of comments and whitespace for readability.
     
      Author:  Jonathan Marsh (jmarsh@microsoft.com)
      Modified:   05/21/2001 by Nate Austin (naustin@idsgrp.com)
                             Converted to use XSLT rather than WD-xsl
    -->
     
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:dt="urn:schemas-microsoft-com:datatypes"
                    xmlns:d2="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
     
    <xsl:template match="/">
      <HTML>
        <HEAD>
          <STYLE>
            BODY {font:x-small 'Verdana'; margin-right:1.5em}
          <!-- container for expanding/collapsing content -->
            .c  {cursor:hand}
          <!-- button - contains +/-/nbsp -->
            .b  {color:red; font-family:'Courier New'; font-weight:bold;
    	  text-decoration:none}
          <!-- element container -->
            .e  {margin-left:1em; text-indent:-1em; margin-right:1em}
          <!-- comment or cdata -->
            .k  {margin-left:1em; text-indent:-1em; margin-right:1em}
          <!-- tag -->
            .t  {color:#990000}
          <!-- tag in xsl namespace -->
            .xt {color:#990099}
          <!-- attribute in xml or xmlns namespace -->
            .ns {color:red}
          <!-- attribute in dt namespace -->
            .dt {color:green}
          <!-- markup characters -->
            .m  {color:blue}
          <!-- text node -->
            .tx {font-weight:bold}
          <!-- multi-line (block) cdata -->
            .db {text-indent:0px; margin-left:1em; margin-top:0px;
    	  margin-bottom:0px;
                 padding-left:.3em; border-left:1px solid #CCCCCC; font:small
    	  Courier}
          <!-- single-line (inline) cdata -->
            .di {font:small Courier}
          <!-- DOCTYPE declaration -->
            .d  {color:blue}
          <!-- pi -->
            .pi {color:blue}
          <!-- multi-line (block) comment -->
            .cb {text-indent:0px; margin-left:1em; margin-top:0px;
    	  margin-bottom:0px;
                 padding-left:.3em; font:small Courier; color:#888888}
          <!-- single-line (inline) comment -->
            .ci {font:small Courier; color:#888888}
            PRE {margin:0px; display:inline}
          </STYLE>
     
          <SCRIPT><xsl:comment><![CDATA[
            // Detect and switch the display of CDATA and comments from an
    	  inline view
            //  to a block view if the comment or CDATA is multi-line.
            function f(e)
            {
              // if this element is an inline comment, and contains more than a
    	  single
              //  line, turn it into a block comment.
              if (e.className == "ci") {
                if (e.children(0).innerText.indexOf("\n") > 0)
                  fix(e, "cb");
              }
     
              // if this element is an inline cdata, and contains more than a
    	  single
              //  line, turn it into a block cdata.
              if (e.className == "di") {
                if (e.children(0).innerText.indexOf("\n") > 0)
                  fix(e, "db");
              }
     
              // remove the id since we only used it for cleanup
              e.id = "";
            }
     
            // Fix up the element as a "block" display and enable
    	  expand/collapse on it
            function fix(e, cl)
            {
              // change the class name and display value
              e.className = cl;
              e.style.display = "block";
     
              // mark the comment or cdata display as a expandable container
              j = e.parentElement.children(0);
              j.className = "c";
     
              // find the +/- symbol and make it visible - the dummy link
    	  enables tabbing
              k = j.children(0);
              k.style.visibility = "visible";
              k.href = "#";
            }
     
            // Change the +/- symbol and hide the children.  This function works
    	  on "element"
            //  displays
            function ch(e)
            {
              // find the +/- symbol
              mark = e.children(0).children(0);
     
              // if it is already collapsed, expand it by showing the children
              if (mark.innerText == "+")
              {
                mark.innerText = "-";
                for (var i = 1; i < e.children.length; i++)
                  e.children(i).style.display = "block";
              }
     
              // if it is expanded, collapse it by hiding the children
              else if (mark.innerText == "-")
              {
                mark.innerText = "+";
                for (var i = 1; i < e.children.length; i++)
                  e.children(i).style.display="none";
              }
            }
     
            // Change the +/- symbol and hide the children.  This function work
    	  on "comment"
            //  and "cdata" displays
            function ch2(e)
            {
              // find the +/- symbol, and the "PRE" element that contains the
    	  content
              mark = e.children(0).children(0);
              contents = e.children(1);
     
              // if it is already collapsed, expand it by showing the children
              if (mark.innerText == "+")
              {
                mark.innerText = "-";
                // restore the correct "block"/"inline" display type to the PRE
                if (contents.className == "db" || contents.className == "cb")
                  contents.style.display = "block";
                else contents.style.display = "inline";
              }
     
              // if it is expanded, collapse it by hiding the children
              else if (mark.innerText == "-")
              {
                mark.innerText = "+";
                contents.style.display = "none";
              }
            }
     
            // Handle a mouse click
            function cl()
            {
              e = window.event.srcElement;
     
              // make sure we are handling clicks upon expandable container
    	  elements
              if (e.className != "c")
              {
                e = e.parentElement;
                if (e.className != "c")
                {
                  return;
                }
              }
              e = e.parentElement;
     
              // call the correct funtion to change the collapse/expand state
    	  and display
              if (e.className == "e")
                ch(e);
              if (e.className == "k")
                ch2(e);
            }
     
            // Dummy function for expand/collapse link navigation - trap onclick
    	  events instead
            function ex() 
            {}
     
            // Erase bogus link info from the status window
            function h()
            {
              window.status=" ";
            }
     
            // Set the onclick handler
            document.onclick = cl;
     
          ]]></xsl:comment></SCRIPT>
        </HEAD>
     
        <BODY class="st"><xsl:apply-templates/></BODY>
     
      </HTML>
    </xsl:template>
     
    <!-- Templates for each node type follows.  The output of
    each template has a similar structure to enable script to
    walk the result tree easily for handling user
    interaction. -->
     
    <!-- Template for the DOCTYPE declaration.  No way to get
    	  the DOCTYPE, so we just put in a placeholder -->
     
    <!--  no support for doctypes
    <xsl:template match="node()[nodeType()=10]">
      <DIV class="e"><SPAN>
      <SPAN class="b"> </SPAN>
      <SPAN class="d">&lt;!DOCTYPE <xsl:value-of 
    	  select="name()"/><I> (View
    Source for full doctype...)</I>&gt;</SPAN>
      </SPAN></DIV>
    </xsl:template>
    -->
     
    <!-- Template for pis not handled elsewhere -->
    <xsl:template match="processing-instruction()">
      <DIV class="e">
      <SPAN class="b"> </SPAN>
      <SPAN class="m">&lt;?</SPAN><SPAN class="pi"><xsl:value-of
    select="name()"/> <xsl:value-of select="."/></SPAN><SPAN
    class="m">?&gt;</SPAN>
      </DIV>
    </xsl:template>
     
    <!-- Template for the XML declaration.  Need a separate template because the
    pseudo-attributes
        are actually exposed as attributes instead of just element content, as
    in other pis -->
    <!--  No support for the xml declaration
    <xsl:template match="pi('xml')">
      <DIV class="e">
      <SPAN class="b"> </SPAN>
      <SPAN class="m">&lt;?</SPAN><SPAN class="pi">xml 
    	  <xsl:for-each
    select="@*"><xsl:value-of select="name()"/>="<xsl:value-of select="."/>"
    </xsl:for-each></SPAN><SPAN class="m">?&gt;</SPAN>
      </DIV>
    </xsl:template>
    -->
     
    <!-- Template for attributes not handled elsewhere -->
    <xsl:template match="@*" xml:space="preserve"><SPAN><xsl:attribute
    name="class"><xsl:if
    test="starts-with(name(),'xsl:')">x</xsl:if>t</xsl:attribute> 
    	  <xsl:value-of
    select="name()" /></SPAN><SPAN class="m">="</SPAN>
    	  <B><xsl:value-of
    select="."/></B><SPAN class="m">"</SPAN></xsl:template>
     
    <!-- Template for attributes in the xmlns or xml namespace -->
    <!--  UNKNOWN
    <xsl:template match="@xmlns:*|@xmlns|@xml:*"><SPAN 
    	  class="ns"> <xsl:value-of
    select="name()"/></SPAN><SPAN class="m">="</SPAN>
    	  <B class="ns"><xsl:value-of
    select="."/></B><SPAN class="m">"</SPAN></xsl:template>
    -->
     
    <!-- Template for attributes in the dt namespace -->
    <!-- UNKNOWN
    <xsl:template match="@dt:*|@d2:*"><SPAN 
    	  class="dt"> <xsl:value-of
    select="name()"/></SPAN><SPAN class="m">="</SPAN><B 
    	  class="dt"><xsl:value-of
    select="."/></B><SPAN class="m">"</SPAN></xsl:template>
    -->
     
    <!-- Template for text nodes -->
    <xsl:template match="text()">
      <DIV class="e">
      <SPAN class="b"> </SPAN>
      <SPAN class="tx"><xsl:value-of select="."/></SPAN>
      </DIV>
    </xsl:template>
     
     
    <!-- Note that in the following templates for comments
    and cdata, by default we apply a style appropriate for
    single line content (e.g. non-expandable, single line
    display).  But we also inject the attribute 'id="clean"' and
    a script call 'f(clean)'.  As the output is read by the
    browser, it executes the function immediately.  The function
    checks to see if the comment or cdata has multi-line data,
    in which case it changes the style to a expandable,
    multi-line display.  Performing this switch in the DHTML
    instead of from script in the XSL increases the performance
    of the style sheet, especially in the browser's asynchronous
    case -->
     
    <!-- Template for comment nodes -->
    <xsl:template match="comment()">
      <DIV class="k">
      <SPAN><A class="b" onclick="return false" onfocus="h()"
    STYLE="visibility:hidden">-</A> <SPAN class="m">
    	  &lt;!--</SPAN></SPAN>
      <SPAN id="clean" class="ci"><PRE>
    	  <xsl:value-of select="."/></PRE></SPAN>
      <SPAN class="b"> </SPAN> <SPAN 
    	  class="m">--&gt;</SPAN>
      <SCRIPT>f(clean);</SCRIPT></DIV>
    </xsl:template>
     
    <!-- Template for cdata nodes -->
    <!-- UNSUPPORTED
    <xsl:template match="cdata()">
      <DIV class="k">
      <SPAN><A class="b" onclick="return false" onfocus="h()"
    STYLE="visibility:hidden">-</A> <SPAN class="m">
    	  &lt;![CDATA[</SPAN></SPAN>
      <SPAN id="clean" class="di"><PRE><xsl:value-of 
    	  select="."/></PRE></SPAN>
      <SPAN class="b"> </SPAN> <SPAN 
    	  class="m">]]&gt;</SPAN>
      <SCRIPT>f(clean);</SCRIPT></DIV>
    </xsl:template>
    -->
     
     
    <!-- Note the following templates for elements may
    examine children.  This harms to some extent the ability to
    process a document asynchronously - we can't process an
    element until we have read and examined at least some of its
    children.  Specifically, the first element child must be
    read before any template can be chosen.  And any element
    that does not have element children must be read completely
    before the correct template can be chosen. This seems an
    acceptable performance loss in the light of the formatting
    possibilities available when examining children. -->
     
    <!-- Template for elements not handled elsewhere (leaf nodes) -->
    <xsl:template match="*">
      <DIV class="e"><DIV STYLE="margin-left:1em;text-indent:-2em">
      <SPAN class="b"> </SPAN>
      <SPAN class="m">&lt;</SPAN><SPAN><xsl:attribute 
    	  name="class"><xsl:if
    test="starts-with(name(),'xsl:')">x</xsl:if>t</xsl:attribute>
    	  <xsl:value-of
    select="name()"/></SPAN> <xsl:apply-templates 
    	  select="@*"/><SPAN class="m">
    /&gt;</SPAN>
      </DIV></DIV>
    </xsl:template>
     
    <!-- Template for elements with comment, pi and/or cdata children -->
    <xsl:template match="*[comment() | processing-instruction()]">
      <DIV class="e">
      <DIV class="c"><A href="#" onclick="return false" onfocus="h()"
    class="b">-</A> <SPAN 
    	  class="m">&lt;</SPAN><SPAN><xsl:attribute
    name="class"><xsl:if
    test="starts-with(name(),'xsl:')">x</xsl:if>t</xsl:attribute>
    	  <xsl:value-of
    select="name()"/></SPAN><xsl:apply-templates select="@*"/> 
    	  <SPAN
    class="m">&gt;</SPAN></DIV>
      <DIV><xsl:apply-templates/>
      <DIV><SPAN class="b"> </SPAN> <SPAN
    class="m">&lt;/</SPAN><SPAN><xsl:attribute name="class">
    	  <xsl:if
    test="starts-with(name(),'xsl:')">x</xsl:if>t</xsl:attribute>
    	  <xsl:value-of
    select="name()"/></SPAN><SPAN class="m">&gt;</SPAN></DIV>
      </DIV></DIV>
    </xsl:template>
     
    <!-- Template for elements with only text children -->
    <xsl:template match="*[text() and not(comment() |
    processing-instruction())]">
      <DIV class="e"><DIV STYLE="margin-left:1em;text-indent:-2em">
      <SPAN class="b"> </SPAN> <SPAN
    class="m">&lt;</SPAN><SPAN><xsl:attribute 
    	  name="class"><xsl:if
    test="starts-with(name(),'xsl:')">x</xsl:if>t</xsl:attribute>
    	  <xsl:value-of
    select="name()"/></SPAN><xsl:apply-templates select="@*"/>
      <SPAN class="m">&gt;</SPAN><SPAN class="tx">
    	  <xsl:value-of
    select="."/></SPAN><SPAN class="m">&lt;/</SPAN>
    	  <SPAN><xsl:attribute
    name="class"><xsl:if
    test="starts-with(name(),'xsl:')">x</xsl:if>t</xsl:attribute>
    	  <xsl:value-of
    select="name()"/></SPAN><SPAN class="m">&gt;</SPAN>
      </DIV></DIV>
    </xsl:template>
     
    <!-- Template for elements with element children -->
    <xsl:template match="*[*]">
      <DIV class="e">
      <DIV class="c" STYLE="margin-left:1em;text-indent:-2em"><A href="#"
    onclick="return false" onfocus="h()" class="b">-</A> <SPAN
    class="m">&lt;</SPAN><SPAN>
    	  <xsl:attribute name="class"><xsl:if
    test="starts-with(name(),'xsl:')">x</xsl:if>t</xsl:attribute>
    	  <xsl:value-of
    select="name()"/></SPAN><xsl:apply-templates select="@*"/> <SPAN
    class="m">&gt;</SPAN></DIV>
      <DIV><xsl:apply-templates/>
      <DIV><SPAN class="b"> </SPAN> <SPAN
    class="m">&lt;/</SPAN><SPAN><xsl:attribute 
    	  name="class"><xsl:if
    	  test="starts-with(name(),'xsl:')">x</xsl:if>
    t</xsl:attribute><xsl:value-of
    select="name()"/></SPAN><SPAN class="m">&gt;</SPAN></DIV>
      </DIV></DIV>
    </xsl:template>
     
    </xsl:stylesheet>

  5. #5
    Membre Expert
    Avatar de haskouse
    Homme Profil pro
    Salesforce
    Inscrit en
    Août 2009
    Messages
    923
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : Maroc

    Informations professionnelles :
    Activité : Salesforce
    Secteur : Conseil

    Informations forums :
    Inscription : Août 2009
    Messages : 923
    Par défaut
    Merci Morbo pr ta réponse,

    Est ce que avec ce XSL on peut obtenir l'arborescence de IE,
    tu sais les petits [+] pour developper les tags ?

    Merci encore.
    "Le savant qui enseigne le bien aux gens et ne le met pas en pratique, est semblable à la torche qui éclaire en se brûlant." Mohammed le Messager d’Allah (que la paix et le salut d'Allah soient sur lui)

    Tutoriels Talend
    Mes articles publiés
    Mon CV en-ligne

  6. #6
    Membre Expert
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    1 466
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 1 466
    Par défaut
    Je viens de tester et oui, ça marche les -/+ deploient correctement l'arborescence (j'ai du corriger quelques sauts lignes mal placé), mais sous IE.
    C'est sans doute adaptable aux autres navigateurs avec un peu de travail.
    Fichiers attachés Fichiers attachés
    • Type de fichier : xsl 1.xsl (14,4 Ko, 56 affichages)

  7. #7
    Membre Expert
    Avatar de haskouse
    Homme Profil pro
    Salesforce
    Inscrit en
    Août 2009
    Messages
    923
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : Maroc

    Informations professionnelles :
    Activité : Salesforce
    Secteur : Conseil

    Informations forums :
    Inscription : Août 2009
    Messages : 923
    Par défaut
    Merci beaucoup,
    Je vais tester ça et je te reviens là dessus.
    "Le savant qui enseigne le bien aux gens et ne le met pas en pratique, est semblable à la torche qui éclaire en se brûlant." Mohammed le Messager d’Allah (que la paix et le salut d'Allah soient sur lui)

    Tutoriels Talend
    Mes articles publiés
    Mon CV en-ligne

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [ XML ][ XSL ][ JSP ] afficher du xml dans une JSP
    Par zozolh2 dans le forum Servlets/JSP
    Réponses: 9
    Dernier message: 17/07/2009, 20h34
  2. Insérer du XML dans une page HTML
    Par Shaman LizardKing dans le forum XML/XSL et SOAP
    Réponses: 14
    Dernier message: 04/05/2005, 07h27
  3. Réponses: 3
    Dernier message: 13/12/2004, 13h54
  4. Champs de type XML dans une base de données
    Par Flocodoupoil dans le forum Décisions SGBD
    Réponses: 3
    Dernier message: 07/07/2004, 18h57
  5. problème xsl : inclure une donnée xml dans une balise html
    Par djodjo dans le forum XSL/XSLT/XPATH
    Réponses: 3
    Dernier message: 03/01/2003, 09h24

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