source: products/quintagroup.transmogrifier.simpleblog2quills/trunk/quintagroup/transmogrifier/simpleblog2quills/blogfolder-folder.xsl @ 1244

Last change on this file since 1244 was 293, checked in by chervol, 18 years ago

fixed typos in RSS2.pt

File size: 1.6 KB
Line 
1<xsl:stylesheet version="1.0" 
2     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3     xmlns:at="http://plone.org/ns/archetypes/"
4     xmlns:cmf="http://cmf.zope.org/namespaces/default/">
5
6<xsl:template match="/">
7    <xsl:for-each select="*">
8        <!-- matched 'metadata' element and we copy it -->
9        <xsl:copy select=".">
10            <xsl:for-each select="*|text()">
11                <xsl:choose>
12                    <!-- do some special with 'field' elements -->
13                    <xsl:when test="name()='field'">
14                        <xsl:apply-templates select="." />
15                    </xsl:when>
16                    <!-- change value of 'cmf:type' attribute -->
17                    <xsl:when test="name()='cmf:type'">
18                        <xsl:apply-templates select="." />
19                    </xsl:when>
20                    <!-- copy all other elements -->
21                    <xsl:otherwise>
22                        <xsl:copy-of select="."/>
23                    </xsl:otherwise>
24                </xsl:choose>
25            </xsl:for-each>
26        </xsl:copy>
27    </xsl:for-each>
28</xsl:template>
29
30<xsl:template match="at:field">
31    <xsl:choose>
32        <!-- next fields are omitted -->
33        <xsl:when test="@name='existingCats'" />
34        <xsl:when test="@name='categories'" />
35        <!-- copy all other elements -->
36        <xsl:otherwise>
37            <xsl:copy-of select="."/>
38        </xsl:otherwise>
39    </xsl:choose>
40</xsl:template>
41
42<xsl:template match="cmf:type">
43    <xsl:copy select=".">
44        <xsl:text>Folder</xsl:text>
45    </xsl:copy>
46</xsl:template>
47
48</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.