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 :

parser le contenu de deux fichiers XML


Sujet :

XSL/XSLT/XPATH XML

  1. #21
    Membre du Club
    Femme Profil pro
    Développeur informatique
    Inscrit en
    Février 2012
    Messages
    110
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Transports

    Informations forums :
    Inscription : Février 2012
    Messages : 110
    Points : 65
    Points
    65
    Par défaut
    pour le regroupement
    à quel endroit elles se trouvent dans l'arborescence
    alors a la limite ce que je pourrais faire, c'est de regrouper les balises qui ont le meme nom au "2eme etage" de l'arborescence, puis au "3eme etage" de l'arborescence, c'est faisable? a priori les balises identiques sont au meme etage.


    pour le probleme d'affichage que j'ai montre, c'est le meme type de structure avec laquelle ca pose un probleme:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    <?xml version="1.0" encoding="UTF-8" ?> 
    <balise0>						<!--segmentref -->
    	<balise1>					<!--compositeref -->
    		<balise2>opopop</balise2>		<!--DATA -->
     
    	</balise1>
    	<balise4>					<!--SEGMENTREF & COMPOSITEREF -->
    		<balise1>blablabla</balise1>		<!-- COMPOSITE & DATA-->
    	</balise4>
    	<balise5>pfiouplala</balise5>			<!--segmentref & DATA -->
    	<balise6>bababa</balise6>			<!--DATA -->
    	<balise8>pfioupioupiou</balise8>		<!--DATA -->
    </balise0>

    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
    <ROOT> 
    <GROUPS>
    	<COMPOSITE ID="532421" SMARTNAME="balise1"  DESCRIPTION= "balise numero 1">
    		<SEGMENTREF ID="52452" SMARTNAME="balise0"  DESCRIPTION= "balise numero 0"/>
    		<GROUP ID="676144" SMARTNAME="balise3"  DESCRIPTION= "balise numero 3">
    			<SEGMENTREF ID="5445" SMARTNAME="balise4"  DESCRIPTION= "balise numero 4"/>
    		</GROUP>
    	</GROUP>
    </GROUPS>
    <SEGMENTS>
    	<SEGMENT ID="241254" SMARTNAME="balise5"  DESCRIPTION= "balise numero 5">
    		<COMPOSITEREF ID="25454" SMARTNAME="balise5"  DESCRIPTION= "balise numero 5"/>
    		<DATA ID="245005" SMARTNAME="balise2"  DESCRIPTION= "balise numero 2">
    			<CODESETS>
    				<CODESET TAG="pfioupioupiou" DESCRIPTION="explication de la valeur de pfioupioupiou"/>
    				<CODESET TAG="blablabla" DESCRIPTION="explication de la valeur de blablabla"/>
    				<CODESET TAG="opopop" DESCRIPTION="explication de la valeur de opopop"/>
    			</CODESETS>
    		</DATA>
    	</SEGMENT>
    </SEGMENTS>
    <COMPOSITES>
    	<COMPOSITE ID="8637" SMARTNAME="balise7"  DESCRIPTION= "balise numero 7"/>
    		<DATA ID="23574254" SMARTNAME="balise6"  DESCRIPTION= "balise numero 6">
    			<CODESETS>
    				<CODESET TAG="didadidadou" DESCRIPTION="explication de la valeur de didadidadou"/>
    			</CODESETS>
    		</DATA>
    		<DATA ID="23574254" SMARTNAME="balise8"  DESCRIPTION= "balise numero 8">
    			<CODESETS>
    				<CODESET TAG="ploploplo" DESCRIPTION="explication de la valeur de ploploplo"/>
    			</CODESETS>
    		</DATA>
    </COMPOSITES>
    </ROOT>


    et pour le javascript, voici le code

    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
    function afficheId(baliseId) 
      {
      if (document.getElementById && document.getElementById(baliseId) != null) 
        {
        document.getElementById(baliseId).style.visibility='visible';
        document.getElementById(baliseId).style.display='block';
        }
      }
     
    function cacheId(baliseId) 
      {
      if (document.getElementById && document.getElementById(baliseId) != null) 
        {
        document.getElementById(baliseId).style.visibility='hidden';
        document.getElementById(baliseId).style.display='none';
        }
      }
     
    cacheId('contenu');
    voici le aprtie ou je l'insere
    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
    <xsl:template name="opSEGMENT">
    	<xsl:param name="structure" />
    	<xsl:variable name="nomBalise" select="local-name(.)" />	
    	<xsl:variable name="typeBalise" select="local-name($structure//*[@SMARTNAME=$nomBalise])"/>
    	<div class="segment">
    	<p class="segment_smartname"><xsl:value-of select="$nomBalise"/></p>
    		<div class="segment_descr">
    			<a href="javascript:afficheId('contenu')"><xsl:value-of select="$nomBalise"/>: show content</a>
    		</div>	
    		<div class="segment" id="contenu">
    			<div class="clicCacher">
    				<a href="javascript:cacheId('contenu');">Hide content</a>
    			</div>
    			<p class="segment_description"><xsl:value-of select="$structure//*[@SMARTNAME=$nomBalise]/@DESCRIPTION"/></p>
    			<xsl:choose>
    				<xsl:when test="child::*[$structure//DATA/@SMARTNAME = local-name()] or not(/child::*)">
    					<table border="1" cellspacing="0" cellpadding="3">
    						<br/><tr>
    							<th>Tag Name</th>
    							<th>Value</th>
    							<th>Tag Description</th>
    						</tr>
    						<xsl:apply-templates match="*">
    							<xsl:with-param name="structure" select="$structure"/>
    						</xsl:apply-templates>
    					</table>
    				</xsl:when>
    				<xsl:otherwise>
    					<xsl:apply-templates match="*">
    						<xsl:with-param name="structure" select="$structure"/>
    					</xsl:apply-templates>
    				</xsl:otherwise>
    			</xsl:choose>
    		</div>
    	</div><br/>
    </xsl:template>
    et voici tout mon 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
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    body
    {
      font-family:Times New Roman;
    }
     
    p span.mouseover
    {
      display: none;
    }
     
     
     
    p:hover span.mouseover
    {
      display: block;
      position: absolute; top: 200px; left: 300px; width: 125px;
      padding: 5px; margin: 10px; z-index: 100;
      color: #AAA; background: black;
      font: 10px Verdana, sans-serif; text-align: center;
    }
     
    span.comp_details span.mouseover
    {
      display: none;
    }
     
    span.comp_details:hover span.mouseover
    {
      display: block;
      position: absolute; top: 200px; left: 300px; width: 125px;
      padding: 5px; margin: 10px; z-index: 100;
      color: #AAA; background: black;
      font: 10px Verdana, sans-serif; text-align: center;
    }
     
     
    .message_desc
    {
    	font-size: x-large
    }
     
    .group
    {
      border: 1px white ;
      padding-left:20px;
      width:98%;
      background-color:#EFEFFB;
      background: url('degradeS.jpg') repeat-x;
     
      -moz-border-radius:25px;
    }
     
    .group_descr
    {
      text-align:left;
      /* border-bottom:1px solid black; trait*/
    }
     
    .group_description
    {
      padding-left:4px;
    }
     
    .group_smartname
    {
      font-weight:bold;
    }
     
    .segment
    {
      border: 0x black groove; /* cadre */
      padding-left:15px;
      background: url('degradee.jpg') repeat-x;
      width:98%;
    }
     
    .segment_smartname
    {
      font-weight:bold;
    }
     
    .composite
    {
      border: 1px rgb(100,150,200) groove; /* cadre */
      padding:10px;
      padding-left:15px;
      background-color: rgb(230,235,240);;  
      line-height: 0.2;
      width:98%;
    }
     
    .composite_smartname
    {
      font-weight:bold;
    }
     
     
     
    table
    {
    	border-collapse: collapse;
    line-height: 1.0;
    }
     
    th 
    {
    	background-color: #dedede;
    	border: 1px solid black;
    }
     
    td 
    {
    	border: 1px solid black;
    }
     
     
    .clicCacher
      {
      top: -20px;
      position: relative;
      text-align:right;
      }
    en effet je pense que tu as raison,
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <div class="segment" id="contenu">
    ne doit pas suffire pour recuperer le contenu entre les deux balises, mais ca me semble quand meme etonnant car l'id "contenu" est nouveau 'a chaque fois, non?

  2. #22
    Membre du Club
    Femme Profil pro
    Développeur informatique
    Inscrit en
    Février 2012
    Messages
    110
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Transports

    Informations forums :
    Inscription : Février 2012
    Messages : 110
    Points : 65
    Points
    65
    Par défaut
    et voila l’intégralité du xsl!

    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
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output  method="html"  encoding="ISO-8859-1" doctype-public="-//W3C//DTD HTML 4.01//EN" doctype-system="http://www.w3.org/TR/html4/strict.dtd" indent="yes" />
    <xsl:key name="regrouper" match="*" use="local-name(.)"/>   <!-- ????????? -->
     
    <xsl:template match="/">
    	<html>
    	<link rel="stylesheet" type="text/css" href="style.css" />
    	<body>
     
    <!--	<xsl:for-each select="*[generate-id(.)=generate-id(key('regrouper', .)[1])]">                                 /AAA/XXX/preceding-sibling::* ???-->
    		<xsl:apply-templates match="*">
    			<xsl:with-param name="structure" select="document('struct1.xml')"/>
    		</xsl:apply-templates>
    <!--	</xsl:for-each> -->
    <script src="hidden.js"></script>
    	</body>
    	</html>
    </xsl:template>
     
    <xsl:template match="*">																			<!-- depth-first path: browses all the tags from top to bottom-->
    	<xsl:param name="structure" />
     
    	<xsl:variable name="nomBalise" select="local-name(.)" />   										<!-- easier to read, name og the Tag on the current XML file-->
    	<xsl:variable name="typeBalise" select="local-name($structure//*[@SMARTNAME=$nomBalise])"/>
     
    	<xsl:choose>																					<!-- we call the template of the current element's type -->
     
    		<xsl:when test="not(child::*)">   		
    			<xsl:call-template name="opDATA">
    				<xsl:with-param name="structure" select="$structure"/>
    			</xsl:call-template>
    		</xsl:when>	
     
    		<xsl:when test="$typeBalise = '' and $nomBalise = 'message'">	
    			<xsl:call-template name="opMESSAGE"> 
    				<xsl:with-param name="structure" select="$structure"/> 
    			</xsl:call-template>
    		</xsl:when>
     
     
     
    		<xsl:when test="$typeBalise = 'COMPOSITE' or $typeBalise = 'COMPOSITEREF'">
    			<xsl:call-template name="opCOMPOSITE">
    				<xsl:with-param name="structure" select="$structure"/>
    			</xsl:call-template>
    		</xsl:when>
     
    		<xsl:when test="$typeBalise = 'SEGMENT' or $typeBalise = 'SEGMENTREF'"> 						<!-- we don't need to the test again for SEGMENTREF SEGMENTREF -->
    <!--			<xsl:for-each select="*[generate-id(.)=generate-id(key('regrouper', .)[1])]">		-->
    				<xsl:call-template name="opSEGMENT">
    					<xsl:with-param name="structure" select="$structure"/>
    				</xsl:call-template>
    <!--			</xsl:for-each>																		-->
    		</xsl:when>		
     
    		<xsl:when test="$typeBalise = 'GROUP' or $typeBalise = 'GROUPREF'">								<!-- for all elements of the type GROUP. the actual element, . or current(), is a GROUP-->
    			<xsl:call-template name="opGROUP"> 															<!-- we call the template opGROUP, which manages GROUP elements -->
    				<xsl:with-param name="structure" select="$structure"/> 									<!-- we can reuse $structure -->
    			</xsl:call-template>
    		</xsl:when>
     
    		<xsl:otherwise>																					<!-- in case of, if we have a message with an unknow tag type, we ignore it -->
    			<xsl:apply-templates match="*">
    				<xsl:with-param name="structure" select="$structure"/>
    			</xsl:apply-templates>
    		</xsl:otherwise>
    	</xsl:choose>
     
    </xsl:template>
     
    <xsl:template name="opMESSAGE">
    	<xsl:param name="structure" />
    	<xsl:variable name="nomBalise" select="local-name(.)" />	
    	<xsl:variable name="nomMessage" select="@type" />	
    	<xsl:variable name="typeBalise" select="local-name($structure//*[@TAG=$nomMessage])"/>
    	<div class="message">
    		<div class="group_message">
    			<h1> Message: <xsl:value-of select="@type"/><br/> <xsl:value-of select="$structure//*[@TAG=$nomMessage]/@NAME"/></h1>
    			<p class="message_desc">Domain: <xsl:value-of select="$structure//*[@TAG=$nomMessage]/@DOMAIN"/><br/>Version: <xsl:value-of select="$structure//*[@TAG=$nomMessage]/@VERSION"/></p>
    			<p class="message_desc">Function: <xsl:value-of select="$structure//*[@TAG=$nomMessage]/@FUNCTION"/></p>
    			<p class="message_meaning"><xsl:value-of select="$structure//*[@TAG=$nomMessage]/@MEANING"/></p>
     
    			<!-- All the elements (*) sons of the actual element -->
    			<xsl:apply-templates match="*">
    				<xsl:with-param name="structure" select="$structure"/>
    			</xsl:apply-templates>
    		</div><br/>
    	</div>
    </xsl:template>
     
    <xsl:template name="opGROUP">
    	<xsl:param name="structure" />
    	<xsl:variable name="nomBalise" select="local-name(.)" />	
    	<xsl:variable name="typeBalise" select="local-name($structure//*[@SMARTNAME=$nomBalise])"/>
    	<div class="group">
    		<div class="group_descr">
    			<p class="group_smartname"><xsl:value-of select="$nomBalise"/></p>
    			<p class="group_description"><xsl:value-of select="$structure//*[@SMARTNAME=$nomBalise]/@DESCRIPTION"/></p>
    			<xsl:choose>																															<!-- for all the childs of the actual element-->
    				<xsl:when test="child::*[$structure//DATA/@SMARTNAME = local-name()] or not(/child::*)">
    					<table border="1" cellspacing="0" cellpadding="3">
    						<br/><tr>
    							<th>Tag Name</th>
    							<th>Value</th>
    							<th>Tag Description</th>
    						</tr>
    						<xsl:apply-templates match="*">
    							<xsl:with-param name="structure" select="$structure"/>
    						</xsl:apply-templates>
    					</table>
    				</xsl:when>
    				<xsl:otherwise>
    					<xsl:apply-templates match="*">
    						<xsl:with-param name="structure" select="$structure"/>
    					</xsl:apply-templates>
    				</xsl:otherwise>
    			</xsl:choose>
    		</div><br/>
    	</div>
    </xsl:template>
     
     
     
     
    <xsl:template name="opSEGMENT">
    	<xsl:param name="structure" />
    	<xsl:variable name="nomBalise" select="local-name(.)" />	
    	<xsl:variable name="typeBalise" select="local-name($structure//*[@SMARTNAME=$nomBalise])"/>
    	<div class="segment">
    	<p class="segment_smartname"><xsl:value-of select="$nomBalise"/></p>
    		<div class="segment_descr">
    			<a href="javascript:afficheId('contenu')"><xsl:value-of select="$nomBalise"/>: show content</a>
    		</div>	
    		<div class="segment" id="contenu">
    			<div class="clicCacher">
    				<a href="javascript:cacheId('contenu');">Hide content</a>
    			</div>
    			<p class="segment_description"><xsl:value-of select="$structure//*[@SMARTNAME=$nomBalise]/@DESCRIPTION"/></p>
    			<xsl:choose>
    				<xsl:when test="child::*[$structure//DATA/@SMARTNAME = local-name()] or not(/child::*)">
    					<table border="1" cellspacing="0" cellpadding="3">
    						<br/><tr>
    							<th>Tag Name</th>
    							<th>Value</th>
    							<th>Tag Description</th>
    						</tr>
    						<xsl:apply-templates match="*">
    							<xsl:with-param name="structure" select="$structure"/>
    						</xsl:apply-templates>
    					</table>
    				</xsl:when>
    				<xsl:otherwise>
    					<xsl:apply-templates match="*">
    						<xsl:with-param name="structure" select="$structure"/>
    					</xsl:apply-templates>
    				</xsl:otherwise>
    			</xsl:choose>
    		</div>
    	</div><br/>
    </xsl:template>
     
    <xsl:template name="opDATA">
    	<xsl:param name="structure"/>
     	<xsl:variable name="nomBalise" select="local-name(.)" />	
    	<xsl:variable name="typeBalise" select="local-name($structure//*[@SMARTNAME=$nomBalise])"/>
    		<tr>
    			<td><xsl:value-of select="$nomBalise"/></td>
    			<td><xsl:value-of select="."/></td>
    			<td><xsl:value-of select="$structure//*[@SMARTNAME=$nomBalise]/@DESCRIPTION"/></td>
    <!--		<td><xsl:value-of select="local-name($structure//*[@SMARTNAME=$nomBalise])"/></td>		-->
    		</tr>
    </xsl:template>
     
    <xsl:template name="opCOMPOSITE">
    	<xsl:param name="structure" />
    	<xsl:variable name="nomBalise" select="local-name(.)" />	
    	<xsl:variable name="typeBalise" select="local-name($structure//*[@SMARTNAME=$nomBalise])"/>
    	<div class="composite">
    		<div class="composite_descr">
    			<p class="composite_smartname"><xsl:value-of select="$nomBalise"/></p>
    			<p class="composite_description"><xsl:value-of select="$structure//*[@SMARTNAME=$nomBalise]/@DESCRIPTION"/></p>
    			<xsl:choose>
    				<xsl:when test="child::*[$structure//DATA/@SMARTNAME = local-name()] or not(/child::*)">
    					<table border="1" cellspacing="0" cellpadding="3">
    						<br/><tr>
    							<th>Tag Name</th>
    							<th>Value</th>
    							<th>Tag Description</th>
    						</tr>
    						<xsl:apply-templates match="*">
    							<xsl:with-param name="structure" select="$structure"/>
    						</xsl:apply-templates>
    					</table>
    				</xsl:when>
    				<xsl:otherwise>
    					<xsl:apply-templates match="*">
    						<xsl:with-param name="structure" select="$structure"/>
    					</xsl:apply-templates>
    				</xsl:otherwise>
    			</xsl:choose>
    		</div>
    	</div><br/>
    </xsl:template>
     
    </xsl:stylesheet>

  3. #23
    Membre du Club
    Femme Profil pro
    Développeur informatique
    Inscrit en
    Février 2012
    Messages
    110
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Transports

    Informations forums :
    Inscription : Février 2012
    Messages : 110
    Points : 65
    Points
    65
    Par défaut
    struct1.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
    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
    <?xml version="1.0" encoding="UTF-8"?>
    <ROOT>
        <SOURCE>Visual Services 5 - XML Generator</SOURCE>
        <VERSION>1</VERSION>
        <INTERFACE NAME="NCMFMT" VERSION="55" RELEASE="0" DESCRIPTION="Based on version 54.2
    
    Adding CFSTUQ/R 11.2
    " EXPORT_AS_DEG="FALSE">
    	<MESSAGE ID="_47607_M_NCMFMT" TAG="CBRIRQ" AGENCY="1A" DOMAIN="DCS_CM_FLI" VERSION="10" RELEASE="1" REVISION="1" NAME="Bypass Revenue Integrity Indicator Retrieve" STATE="Draft" TYPENAME="EdiCBRIRQ" SEPARATOR="+" PUBLISHED="false" AREA="115" CHARACTERSET="Default" FUNCTION="to retrieve the bypass revenue integrity check" MEANING="to retrieve the bypass revenue integrity check indicators">
    		<SEGMENTREF ID="_7228_S_NCMFMT" SMARTNAME="orginatorLog" STATUS="C" REPETITION="1" DESCRIPTION="To convey :
    - the system log in of the user
    - id of the terminal in which the message was sent" XMLCOMMENT="" TAG="ORG" AGENCY="IA" DOMAIN="AMA" VERSION="01" RELEASE="2" REVISION="3" DELEGATED="FALSE" STATE="Certified"/>
    		<SEGMENTREF ID="_78956_S_NCMFMT" SMARTNAME="flightId" STATUS="M" REPETITION="1" DESCRIPTION="To convey:
    - The operating carrier
    - The flight number
    - the suffix
    - departure port
    - the local date of operation" XMLCOMMENT="" TAG="FDR" AGENCY="1A" DOMAIN="DCS_COMMON_CM" VERSION="09" RELEASE="1" REVISION="1" DELEGATED="FALSE" STATE="Certified"/>
    	</MESSAGE>
    		<SEGMENT ID="_27722_S_NCMFMT" TAG="FDQ" AGENCY="1A" DOMAIN="DCS_ACC" VERSION="06" RELEASE="1" REVISION="1" NAME="FLIGHT DETAILS QUERY" STATE="Draft" TYPENAME="EdiFDQ" DELEGATED="FALSE" AIBSUFFIX="" FUNCTION="To specify outbound and inbound flight information." MEANING="To specify flights selected by the agent">
    		<COMPOSITEREF ID="_49602_C_NCMFMT" SMARTNAME="carrierDetails" STATUS="M*" REPETITION="1" DESCRIPTION="provide information on the oncarriage flight carrier" XMLCOMMENT="" TAG="C013" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="169" STATE="Draft"/>
    		<COMPOSITEREF ID="_49603_C_NCMFMT" SMARTNAME="flightDetails" STATUS="M*" REPETITION="1" DESCRIPTION="Reference of the oncarriage Flight" XMLCOMMENT="" TAG="C014" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="158" STATE="Draft"/>
    		<DATA ID="_169592_D_NCMFMT" SMARTNAME="departureDate" STATUS="M*" REPETITION="1" DESCRIPTION="To convey the Departure Date of the Flight." XMLCOMMENT="" DATATYPE="n" XMLTYPE="Date_YYYYMMDD" MINLEN="1" MAXLEN="8" PROCESSING="n" TAG="2281" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="163" NAME="Departure date and time" STATE="Draft" FUNCTION="Outbound local date and time of departure." MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID="">
    		</DATA>
    		<DATA ID="_169593_D_NCMFMT" SMARTNAME="boardPoint" STATUS="M*" REPETITION="1" DESCRIPTION="The port of departure code of the oncarriage flight" XMLCOMMENT="" DATATYPE="a" XMLTYPE="" MINLEN="1" MAXLEN="5" PROCESSING="n" TAG="3215" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="189" NAME="Place of departure, coded" STATE="Draft" FUNCTION="Outbound airport/city of departure." MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID="">
    		</DATA>
    		<DATA ID="_169594_D_NCMFMT" SMARTNAME="offPoint" STATUS="C" REPETITION="1" DESCRIPTION="The port of destination code of the oncarriage flight" XMLCOMMENT="" DATATYPE="a" XMLTYPE="" MINLEN="1" MAXLEN="5" PROCESSING="n" TAG="3259" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="204" NAME="Place of destination, coded" STATE="Draft" FUNCTION="Destination airport/city code." MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID="">
    		</DATA>
    		<DATA ID="_169591_D_NCMFMT" SMARTNAME="arrivalDate" STATUS="C" REPETITION="1" DESCRIPTION="" XMLCOMMENT="" DATATYPE="n" XMLTYPE="Date_YYYYMMDD" MINLEN="1" MAXLEN="8" PROCESSING="n" TAG="2107" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="148" NAME="Arrival date and time" STATE="Draft" FUNCTION="Outbound local date and time of arrival." MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID="">
    		</DATA>
    		<DATA ID="_169597_D_NCMFMT" SMARTNAME="inboundService" STATUS="N/A" REPETITION="1" DESCRIPTION="" XMLCOMMENT="" DATATYPE="a" XMLTYPE="" MINLEN="1" MAXLEN="1" PROCESSING="n" TAG="9857" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="146" NAME="Inbound type of service indicator" STATE="Draft" FUNCTION="To specify the type of service on an inbound means of transport." MEANING="" CODED="T" FASTDECODINGFLAG="N" FASTDECODINGID="" EXHAUSTIVE="T">
    			<CODESETS>
    				<CODESET TAG="A" DESCRIPTION="Air"/>
    				<CODESET TAG="B" DESCRIPTION="Bus, coach"/>
    				<CODESET TAG="F" DESCRIPTION="Fictitious flight"/>
    				<CODESET TAG="P" DESCRIPTION="Passenger's own disposition, unknown"/>
    				<CODESET TAG="R" DESCRIPTION="Railroad, Train"/>
    				<CODESET TAG="T" DESCRIPTION="Taxi, Limousine"/>
    			</CODESETS>
    		</DATA>
    		<COMPOSITEREF ID="_49606_C_NCMFMT" SMARTNAME="dateAndTimeRange" STATUS="N/A" REPETITION="2" DESCRIPTION="To covney the Departure and Arrival Dates" XMLCOMMENT="" TAG="C310" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="432" STATE="Draft"/>
    	</SEGMENT>
    	<COMPOSITE ID="_2504_C_NCMFMT" TAG="C013" AGENCY="IA" VERSION="01" RELEASE="2" REVISION="41" NAME="OUTBOUND CARRIER DETAILS" STATE="Certified" TYPENAME="EdiOutboundCarrierDetails" FUNCTION="To identify the airline company and an associated airline company." MEANING="">
    		<DATA ID="_15896_D_NCMFMT" SMARTNAME="marketingCarrier" STATUS="M" REPETITION="1" DESCRIPTION="The carrier code" XMLCOMMENT="" DATATYPE="an" XMLTYPE="" MINLEN="1" MAXLEN="3" PROCESSING="n" TAG="3127" AGENCY="IA" VERSION="01" RELEASE="2" REVISION="69" NAME="Carrier identification" STATE="Certified" FUNCTION="Party undertaking or arranging transport of goods between named points." MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID="">
    		</DATA>
    		<DATA ID="_15896_D_NCMFMT" SMARTNAME="operatingCarrier" STATUS="N/A" REPETITION="1" DESCRIPTION="" XMLCOMMENT="" DATATYPE="an" XMLTYPE="" MINLEN="1" MAXLEN="17" PROCESSING="n" TAG="3127" AGENCY="IA" VERSION="01" RELEASE="2" REVISION="69" NAME="Carrier identification" STATE="Certified" FUNCTION="Party undertaking or arranging transport of goods between named points." MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID="">
    		</DATA>
    		<DATA ID="_15896_D_NCMFMT" SMARTNAME="otherCarrier" STATUS="C" REPETITION="1" DESCRIPTION="This data element is used to send the second carrier is case of OPEN segment." XMLCOMMENT="" DATATYPE="an" XMLTYPE="" MINLEN="1" MAXLEN="3" PROCESSING="n" TAG="3127" AGENCY="IA" VERSION="01" RELEASE="2" REVISION="69" NAME="Carrier identification" STATE="Certified" FUNCTION="Party undertaking or arranging transport of goods between named points." MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID="">
    		</DATA>
    	</COMPOSITE>
    	<MESSAGE ID="_13423_M_NCMFMT" TAG="CLBTDQ" AGENCY="1A" DOMAIN="DCS" VERSION="05" RELEASE="0" REVISION="1" NAME="Delete Latest Boarding Time Query" STATE="Draft" TYPENAME="EdiCLBTDQ" SEPARATOR="+" PUBLISHED="false" AREA="115" CHARACTERSET="Default" FUNCTION="Delete Latest Boarding Time" MEANING="C stands for customer manangement activity
    LBT stands for Latest Boarding Time
    D stands for Delete
    Q stands for Query">
    		<SEGMENTREF ID="_7228_S_NCMFMT" SMARTNAME="originatorDetails" STATUS="C" REPETITION="1" DESCRIPTION="To convey :
    - the system login of the user
    - id of the terminal in which the message was sent" XMLCOMMENT="" TAG="ORG" AGENCY="IA" DOMAIN="AMA" VERSION="01" RELEASE="2" REVISION="3" DELEGATED="FALSE" STATE="Certified"/>
    		<SEGMENTREF ID="_429_S_NCMFMT" SMARTNAME="flightDetails" STATUS="M" REPETITION="1" DESCRIPTION="To specify the Flight identification :
    - Carrier (operating airline)
    - flight number
    - suffix
    - departure port code
    - Local date of operation (aka local departure date of first leg)" XMLCOMMENT="" TAG="FDR" AGENCY="1A" DOMAIN="DCS_BO" VERSION="04" RELEASE="1" REVISION="8" DELEGATED="FALSE" STATE="Certified"/>
    	</MESSAGE>
    	<SEGMENTREF ID="_13618_S_NCMFMT" SMARTNAME="departureDate" STATUS="C" REPETITION="1" DESCRIPTION="Specifies date for which to subscribe." XMLCOMMENT="" TAG="SDI" AGENCY="1A" DOMAIN="DCS_DATE" VERSION="04" RELEASE="1" REVISION="1" DELEGATED="FALSE" STATE="Certified"/>
        <SEGMENTREF ID="_33853_S_NCMFMT" SMARTNAME="locationInfo" STATUS="M" REPETITION="1" DESCRIPTION="Conveys:
    - Boardpoint
    - Terminal (optional)" XMLCOMMENT="" TAG="ANI" AGENCY="1A" DOMAIN="DCS_FLI" VERSION="07" RELEASE="1" REVISION="1" DELEGATED="FALSE" STATE="Draft"/>
    	<GROUPREF ID="_98082_G_NCMFMT" SMARTNAME="offpointsToInclude" STATUS="M" REPETITION="9" DESCRIPTION="in case multi leg customers excluded option is selected in the bzr, this allows you to override it for paxes going to these specific ports." XMLCOMMENT="" TAG="OFFG" AGENCY="1A" DOMAIN="DCS_FLI" VERSION="09" RELEASE="1" REVISION="1" DELEGATED="FALSE" STATE="Certified"/>
         <SEGMENTREF ID="_116736_S_NCMFMT" SMARTNAME="versions" STATUS="M" REPETITION="4" DESCRIPTION="Versions sent to CM Flight determining which entity is modified:
    - FV: Flight Version
    - SV: Status Version
    - TV: Timing Version
    - DV: Leg Data Version" XMLCOMMENT="" TAG="IRV" AGENCY="1A" DOMAIN="DCS_FM" VERSION="11" RELEASE="1" REVISION="6" DELEGATED="FALSE" STATE="Draft"/>
          <COMPOSITEREF ID="_18861_C_NCMFMT" SMARTNAME="idSection" STATUS="M*" REPETITION="1" DESCRIPTION="ID details" XMLCOMMENT="" TAG="A010" AGENCY="1A" VERSION="02" RELEASE="1" REVISION="263" STATE="Certified"/>
            <DATA ID="_643521_D_NCMFMT" SMARTNAME="versionNumber" STATUS="M*" REPETITION="1" DESCRIPTION="version number" XMLCOMMENT="" DATATYPE="n" XMLTYPE="integer" MINLEN="1" MAXLEN="5" PROCESSING="n" TAG="4000" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="1815" NAME="Reference version number" STATE="Draft" FUNCTION="To uniquely identify a reference by its revision number." MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID="">
                    </DATA>
    <DATA ID="_643525_D_NCMFMT" SMARTNAME="referenceQualifier" STATUS="M*" REPETITION="1" DESCRIPTION="ID qualifier" XMLCOMMENT="" DATATYPE="an" XMLTYPE="string" MINLEN="1" MAXLEN="3" PROCESSING="n" TAG="1153" AGENCY="1A" VERSION="10" RELEASE="1" REVISION="491" NAME="Reference qualifier" STATE="Draft" FUNCTION="Code giving specific meaning to a reference segment or a reference number." MEANING="Note: Use defined code or an ATA/IATA defined Form Of Identification (See AIRIMP 3.11.2)  Additional approved codes may be listed below." CODED="T" FASTDECODINGFLAG="N" FASTDECODINGID="" EXHAUSTIVE="T">
                        <CODESETS>
                            <CODESET TAG="DV" DESCRIPTION="Leg Data version"/>
                            <CODESET TAG="FV" DESCRIPTION="Flight version"/>
                            <CODESET TAG="SV" DESCRIPTION="Status version"/>
                            <CODESET TAG="TV" DESCRIPTION="Timing version"/>
                        </CODESETS>
                    </DATA>
    <COMPOSITEREF ID="_18861_C_NCMFMT" SMARTNAME="idSection" STATUS="M*" REPETITION="1" DESCRIPTION="ID details" XMLCOMMENT="" TAG="A010" AGENCY="1A" VERSION="02" RELEASE="1" REVISION="263" STATE="Certified"/>
               <SEGMENTREF ID="_1269_S_NCMFMT" SMARTNAME="timeConveyed" STATUS="C" REPETITION="7" DESCRIPTION="To convey :
    - The local standard time of departure (2005:STD/2005:L)
    - The local estimated time of departure (2005:ETD/2005:L)
    - The local actual time of departure (2005:ATD/2005:L)
    - The local standard time of arrival (2005:STA/2005:L)
    - The local estimated time of arrival (2005:ETA/2005:L)
    - The local actual time of arrival (2005:ATA/2005:L)" XMLCOMMENT="" TAG="SDI" AGENCY="1A" DOMAIN="DCS_FM" VERSION="02" RELEASE="1" REVISION="1" DELEGATED="FALSE" STATE="Draft"/>
                   <DATA ID="_3714_D_NCMFMT" SMARTNAME="businessSemantic" STATUS="M*" REPETITION="1" DESCRIPTION="This data element can be used to provide the semantic of the information provided.
    Examples :
    - Impacted period
    - Departure date
    - Estimated arrival date and time" XMLCOMMENT="" DATATYPE="an" XMLTYPE="" MINLEN="1" MAXLEN="3" PROCESSING="n" TAG="2005" AGENCY="IA" VERSION="01" RELEASE="2" REVISION="84" NAME="Date/Time/Period qualifer" STATE="Certified" FUNCTION="Code giving specific meaning to a date, time or period." MEANING="" CODED="T" FASTDECODINGFLAG="N" FASTDECODINGID="" EXHAUSTIVE="T">
                        <CODESETS>
                            <CODESET TAG="ADV" DESCRIPTION="Advice time of departure"/>
                            <CODESET TAG="ALL" DESCRIPTION="Allocated time, in local"/>
                            <CODESET TAG="ALT" DESCRIPTION="Allocated time"/>
                            <CODESET TAG="ATA" DESCRIPTION="Actual time of arrival"/>
                            <CODESET TAG="ATD" DESCRIPTION="Actual time of departure"/>
                            <CODESET TAG="ETA" DESCRIPTION="Estimated time of arrival"/>
                            <CODESET TAG="ETD" DESCRIPTION="Estimated time of departure"/>
                            <CODESET TAG="FDT" DESCRIPTION="Range from date"/>
                            <CODESET TAG="LBT" DESCRIPTION="Latest Boarding Time"/>
                            <CODESET TAG="LDT" DESCRIPTION="Log date"/>
                            <CODESET TAG="MAT" DESCRIPTION="Message Arrival Time"/>
                            <CODESET TAG="PDT" DESCRIPTION="Purge date"/>
                            <CODESET TAG="SDT" DESCRIPTION="Search Date Time Range"/>
                            <CODESET TAG="STA" DESCRIPTION="Standard time of arrival"/>
                            <CODESET TAG="STD" DESCRIPTION="Standard time of departure"/>
                            <CODESET TAG="TDT" DESCRIPTION="Range to date"/>
                            <CODESET TAG="VDT" DESCRIPTION="Validity date range"/>
                        </CODESETS>
                    </DATA>
    <DATA ID="_3714_D_NCMFMT" SMARTNAME="timeMode" STATUS="C" REPETITION="1" DESCRIPTION="Indicate if the time is expressed in UTC or in local time mode ( Codes U and L ).
    In the last case, the time zone information can be provided in the composite C89K." XMLCOMMENT="" DATATYPE="an" XMLTYPE="" MINLEN="1" MAXLEN="3" PROCESSING="n" TAG="2005" AGENCY="IA" VERSION="01" RELEASE="2" REVISION="84" NAME="Date/Time/Period qualifer" STATE="Certified" FUNCTION="Code giving specific meaning to a date, time or period." MEANING="" CODED="T" FASTDECODINGFLAG="N" FASTDECODINGID="" EXHAUSTIVE="T">
                        <CODESETS>
                            <CODESET TAG="ADV" DESCRIPTION="Advice time of departure"/>
                            <CODESET TAG="ALL" DESCRIPTION="Allocated time, in local"/>
                            <CODESET TAG="ALT" DESCRIPTION="Allocated time"/>
                            <CODESET TAG="ATA" DESCRIPTION="Actual time of arrival"/>
                            <CODESET TAG="ATD" DESCRIPTION="Actual time of departure"/>
                            <CODESET TAG="ETA" DESCRIPTION="Estimated time of arrival"/>
                            <CODESET TAG="ETD" DESCRIPTION="Estimated time of departure"/>
                            <CODESET TAG="FDT" DESCRIPTION="Range from date"/>
                            <CODESET TAG="LBT" DESCRIPTION="Latest Boarding Time"/>
                            <CODESET TAG="LDT" DESCRIPTION="Log date"/>
                            <CODESET TAG="MAT" DESCRIPTION="Message Arrival Time"/>
                            <CODESET TAG="PDT" DESCRIPTION="Purge date"/>
                            <CODESET TAG="SDT" DESCRIPTION="Search Date Time Range"/>
                            <CODESET TAG="STA" DESCRIPTION="Standard time of arrival"/>
                            <CODESET TAG="STD" DESCRIPTION="Standard time of departure"/>
                            <CODESET TAG="TDT" DESCRIPTION="Range to date"/>
                            <CODESET TAG="VDT" DESCRIPTION="Validity date range"/>
                        </CODESETS>
                    </DATA>
    <COMPOSITEREF ID="_1889_C_NCMFMT" SMARTNAME="dateTime" STATUS="M*" REPETITION="1" DESCRIPTION="Convey date and/or time." XMLCOMMENT="" TAG="A017" AGENCY="1A" VERSION="02" RELEASE="1" REVISION="22" STATE="Draft"/>
                                <COMPOSITE ID="_108861_C_NCMFMT" TAG="A017" AGENCY="1A" VERSION="02" RELEASE="1" REVISION="1458" NAME="Structured date time information" STATE="Draft" TYPENAME="EdiStructuredDateTimeInformation4" FUNCTION="Store date and time in a structured way" MEANING="">
                    <DATA ID="_396837_D_NCMFMT" SMARTNAME="year" STATUS="N/A" REPETITION="1" DESCRIPTION="Year number." XMLCOMMENT="" DATATYPE="n" XMLTYPE="" MINLEN="4" MAXLEN="4" PROCESSING="n" TAG="332K" AGENCY="1A" VERSION="02" RELEASE="1" REVISION="2441" NAME="Year number" STATE="Draft" FUNCTION="Used to indicate the year number" MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID="">
                    </DATA>
                    <DATA ID="_396836_D_NCMFMT" SMARTNAME="month" STATUS="N/A" REPETITION="1" DESCRIPTION="Month number in the year ( begins to 1 )" XMLCOMMENT="" DATATYPE="n" XMLTYPE="" MINLEN="1" MAXLEN="2" PROCESSING="n" TAG="331K" AGENCY="1A" VERSION="02" RELEASE="1" REVISION="2428" NAME="Month number" STATE="Draft" FUNCTION="Used to indicate the number of a month ( 1 is the first month of the year )" MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID="">
                    </DATA>
                    <DATA ID="_396835_D_NCMFMT" SMARTNAME="day" STATUS="N/A" REPETITION="1" DESCRIPTION="Day number in the month ( begins to 1 )" XMLCOMMENT="" DATATYPE="n" XMLTYPE="" MINLEN="1" MAXLEN="2" PROCESSING="n" TAG="330K" AGENCY="1A" VERSION="02" RELEASE="1" REVISION="2439" NAME="Day number" STATE="Draft" FUNCTION="Used to indicate the number of a day ( 1 is the first day )" MEANING="Implementation of APPROVED DATA ELEMENT" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID="">
                    </DATA>
                    <DATA ID="_396838_D_NCMFMT" SMARTNAME="hour" STATUS="M*" REPETITION="1" DESCRIPTION="Hour between 0 and 23" XMLCOMMENT="" DATATYPE="n" XMLTYPE="" MINLEN="1" MAXLEN="2" PROCESSING="n" TAG="333K" AGENCY="1A" VERSION="02" RELEASE="1" REVISION="2107" NAME="Hours" STATE="Draft" FUNCTION="Used to indicate a number of hours" MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID="">
                    </DATA>
                    <DATA ID="_396839_D_NCMFMT" SMARTNAME="minutes" STATUS="M*" REPETITION="1" DESCRIPTION="Minutes between 0 and 59" XMLCOMMENT="" DATATYPE="n" XMLTYPE="" MINLEN="1" MAXLEN="2" PROCESSING="n" TAG="334K" AGENCY="1A" VERSION="02" RELEASE="1" REVISION="2107" NAME="Minutes" STATE="Draft" FUNCTION="Used to indicate a number of minutes" MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID="">
                    </DATA>
                    <DATA ID="_396840_D_NCMFMT" SMARTNAME="seconds" STATUS="N/A" REPETITION="1" DESCRIPTION="Seconds between 0 and 59" XMLCOMMENT="" DATATYPE="n" XMLTYPE="" MINLEN="1" MAXLEN="2" PROCESSING="n" TAG="335K" AGENCY="1A" VERSION="02" RELEASE="1" REVISION="1246" NAME="Seconds" STATE="Draft" FUNCTION="Used to indicate a number of seconds" MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID="">
                    </DATA>
                    <DATA ID="_396841_D_NCMFMT" SMARTNAME="milliseconds" STATUS="N/A" REPETITION="1" DESCRIPTION="Milliseconds between 0 and 999." XMLCOMMENT="" DATATYPE="n" XMLTYPE="" MINLEN="1" MAXLEN="3" PROCESSING="n" TAG="336K" AGENCY="1A" VERSION="02" RELEASE="1" REVISION="1246" NAME="Milliseconds" STATE="Draft" FUNCTION="Used to indicate a number of milliseconds" MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID="">
                    </DATA>
                </COMPOSITE>				
    	</INTERFACE>
    </ROOT>
    exemple1.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
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    <?xml version="1.0" encoding="UTF-8"?>
    <message type="CFSTUQ" agency="1A" version="11" release="1">
      <flightId>    <!--  segmentref  -->
        <carrierDetails>    <!--  COMPOSITEREF  -->
          <marketingCarrier>TP</marketingCarrier>    <!--  DATA  -->
        </carrierDetails>    
        <flightDetails>    <!-- SEGMENTREF and COMPOSITEREF   -->
          <flightNumber>239</flightNumber>    <!--  COMPOSITE and DATA  -->
        </flightDetails>   
        <departureDate>20111125</departureDate>    <!--  SEGMENTREF and DATA  -->
        <boardPoint>CMN</boardPoint>    <!--  DATA  -->
        <offPoint>LIS</offPoint>   <!--SEGMENTREF & DATA--> 
      </flightId>   
      <versions>   
        <idSection>    
          <versionNumber>1</versionNumber>   
          <referenceQualifier>SV</referenceQualifier>   
        </idSection>   
      </versions>    
      <versions>    
        <idSection>    
          <versionNumber>0</versionNumber>   
          <referenceQualifier>TV</referenceQualifier>    
        </idSection>    
      </versions>   
      <timeConveyed>  
        <businessSemantic>ETA</businessSemantic>  
        <timeMode>L</timeMode>   
        <dateTime>   
          <year>2011</year>   
          <month>11</month>    
          <day>25</day>    
          <hour>14</hour>
          <minutes>30</minutes>
          <seconds>0</seconds>
        </dateTime>
      </timeConveyed>
      <timeConveyed>
        <businessSemantic>ETD</businessSemantic>
        <timeMode>L</timeMode>
        <dateTime>
          <year>2011</year>
          <month>11</month>
          <day>25</day>
          <hour>15</hour>
          <minutes>0</minutes>
          <seconds>0</seconds>
        </dateTime>
      </timeConveyed>
    </message>

  4. #24
    Expert confirmé
    Avatar de Loceka
    Profil pro
    Inscrit en
    Mars 2004
    Messages
    2 276
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2004
    Messages : 2 276
    Points : 4 845
    Points
    4 845
    Par défaut
    Et surtout le XSL qui va avec ces données s'il te plaît.

  5. #25
    Membre du Club
    Femme Profil pro
    Développeur informatique
    Inscrit en
    Février 2012
    Messages
    110
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Transports

    Informations forums :
    Inscription : Février 2012
    Messages : 110
    Points : 65
    Points
    65
    Par défaut
    il me semble que j'ai tout bien mis

    styleSheet.xsl
    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
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     
                    xmlns:lxslt="http://xml.apache.org/xslt"
                    xmlns:result="http://www.example.com/results"
                    extension-element-prefixes="result">
    <xsl:output  method="html"  encoding="ISO-8859-1" doctype-public="-//W3C//DTD HTML 4.01//EN" doctype-system="http://www.w3.org/TR/html4/strict.dtd" indent="yes" />
    <xsl:key name="regrouper" match="*" use="local-name(.)"/>   <!-- ????????? -->
     
    <xsl:template match="/">
    	<html>
    	<link rel="stylesheet" type="text/css" href="style.css" />
    	<body>
     
    <!--	<xsl:for-each select="*[generate-id(.)=generate-id(key('regrouper', .)[1])]">                                 /AAA/XXX/preceding-sibling::* ???-->
    		<xsl:apply-templates match="*">
    			<xsl:with-param name="structure" select="document('struct1.xml')"/>
    		</xsl:apply-templates>
    <!--	</xsl:for-each> -->
    <script src="hidden.js"></script>
    	</body>
    	</html>
    </xsl:template>
     
    <xsl:template match="*">																			<!-- depth-first path: browses all the tags from top to bottom-->
    	<xsl:param name="structure" />
     
    	<xsl:variable name="nomBalise" select="local-name(.)" />   										<!-- easier to read, name og the Tag on the current XML file-->
    	<xsl:variable name="typeBalise" select="local-name($structure//*[@SMARTNAME=$nomBalise])"/>
     
    	<xsl:choose>																					<!-- we call the template of the current element's type -->
     
    		<xsl:when test="not(child::*)">   		
    			<xsl:call-template name="opDATA">
    				<xsl:with-param name="structure" select="$structure"/>
    			</xsl:call-template>
    		</xsl:when>	
     
    		<xsl:when test="$typeBalise = '' and $nomBalise = 'message'">	
    			<xsl:call-template name="opMESSAGE"> 
    				<xsl:with-param name="structure" select="$structure"/> 
    			</xsl:call-template>
    		</xsl:when>
     
    		<xsl:when test="$typeBalise = 'COMPOSITE' or $typeBalise = 'COMPOSITEREF'">
    			<xsl:call-template name="opCOMPOSITE">
    				<xsl:with-param name="structure" select="$structure"/>
    			</xsl:call-template>
    		</xsl:when>
     
    		<xsl:when test="$typeBalise = 'SEGMENT' or $typeBalise = 'SEGMENTREF'"> 						<!-- we don't need to the test again for SEGMENTREF SEGMENTREF -->
    <!--			<xsl:for-each select="*[generate-id(.)=generate-id(key('regrouper', .)[1])]">		-->
    				<xsl:call-template name="opSEGMENT">
    					<xsl:with-param name="structure" select="$structure"/>
    				</xsl:call-template>
    <!--			</xsl:for-each>																		-->
    		</xsl:when>		
     
    		<xsl:when test="$typeBalise = 'GROUP' or $typeBalise = 'GROUPREF'">								<!-- for all elements of the type GROUP. the actual element, . or current(), is a GROUP-->
    			<xsl:call-template name="opGROUP"> 															<!-- we call the template opGROUP, which manages GROUP elements -->
    				<xsl:with-param name="structure" select="$structure"/> 									<!-- we can reuse $structure -->
    			</xsl:call-template>
    		</xsl:when>
     
    		<xsl:otherwise>																					<!-- in case of, if we have a message with an unknow tag type, we ignore it -->
    			<xsl:apply-templates match="*">
    				<xsl:with-param name="structure" select="$structure"/>
    			</xsl:apply-templates>
    		</xsl:otherwise>
    	</xsl:choose>
     
    </xsl:template>
     
    <xsl:template name="opMESSAGE">
    	<xsl:param name="structure" />
    	<xsl:variable name="nomBalise" select="local-name(.)" />	
    	<xsl:variable name="nomMessage" select="@type" />	
    	<xsl:variable name="typeBalise" select="local-name($structure//*[@TAG=$nomMessage])"/>
    	<div class="message">
    		<div class="group_message">
    			<h1> Message: <xsl:value-of select="@type"/><br/> <xsl:value-of select="$structure//*[@TAG=$nomMessage]/@NAME"/></h1>
    			<p class="message_desc">Domain: <xsl:value-of select="$structure//*[@TAG=$nomMessage]/@DOMAIN"/><br/>Version: <xsl:value-of select="$structure//*[@TAG=$nomMessage]/@VERSION"/></p>
    			<p class="message_desc">Function: <xsl:value-of select="$structure//*[@TAG=$nomMessage]/@FUNCTION"/></p>
    			<p class="message_meaning"><xsl:value-of select="$structure//*[@TAG=$nomMessage]/@MEANING"/></p>
     
    			<!-- All the elements (*) sons of the actual element -->
    			<xsl:apply-templates match="*">
    				<xsl:with-param name="structure" select="$structure"/>
    			</xsl:apply-templates>
    		</div><br/>
    	</div>
    </xsl:template>
     
    <xsl:template name="opGROUP">
    	<xsl:param name="structure" />
    	<xsl:variable name="nomBalise" select="local-name(.)" />	
    	<xsl:variable name="typeBalise" select="local-name($structure//*[@SMARTNAME=$nomBalise])"/>
    	<div class="group">
    		<div class="group_descr">
    			<p class="group_smartname"><xsl:value-of select="$nomBalise"/></p>
    			<p class="group_description"><xsl:value-of select="$structure//*[@SMARTNAME=$nomBalise]/@DESCRIPTION"/></p>
    			<xsl:choose>																															<!-- for all the childs of the actual element-->
    				<xsl:when test="child::*[$structure//DATA/@SMARTNAME = local-name()] or not(/child::*)">
    					<table border="1" cellspacing="0" cellpadding="3">
    						<br/><tr>
    							<th>Tag Name</th>
    							<th>Value</th>
    							<th>Tag Description</th>
    						</tr>
    						<xsl:apply-templates match="*">
    							<xsl:with-param name="structure" select="$structure"/>
    						</xsl:apply-templates>
    					</table>
    				</xsl:when>
    				<xsl:otherwise>
    					<xsl:apply-templates match="*">
    						<xsl:with-param name="structure" select="$structure"/>
    					</xsl:apply-templates>
    				</xsl:otherwise>
    			</xsl:choose>
    		</div><br/>
    	</div>
    </xsl:template>
     
     
     
     
    <xsl:template name="opSEGMENT">
    	<xsl:param name="structure" />
    	<xsl:variable name="nomBalise" select="local-name(.)" />	
    	<xsl:variable name="typeBalise" select="local-name($structure//*[@SMARTNAME=$nomBalise])"/>
    	<div class="segment">
    	<script type="text/javascript">
    //return a random integer between 0 and 10
    var randomnumber=Math.floor(Math.random()*1000000);
    </script>
    	<p class="segment_smartname"><xsl:value-of select="$nomBalise"/></p>
    		<div class="segment_descr">		
    			<a href="javascript:afficheId('randomnumber')"><xsl:value-of select="$nomBalise"/>: show content</a>
    		</div>	
    		<div class="segment" id="randomnumber">
    			<div class="clicCacher">
    				<a href="javascript:cacheId('randomnumber');">Hide content</a>
    			</div>
    			<p class="segment_description"><xsl:value-of select="$structure//*[@SMARTNAME=$nomBalise]/@DESCRIPTION"/></p>
    			<xsl:choose>
    				<xsl:when test="child::*[$structure//DATA/@SMARTNAME = local-name()] or not(/child::*)">
    					<table border="1" cellspacing="0" cellpadding="3">
    						<br/><tr>
    							<th>Tag Name</th>
    							<th>Value</th>
    							<th>Tag Description</th>
    						</tr>
    						<xsl:apply-templates match="*">
    							<xsl:with-param name="structure" select="$structure"/>
    						</xsl:apply-templates>
    					</table>
    				</xsl:when>
    				<xsl:otherwise>
    					<xsl:apply-templates match="*">
    						<xsl:with-param name="structure" select="$structure"/>
    					</xsl:apply-templates>
    				</xsl:otherwise>
    			</xsl:choose>
    		</div>
    	</div><br/>
    </xsl:template>
     
    <xsl:template name="opDATA">
    	<xsl:param name="structure"/>
     	<xsl:variable name="nomBalise" select="local-name(.)" />	
    	<xsl:variable name="typeBalise" select="local-name($structure//*[@SMARTNAME=$nomBalise])"/>
    		<tr>
    			<td><xsl:value-of select="$nomBalise"/></td>
    			<td><xsl:value-of select="."/></td>
    			<td><xsl:value-of select="$structure//*[@SMARTNAME=$nomBalise]/@DESCRIPTION"/></td>
    <!--		<td><xsl:value-of select="local-name($structure//*[@SMARTNAME=$nomBalise])"/></td>		-->
    		</tr>
    </xsl:template>
     
    <xsl:template name="opCOMPOSITE">
    	<xsl:param name="structure" />
    	<xsl:variable name="nomBalise" select="local-name(.)" />	
    	<xsl:variable name="typeBalise" select="local-name($structure//*[@SMARTNAME=$nomBalise])"/>
    	<div class="composite">
    		<div class="composite_descr">
    			<p class="composite_smartname"><xsl:value-of select="$nomBalise"/></p>
    			<p class="composite_description"><xsl:value-of select="$structure//*[@SMARTNAME=$nomBalise]/@DESCRIPTION"/></p>
    			<xsl:choose>
    				<xsl:when test="child::*[$structure//DATA/@SMARTNAME = local-name()] or not(/child::*)">
    					<table border="1" cellspacing="0" cellpadding="3">
    						<br/><tr>
    							<th>Tag Name</th>
    							<th>Value</th>
    							<th>Tag Description</th>
    						</tr>
    						<xsl:apply-templates match="*">
    							<xsl:with-param name="structure" select="$structure"/>
    						</xsl:apply-templates>
    					</table>
    				</xsl:when>
    				<xsl:otherwise>
    					<xsl:apply-templates match="*">
    						<xsl:with-param name="structure" select="$structure"/>
    					</xsl:apply-templates>
    				</xsl:otherwise>
    			</xsl:choose>
    		</div>
    	</div><br/>
    </xsl:template>
     
    </xsl:stylesheet>

  6. #26
    Expert confirmé
    Avatar de Loceka
    Profil pro
    Inscrit en
    Mars 2004
    Messages
    2 276
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2004
    Messages : 2 276
    Points : 4 845
    Points
    4 845
    Par défaut
    Il est impossible que tu aies un quelconque résultat en utilisant ce template étant donné qu'aux lignes 16, 66, 87, 110, 116, 154, 160, 197 et 203 tu utilises <xsl:apply-templates match="*">, ce qui est faux syntaxiquement (l'attribut match n'existe pas pour apply-templates, c'est l'attribut select) ou alors ton parser XSL est vraiment très permissif...

    Ceci dit en remplaçant les match par des select j'arrives à un résultat qui ressemble à tes screenshots.

    Bon alors pour le show/hide, c'est clairement un problème HTML et javascript. Voilà ton code :
    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
     
    <xsl:template name="opSEGMENT">
    	<!-- ... -->
    	<script type="text/javascript">
    	var randomnumber=Math.floor(Math.random()*1000000);
    	</script>
    	<p class="segment_smartname"><xsl:value-of select="$nomBalise"/></p>
    		<div class="segment_descr">
    			<a href="javascript:afficheId('randomnumber')"><xsl:value-of select="$nomBalise"/>: show content</a>
    		</div>
    		<div class="segment" id="randomnumber">
    			<div class="clicCacher">
    				<a href="javascript:cacheId('randomnumber');">Hide content</a>
    			</div>
    		</div>
    		<!-- ... -->
    	</p>
    </xsl:template>
    Et voilà ce qu'il fait :
    - il crée un script javascript qui initialise un nombre aléatoire
    - il crée un lien appellant la fonction javascript "afficheId()" avec un argument de type String valant "randomnumber"
    - il crée un div avec un ID ayant pour valeur la chaîne de caractère "randomnumber"
    - il crée un autre lien appellant la fonction javascript "cacheId()" avec un argument de type String valant "randomnumber"

    Donc clairement il y'a 3 choses totalement fausses là-dedans :
    1. Tu initialises une variable javascript que tu veux utiliser dans du HTML (l'ID), ce qui n'est pas possible
    2. Tu n'utilises pas cette variable dans les fonctions (entre guillemets c'est un string, pas la valeur de la variable)
    3. Même si tu arrivais à l'utiliser dans le HTML, les ID de type numériques sont totalement proscrits, ça a un comportement aléatoire


    Pour corriger ça il y'a 2 solutions :
    1. générer un ID unique en XSL et l'utiliser comme ID du div et dans la fonction javascript (sans utiliser le generate-id() vu que tu le redéfinis pour autre chose, mais en se basant sur le chemin XPath de l'élément par exemple)
    2. modifier la fonction javascript pour qu'elle n'ait pas besoin d'ID et prenne l'élément actuel en argument pour faire le traitement

    Clairement, j'opterais pour la solution n°2 qui est beaucoup plus simple à mettre en place.
    Elle a cependant l'inconvéniant par rapport à une fonction matchant un "ID" d'être dépendante de la structure du HTML généré.
    Ceci dit, si tu ne comptes pas modifier la structure du HTML tous les 3-4 matins, ça devrait être pas mal.

  7. #27
    Expert confirmé
    Avatar de Loceka
    Profil pro
    Inscrit en
    Mars 2004
    Messages
    2 276
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2004
    Messages : 2 276
    Points : 4 845
    Points
    4 845
    Par défaut
    Sinon j'ai regardé pour le regroupement et c'est effectivement faisable.
    Et c'est aussi effectivement assez lourd comme traitement et fastidieux à écrire/comprendre.

    Qui plus est, les résultats générés ne sont pas forcément simples à lire.

    Enfin voilà un code qui marche :
    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
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     
                    xmlns:lxslt="http://xml.apache.org/xslt"
                    xmlns:result="http://www.example.com/results"
                    extension-element-prefixes="result">
    <xsl:output  method="html"  encoding="ISO-8859-1" doctype-public="-//W3C//DTD HTML 4.01//EN" doctype-system="http://www.w3.org/TR/html4/strict.dtd" indent="yes" />
    <xsl:variable name="structure" select="document('struct1.xml')"/>
    <xsl:key name="regrouper" match="*[child::*]" use="concat(local-name(), '_', count(ancestor::*))"/>
     
    <xsl:template match="/">
    	<html>
    	<link rel="stylesheet" type="text/css" href="style.css" />
    	<body>
    		<xsl:apply-templates select="*">
    			<xsl:with-param name="structure" select="$structure"/>
    		</xsl:apply-templates>
    		<script src="hidden.js"></script>
    	</body>
    	</html>
    </xsl:template>
     
    <xsl:template match="*">
    	<xsl:param name="structure" />
     
    	<xsl:variable name="nomBalise" select="local-name(.)" />
    	<xsl:variable name="typeBalise" select="local-name($structure//*[@SMARTNAME=$nomBalise])"/>
     
    	<xsl:choose>
    		<xsl:when test="not(child::*)">
    			<xsl:call-template name="opDATA">
    				<xsl:with-param name="structure" select="$structure"/>
    			</xsl:call-template>
    		</xsl:when>
    		<xsl:otherwise>
    			<xsl:if test="generate-id(.) = generate-id(key('regrouper', concat(local-name(), '_', count(ancestor::*))))">
    				<xsl:choose>
    					<xsl:when test="$typeBalise = '' and $nomBalise = 'message'">
    						<xsl:call-template name="opMESSAGE">
    							<xsl:with-param name="structure" select="$structure"/>
    						</xsl:call-template>
    					</xsl:when>
     
    					<xsl:when test="$typeBalise = 'COMPOSITE' or $typeBalise = 'COMPOSITEREF'">
    						<xsl:call-template name="opCOMPOSITE">
    							<xsl:with-param name="structure" select="$structure"/>
    						</xsl:call-template>
    					</xsl:when>
     
    					<xsl:when test="$typeBalise = 'SEGMENT' or $typeBalise = 'SEGMENTREF'">
    						<xsl:call-template name="opSEGMENT">
    							<xsl:with-param name="structure" select="$structure"/>
    						</xsl:call-template>
    					</xsl:when>
     
    					<xsl:when test="$typeBalise = 'GROUP' or $typeBalise = 'GROUPREF'">
    						<xsl:call-template name="opGROUP">
    							<xsl:with-param name="structure" select="$structure"/>
    						</xsl:call-template>
    					</xsl:when>
     
    					<xsl:otherwise>
    						<xsl:apply-templates select="*">
    							<xsl:with-param name="structure" select="$structure"/>
    						</xsl:apply-templates>
    					</xsl:otherwise>
    				</xsl:choose>
    			</xsl:if>
    		</xsl:otherwise>
    	</xsl:choose>
     
    </xsl:template>
     
    <xsl:template name="opMESSAGE">
    	<xsl:param name="structure" />
    	<xsl:variable name="nomBalise" select="local-name(.)" />
    	<xsl:variable name="nomMessage" select="@type" />
    	<xsl:variable name="typeBalise" select="local-name($structure//*[@TAG=$nomMessage])"/>
    	<div class="message">
    		<div class="group_message">
    			<h1> Message: <xsl:value-of select="@type"/><br/> <xsl:value-of select="$structure//*[@TAG=$nomMessage]/@NAME"/></h1>
    			<p class="message_desc">Domain: <xsl:value-of select="$structure//*[@TAG=$nomMessage]/@DOMAIN"/><br/>Version: <xsl:value-of select="$structure//*[@TAG=$nomMessage]/@VERSION"/></p>
    			<p class="message_desc">Function: <xsl:value-of select="$structure//*[@TAG=$nomMessage]/@FUNCTION"/></p>
    			<p class="message_meaning"><xsl:value-of select="$structure//*[@TAG=$nomMessage]/@MEANING"/></p>
     
     
    			<xsl:for-each select="*[generate-id(.) = generate-id(key('regrouper', concat(local-name(), '_', count(ancestor::*))))]">
    				<xsl:variable name="id" select="concat(local-name(), '_', count(ancestor::*))"/>
    				<xsl:apply-templates select=".">
    					<xsl:with-param name="structure" select="$structure"/>
    				</xsl:apply-templates>
    			</xsl:for-each>
    		</div><br/>
    	</div>
    </xsl:template>
     
    <xsl:template name="opSEGMENT">
    	<xsl:param name="structure" />
     
    	<xsl:variable name="nomBalise" select="local-name()" />
    	<xsl:variable name="depth" select="count(ancestor::*)"/>
    	<xsl:variable name="siblings" select="//*[local-name() = $nomBalise and count(ancestor::*) = $depth]"/>
     
    	<div class="segment">
    		<p class="segment_smartname"><xsl:value-of select="$nomBalise"/></p>
    		<div class="segment_descr">
    			<a href="javascript:afficheId('randomnumber')"><xsl:value-of select="$nomBalise"/>: show content</a>
    		</div>
    		<div class="segment" id="randomnumber">
    			<div class="clicCacher">
    				<a href="javascript:cacheId('randomnumber');">Hide content</a>
    			</div>
    			<p class="segment_description"><xsl:value-of select="$structure//*[@SMARTNAME=$nomBalise]/@DESCRIPTION"/></p>
    			<xsl:if test="$siblings/self::*[not(child::*)] | $siblings/*[not(child::*)]">
    				<table border="1" cellspacing="0" cellpadding="3">
    					<tr>
    						<th>Tag Name</th>
    						<th>Value</th>
    						<th>Tag Description</th>
    					</tr>
    					<xsl:apply-templates select="$siblings/self::*[not(child::*)] | $siblings/*[not(child::*)]">
    						<xsl:with-param name="structure" select="$structure"/>
    					</xsl:apply-templates>
    				</table>
    			</xsl:if>
    			<xsl:if test="$siblings/*[child::*]">
    				<xsl:apply-templates select="$siblings/*[child::*]">
    					<xsl:with-param name="structure" select="$structure"/>
    				</xsl:apply-templates>
    			</xsl:if>
    		</div>
    	</div><br/>
    </xsl:template>
     
    <xsl:template name="opCOMPOSITE">
    	<xsl:param name="structure" />
     
    	<xsl:variable name="nomBalise" select="local-name(.)" />
    	<xsl:variable name="depth" select="count(ancestor::*)"/>
    	<xsl:variable name="siblings" select="//*[local-name() = $nomBalise and count(ancestor::*) = $depth]"/>
     
    	<div class="composite">
    		<div class="composite_descr">
    			<p class="composite_smartname"><xsl:value-of select="$nomBalise"/></p>
    			<p class="composite_description"><xsl:value-of select="$structure//*[@SMARTNAME=$nomBalise]/@DESCRIPTION"/></p>
    			<xsl:if test="$siblings/self::*[not(child::*)] | $siblings/*[not(child::*)]">
    				<table border="1" cellspacing="0" cellpadding="3">
    					<tr>
    						<th>Tag Name</th>
    						<th>Value</th>
    						<th>Tag Description</th>
    					</tr>
    					<xsl:apply-templates select="$siblings/self::*[not(child::*)] | $siblings/*[not(child::*)]">
    						<xsl:with-param name="structure" select="$structure"/>
    					</xsl:apply-templates>
    				</table>
    			</xsl:if>
    			<xsl:if test="$siblings/*[child::*]">
    				<xsl:apply-templates select="$siblings/*[child::*]">
    					<xsl:with-param name="structure" select="$structure"/>
    				</xsl:apply-templates>
    			</xsl:if>
    		</div>
    	</div><br/>
    </xsl:template>
     
    <xsl:template name="opGROUP">
    	<xsl:param name="structure" />
     
    	<xsl:variable name="nomBalise" select="local-name(.)" />
    	<xsl:variable name="depth" select="count(ancestor::*)"/>
    	<xsl:variable name="siblings" select="//*[local-name() = $nomBalise and count(ancestor::*) = $depth]"/>
     
    	<div class="group">
    		<div class="group_descr">
    			<p class="group_smartname"><xsl:value-of select="$nomBalise"/></p>
    			<p class="group_description"><xsl:value-of select="$structure//*[@SMARTNAME=$nomBalise]/@DESCRIPTION"/></p>
    			<xsl:if test="$siblings/self::*[not(child::*)] | $siblings/*[not(child::*)]">
    				<table border="1" cellspacing="0" cellpadding="3">
    					<tr>
    						<th>Tag Name</th>
    						<th>Value</th>
    						<th>Tag Description</th>
    					</tr>
    					<xsl:apply-templates select="$siblings/self::*[not(child::*)] | $siblings/*[not(child::*)]">
    						<xsl:with-param name="structure" select="$structure"/>
    					</xsl:apply-templates>
    				</table>
    			</xsl:if>
    			<xsl:if test="$siblings/*[child::*]">
    				<xsl:apply-templates select="$siblings/*[child::*]">
    					<xsl:with-param name="structure" select="$structure"/>
    				</xsl:apply-templates>
    			</xsl:if>
    		</div><br/>
    	</div>
    </xsl:template>
     
    <xsl:template name="opDATA">
    	<xsl:param name="structure"/>
     
     	<xsl:variable name="nomBalise" select="local-name(.)" />
     
    	<tr>
    		<td><xsl:value-of select="$nomBalise"/></td>
    		<td><xsl:value-of select="."/></td>
    		<td><xsl:value-of select="$structure//*[@SMARTNAME=$nomBalise]/@DESCRIPTION"/></td>
    	</tr>
    </xsl:template>
     
    </xsl:stylesheet>

  8. #28
    Membre du Club
    Femme Profil pro
    Développeur informatique
    Inscrit en
    Février 2012
    Messages
    110
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Transports

    Informations forums :
    Inscription : Février 2012
    Messages : 110
    Points : 65
    Points
    65
    Par défaut
    Merci beaucoup, c'est vraiment, vraiment, vraiment génial d'avoir passé autant de temps pour m'aider! je me lance donc dans la compréhension de toute ça

  9. #29
    Expert confirmé
    Avatar de Loceka
    Profil pro
    Inscrit en
    Mars 2004
    Messages
    2 276
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2004
    Messages : 2 276
    Points : 4 845
    Points
    4 845
    Par défaut
    Pas de quoi

    Pour info, je m'aperçois que je m'étais trompé quand j'ai écrit ça :
    Citation Envoyé par Loceka Voir le message
    Pour corriger ça il y'a 2 solutions :
    1. générer un ID unique en XSL et l'utiliser comme ID du div et dans la fonction javascript (sans utiliser le generate-id() vu que tu le redéfinis pour autre chose, mais en se basant sur le chemin XPath de l'élément par exemple)
    2. ...
    En fait, le résultat de generate-id() n'est pas modifié par l'introduction d'une clef. Il est donc possible de générer un ID unique pour l'élément en se servant de generate-id(), en faisant tout de même attention à ajouter une lettre devant afin de s'assurer que l'ID généré ne commence pas par un chiffre (interdit en HTML).

+ Répondre à la discussion
Cette discussion est résolue.
Page 2 sur 2 PremièrePremière 12

Discussions similaires

  1. Outils sur les différences entre deux fichiers XML
    Par Community Management dans le forum XML/XSL et SOAP
    Réponses: 19
    Dernier message: 21/07/2008, 15h21
  2. [XSLT] probleme de parcourt deux fichiers xml dans xsl
    Par coucouA dans le forum XSL/XSLT/XPATH
    Réponses: 5
    Dernier message: 23/07/2006, 20h32
  3. [JDOM] Comparer deux fichiers XML en Java
    Par calimero2611 dans le forum Format d'échange (XML, JSON...)
    Réponses: 5
    Dernier message: 30/06/2006, 11h19
  4. [XML] Convertir fichier XLS en deux fichiers XML
    Par Kornoman dans le forum XML/XSL et SOAP
    Réponses: 2
    Dernier message: 31/03/2006, 15h30
  5. Lire le contenu d'un fichier xml
    Par Invité dans le forum Bibliothèques
    Réponses: 4
    Dernier message: 10/01/2006, 19h13

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