cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Art Spassky" <art.spa...@dgma.donetsk.ua>
Subject Problem with StreamGenerator
Date Tue, 12 Oct 2004 08:47:14 GMT
Hi all.

Can someoneb help me with my problem.
I am using cocoon-2.1.5.1.
I would like to use StreamGenerator for automatical generating documents
from uploaded files.
everything works well but I found problem with encoding.
When I upload xml file with encoding UTF-8 and transform it. Output file
contains irregular data.

Thank you for help in advance.

UploadForm.xml

<?xml version="1.0" encoding="Windows-1251"?>
<html>
<meta name="Content-Type" Value="text/html;charset=UTF-8"/>
<page>
 <title></title>
 <content>
 Привет
 <form name="UploadForm" method="post" action="submit"
enctype="multipart/form-data">
  <input type="file" name="Foo"/>
  <input id="submit1" name="submit1" type="submit" value="Submit"/>
 </form>
 </content>
</page>
</html>

extract from xslt file

<?xml version="1.0" encoding="Windows-1251"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 version="1.0">
<xsl:output encoding="UTF-8" indent="yes" method="xml"/>
<xsl:template match="/">
.........
</xsl:template>
</xsl:stylesheet>

Extract from sitemap.xmap

 <map:match pattern="UploadForm.html">
     <map:generate src="UploadForm.xml"/>
     <map:serialize/>
 </map:match>

 <map:match pattern="submit">
  <map:act type="">
       <map:parameter name="Cache-Control" value="max-age=0"/>
      <map:generate type="stream">
         <map:parameter name="form-name" value="Foo"/>
      </map:generate>
     <map:serialize type="xml"/>
  </map:act>
 </map:match>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message