Subject: Re: HOW TO FORMAT A XML USING A XSL FILE
From: Oscar Rueda <orp@xxxxxxxxx>
Date: Mon, 11 Mar 2002 19:06:48 +0100
|
Hello, Carlos
Maybe this code could be of litlle help. Try it and we'll see
Oscar Rueda
*********************************************************************************************************
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" indent="yes" encoding="ISO-8859-1"/>
<xsl:template match="/">
<xsl:for-each select="FOROS/FORO/QUESTIONS/QUESTION">
<xsl:sort select="TITLE" />
<p><xsl:value-of select="TITLE" /></p>
<xsl:apply-templates select="RESPUESTA"/>
</xsl:for-each>
</xsl:template>
<xsl:template match="//RESPUESTA" name="RESPUESTA">
<BLOCKQUOTE>
<xsl:value-of select="TITLE" />.-
<xsl:apply-templates select="RESPUESTA" >
<xsl:sort select="TITLE" />
</xsl:apply-templates>
</BLOCKQUOTE>
</xsl:template>
</xsl:stylesheet>
******************************************************************************************************************************
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|