Tema: xsl y css
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 01/03/2004, 06:46
Avatar de Helbira
Helbira
 
Fecha de Ingreso: octubre-2001
Ubicación: Sevilla, España
Mensajes: 1.228
Antigüedad: 22 años, 6 meses
Puntos: 5
Quizás este ejemplo para insertarlo en el XSL te ayude:


catalog.xsl

Código PHP:
<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
  <html>
  <head>
   <link rel="stylesheet" href="prueba.css" type="text/css" />
  </head>
  <body>
    <h2>My CD Collection</h2>
    <table>
    <tr >
      <th>Title</th>
      <th>Artist</th>
    </tr>
    <xsl:for-each select="catalog/cd">
    <tr>
      <td><xsl:value-of select="title"/></td>
      <td><xsl:value-of select="artist"/></td>
    </tr>
    </xsl:for-each>
    </table>
  </body>
  </html>
</xsl:template>

</xsl:stylesheet>
catalog.xml

Código PHP:
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml
-stylesheet type="text/xsl" href="catalog.xsl"?>
<catalog>
   <cd>
      <title>Título</title>
      <artist>Artist</artist>
   </cd>
</catalog>