<?xml version="1.0"?> 

<!--

$Id: srdf.xsl,v 1.1 2002/08/14 21:14:13 burtonator Exp $

Copyright (C) 2000-2003 Kevin A. Burton (burton@openprivacy.org)

This program is free software; you can redistribute it and/or modify it under
the terms of the LICENSE which you should have obtaind with this package.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                xmlns:rss="http://purl.org/rss/1.0/"
                xmlns:sub="http://purl.org/rss/1.0/modules/subscription/"
                version="1.0">
    
    <xsl:output indent="yes"/>

    <xsl:template match="/rdf:RDF">
        
        <rdf:RDF>

            <rdf:Description rdf:about="{rss:channel/@rdf:about}">

                <sub:channel>

                    <rdf:Bag>

                        <xsl:for-each select="rss:channel/sub:channel">
                            
                            <rdf:li rdf:resource="{@rdf:about}"/>
                            
                        </xsl:for-each>
                        
                    </rdf:Bag>

                </sub:channel>

            </rdf:Description>

            <xsl:apply-templates select="rss:channel/sub:channel"/>

        </rdf:RDF>

    </xsl:template>

    <xsl:template match="@*|node()">

        <xsl:copy-of select="."/>

    </xsl:template>

</xsl:stylesheet>

