You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Torsten Knodt <to...@datas-world.de> on 2002/08/02 15:50:31 UTC

TextSerializer working like XMLSerializer

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
next problem. I've created some xsl's which transform (most) vCard's in rdf 
format to the text version.
Also I have patched MIMEUtils to support the mime-type (text/x-vcard) and the 
file extension (vcf). This part works without problems. The patch will go to 
bugzilla today.
Now I have the the problem, that TextSerializer is working like XMLSerializer. 
It creates the xml declaration, output's tags (not only text) when I use 
them, and doesn't strip the root element. In the sitemap log I can see, that 
TextSerializer is really used. When I use the command line of xalan, it works 
without problems.

Here is a stripped down version of the sitemap. If you also need the xsl's, 
and an example rdf, I can mail them.

<?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:generator logger="sitemap.generator.file" name="file" pool-grow="4" 
pool-max="32" pool-min="8" src="org.apache.cocoon.generation.FileGenerator" 
/>
    </map:generators>
    <map:transformers default="xslt">
      <map:transformer logger="sitemap.transformer.xsltc" name="xslt" 
pool-grow="2" pool-max="32" pool-min="8" 
src="org.apache.cocoon.transformation.TraxTransformer" />
    </map:transformers>
    <map:serializers default="xml">
      <map:serializer logger="sitemap.serializer.vcard" 
mime-type="text/x-vcard" name="vcard" 
src="org.apache.cocoon.serialization.TextSerializer" />
    </map:serializers>
    <map:pipelines default="caching">
      <map:pipeline name="caching" 
src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline" />
    </map:pipelines>
  </map:components>
  <map:pipelines>
    <map:pipeline>
	 <map:generate type="file" src="test.rdf" />
	 <map:transform src="xsl/bagseq.xsl" />
	 <map:transform src="xsl/fixuri.xsl" />
	 <map:transform src="xsl/typevalue.xsl" />
	 <map:transform src="xsl/text.xsl" />
	 <map:transform src="xsl/check.xsl" />
         <map:serialize type="vcard" />
      <map:handle-errors>
        <map:transform src="../xsl/error2html.xsl" />
        <map:serialize status-code="500" />
      </map:handle-errors>
    </map:pipeline>
  </map:pipelines>
</map:sitemap>

Hope someone can help here.

Thanks in advance
	Torsten Knodt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9So4nvxZktkzSmiwRAofYAKCH5xyMgs/BjBQ8gIbI/KpK72mHGwCfcjNE
zBp172sAipsU+3l71xeNuac=
=F2bl
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>