Hello to all:

I'm trying to simply convert a rss file to wml with an xsl stylesheet, but instead of converting, cocoon is only sending the xsl file, and i don't know why, as the same sitemap works for an html conversion from rss... I'm using Cocoon 2.1 with Linux mandrake 9.1, jdk 1.4.2_02 and tomcat 4.1.30.
The output:


<!DOCTYPE xsl:stylesheet PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml";>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"; xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; xmlns:rss="http://purl.org/rss/1.0/"; version="1.0"><xsl:output method="wml"/><xsl:template match="/"><WML><CARD TITLE="RSS newsfeed" ID="id1"><xsl:apply-templates/></CARD></WML></xsl:template><xsl:template match="rss:channel"><DO TYPE="accept"><xsl:attribute name="LABEL"><xsl:value-of select="rss:title"/></xsl:attribute><GO><xsl:attribute name="HREF"><xsl:value-of select="rss:link"/></xsl:attribute></GO></DO></xsl:template><xsl:template match="rss:item"><DO TYPE="accept"><xsl:attribute name="label"><xsl:value-of select="rss:title"/></xsl:attribute><GO><xsl:attribute name="HREF"><xsl:value-of select="rss:link"/></xsl:attribute></GO></DO></xsl:template><xsl:template match="text()"/></xsl:stylesheet>


The sitemap:

<?xml version="1.0" encoding="UTF-8"?>

<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>
<map:components>
<map:generators default="file"/>
<map:matchers default="wildcard"/>
<map:serializer name="wml" mime-type="text/vnd.wap.wml"
logger="sitemap.serializer.wml"
src="org.apache.cocoon.serialization.XMLSerializer">
<doctype-public>//WAPFORUM//DTD WML 1.1//EN</doctype-public>
<doctype-system>http://www.wapforum.org/DTD/wml_1.1.xml
</doctype-system>
<omit-xml-declaration>yes</omit-xml-declaration>
</map:serializer>



</map:components> <map:pipelines> <map:pipeline> <map:match pattern="*"> <map:generate src="{1}.rss" /> <map:transform type="xslt" src="rss2wml.xsl"/> <map:serialize type="wml"/> </map:match> </map:pipeline> </map:pipelines> </map:sitemap>

The xsl file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/XSL/Transform/1.0";
xmlns:rss="http://purl.org/rss/1.0/";
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>


<xsl:output method="wml"/> <xsl:template match="/"> <WML><CARD ID="id1" TITLE="RSS newsfeed"> <xsl:apply-templates/> </CARD></WML> </xsl:template> <xsl:template match="rss:channel"> <DO TYPE="accept"> <xsl:attribute name="LABEL"> <xsl:value-of select="rss:title"/> </xsl:attribute> <GO> <xsl:attribute name="HREF"> <xsl:value-of select="rss:link"/> </xsl:attribute> </GO> </DO> </xsl:template>

 <xsl:template match="rss:item">
   <DO TYPE="accept">
     <xsl:attribute name="label">
       <xsl:value-of select="rss:title"/>
     </xsl:attribute>
     <GO>
     <xsl:attribute name="HREF">
       <xsl:value-of select="rss:link"/>
     </xsl:attribute>
     </GO>
   </DO>
 </xsl:template>

<xsl:template match="text()"/>

</xsl:stylesheet>

Thanks a lot!!!!!!


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to