Author: andreas
Date: Wed Apr 2 05:43:10 2008
New Revision: 643882
URL: http://svn.apache.org/viewvc?rev=643882&view=rev
Log:
Use <xsl:attribute> instead of {@xml:lang} to avoid xmlns:xml to appear in the output.
Modified:
lenya/trunk/src/modules/news/xslt/collection2rss.xsl
Modified: lenya/trunk/src/modules/news/xslt/collection2rss.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/xslt/collection2rss.xsl?rev=643882&r1=643881&r2=643882&view=diff
==============================================================================
--- lenya/trunk/src/modules/news/xslt/collection2rss.xsl (original)
+++ lenya/trunk/src/modules/news/xslt/collection2rss.xsl Wed Apr 2 05:43:10 2008
@@ -69,13 +69,23 @@
<xsl:template match="col:document[xhtml:html]">
<item>
- <title><meta:value element="title" ns="http://purl.org/dc/elements/1.1/" uuid="{@uuid}" lang="{@xml:lang}"/></title>
- <description><meta:value element="description" ns="http://purl.org/dc/elements/1.1/" uuid="{@uuid}" lang="{@xml:lang}"/></description>
+ <!--
+ We have to use <xsl:attribute> instead of attribute-value-templates
+ for @xml:lang to avoid the xmlns:xml declaration in the output.
+ -->
+ <title><meta:value element="title" ns="http://purl.org/dc/elements/1.1/" uuid="{@uuid}">
+ <xsl:attribute name="lang"><xsl:value-of select="@xml:lang"/></xsl:attribute>
+ </meta:value></title>
+ <description><meta:value element="description" ns="http://purl.org/dc/elements/1.1/" uuid="{@uuid}" lang="{@xml:lang}">
+ <xsl:attribute name="lang"><xsl:value-of select="@xml:lang"/></xsl:attribute>
+ </meta:value></description>
<xsl:variable name="href">
<xsl:call-template name="getHref"/>
</xsl:variable>
<link><xhtml:a href="{$href}"/></link>
- <author><meta:value element="creator" ns="http://purl.org/dc/elements/1.1/" uuid="{@uuid}" lang="{@xml:lang}"/></author>
+ <author><meta:value element="creator" ns="http://purl.org/dc/elements/1.1/" uuid="{@uuid}">
+ <xsl:attribute name="lang"><xsl:value-of select="@xml:lang"/></xsl:attribute>
+ </meta:value></author>
<pubDate><i18n:date-time locale="en" src-pattern="yyyy-MM-dd hh:mm:ss" pattern="EEE, dd MMM yyyy HH:mm:ss Z" value="{dc:date}"/></pubDate>
</item>
</xsl:template>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.