You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/04/02 14:43:11 UTC

svn commit: r643882 - /lenya/trunk/src/modules/news/xslt/collection2rss.xsl

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>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org