xsl-list
[Top] [All Lists]

Re: [xsl] Display RSS by category (Muenchian Method)

2007-11-24 01:17:59
It seems the error is: the stylesheet does not end with, </xsl:stylesheet>

On 11/23/07, Brent Wilcox <cwilly00(_at_)yahoo(_dot_)com> wrote:
The stylesheet does not contain a document element.

Here is my XSL (using Jeni's Muenchian Method
example):

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

xmlns:common="http://exslt.org/common";
                      version="1.0">

<xsl:output method="html" />

<xsl:key name="items-by-category" match="item"
use="category" />
<xsl:template match="channel">
       <xsl:for-each select="item[count(. |
key('items-by-category', category)[1]) = 1]">
               <xsl:sort select="category" />
               <xsl:value-of select="category" />,<br />
               <xsl:for-each select="key('items-by-category',
category)">
                       <xsl:sort select="title" />
                       <xsl:value-of select="title" /> (<xsl:value-of
select="title" />)<br />
               </xsl:for-each>
       </xsl:for-each>
</xsl:template>


-- 
Regards,
Mukul Gandhi

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>