------------------------------------MON FICHIER XML 
Code: 
<FMPDSORESULT> 
  <ROW> 
     <TLS_S_NomTache>Tache1</TLS_S_NomTache> 
     <TLS_S_Scenario>Scenario 1.1</TLS_S_Scenario> 
     <TLS_TLA_NomTLA1>lot1.1</TLS_TLA_NomTLA1> 
     <TLS_TLA_NomTLA2>lot1.2</TLS_TLA_NomTLA2> 
     <TLS_TLA_NomTLA3>lot1.3</TLS_TLA_NomTLA3> 
  </ROW> 
  <ROW> 
     <TLS_S_NomTache>Tache1</TLS_S_NomTache> 
     <TLS_S_Scenario>Scenario 1.1</TLS_S_Scenario> 
     <TLS_TLA_NomTLA1>lot2</TLS_TLA_NomTLA1> 
  </ROW> 
  <ROW> 
     <TLS_S_NomTache>Tache2</TLS_S_NomTache> 
     <TLS_S_Scenario>Scenario 2</TLS_S_Scenario> 
     <TLS_TLA_NomTLA1>lot3</TLS_TLA_NomTLA1> 
  </ROW> 
  ...    
</FMPDSORESULT> 
------------------------------------MON FICHIER XML de sortie 
Code: 
<map> 
  <node TEXT="hypertim"> 
  <edge WIDTH="1" STYLE="bezier"/> 
    <node TEXT="tache1" POSITION="right"> 
    <edge WIDTH="1" STYLE="bezier"/> 
      <node TEXT="scenario1.1"> 
      <edge WIDTH="1" STYLE="bezier"/> 
        <node TEXT="type de lot"> 
        <edge WIDTH="1" STYLE="bezier"/> 
          <node TEXT="lot1.1"><edge WIDTH="1" STYLE="bezier"/></node> 
          <node TEXT="lot1.2"><edge WIDTH="1" STYLE="bezier"/></node> 
          <node TEXT="lot1.3"> <edge WIDTH="1" STYLE="bezier"/></node> 
        </node> 
        <node TEXT="lot2" /> 
      </node> 
      <node TEXT="scenario1.2" /> 
    </node> 
    <node TEXT="tache2" POSITION="right"> 
    <edge WIDTH="1" STYLE="bezier"/> 
      <node TEXT="scenario2"> 
      <edge WIDTH="1" STYLE="bezier"/> 
        <node TEXT="lot3"><edge WIDTH="1" STYLE="bezier"/></node> 
      </node> 
    </node> 
  </node> 
</map> 
------------------------------------MON 2eme FICHIER XSL 
Code: 
<?xml version="1.0"?> 
<xsl:stylesheet version="1.0" xmlns

sl="http://www.w3.org/1999/XSL/Transform" 
xmlns:fmp="http://www.filemaker.com/fmpdsoresult" exclude-result-prefixes="fmp"> 
<xsl:output method="xml" encoding="iso-8859-1"/> 
  
<xsl:template match="fmp:FMPDSORESULT"> 
 <xsl:element name="map"> 
    <xsl:apply-templates select="*"/> 
 </xsl:element> 
</xsl:template> 
<xsl:template match="fmp:ROW"> 
  <xsl:element name="node"> 
    <xsl:apply-templates select="*"/> 
   </xsl:element> 
</xsl:template> 
<xsl:template match="*"> 
  <xsl:attribute name="TEXT"><xsl:value-of select="fmp:TLS_S_NomTache"/></xsl:attribute> 
  <xsl:attribute name="POSITION"><xsl:text>right</xsl:text></xsl:attribute> 
  <xsl:element name="edge"> 
     <xsl:attribute name="width"> <xsl:text>1</xsl:text></xsl:attribute> 
     <xsl:attribute name="STYLE"><xsl:text>bezier</xsl:text></xsl:attribute> 
  </xsl:element> 
</xsl:template> 
</xsl:stylesheet> 
			
		
 
	
Partager