This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: HOW TO FORMAT A XML USING A XSL FILE


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]