Last change
on this file was
329,
checked in by piv, 18 years ago
|
realise 0.2
|
File size:
1.5 KB
|
Rev | Line | |
---|
[320] | 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 | xmlns:dc="http://purl.org/dc/elements/1.1/"> |
---|
| 6 | |
---|
| 7 | <xsl:template match="/"> |
---|
| 8 | <xsl:for-each select="*"> |
---|
| 9 | <!-- matched 'metadata' element and we copy it --> |
---|
[329] | 10 | <xsl:copy> |
---|
[320] | 11 | <xsl:for-each select="*|text()"> |
---|
| 12 | <xsl:choose> |
---|
| 13 | <!-- do some special with 'field' elements --> |
---|
| 14 | <xsl:when test="name()='field'"> |
---|
| 15 | <xsl:apply-templates select="." /> |
---|
| 16 | </xsl:when> |
---|
| 17 | <!-- copy all other elements --> |
---|
| 18 | <xsl:otherwise> |
---|
| 19 | <xsl:copy-of select="."/> |
---|
| 20 | </xsl:otherwise> |
---|
| 21 | </xsl:choose> |
---|
| 22 | </xsl:for-each> |
---|
| 23 | </xsl:copy> |
---|
| 24 | </xsl:for-each> |
---|
| 25 | </xsl:template> |
---|
| 26 | |
---|
| 27 | <xsl:template match="at:field"> |
---|
| 28 | <xsl:choose> |
---|
| 29 | <xsl:when test="@name='sent_title'"> |
---|
[323] | 30 | <dc:title> |
---|
| 31 | <xsl:value-of select="."/> |
---|
| 32 | </dc:title> |
---|
[320] | 33 | </xsl:when> |
---|
| 34 | <xsl:when test="@name='sent_message'"> |
---|
[329] | 35 | <xsl:copy> |
---|
[320] | 36 | <xsl:attribute name="name">thanksPrologue</xsl:attribute> |
---|
| 37 | <xsl:value-of select="." /> |
---|
| 38 | </xsl:copy> |
---|
| 39 | </xsl:when> |
---|
| 40 | <!-- skip all other elements --> |
---|
| 41 | <xsl:otherwise /> |
---|
| 42 | </xsl:choose> |
---|
| 43 | </xsl:template> |
---|
| 44 | |
---|
| 45 | </xsl:stylesheet> |
---|
Note: See
TracBrowser
for help on using the repository browser.