You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Stefan Pietschmann <sp...@inf.tu-dresden.de> on 2004/12/02 08:20:48 UTC

XMLSerializer replaces tabs with

I already sent this to the users list but was asked to redirect this problem
to the dev list, so here it is:

Instead of the "normal" tab indentation of my xml files, all files
serialized by the XMLSerializer have the tabs replaced with &#9; entities.

The source of an xHTML-file which is returned now looks like this:

...
&#9;&#9;<table>
&#9;&#9;&#9;<tr>
&#9;&#9;&#9;&#9;<td width="75">
&#9;&#9;&#9;&#9;&#9;<b>User:</b>
&#9;&#9;&#9;&#9;</td>
&#9;&#9;&#9;&#9;<td>
&#9;&#9;&#9;&#9;&#9;<input name="ID" type="text" size="15" /> 
&#9;&#9;&#9;&#9;</td> 
&#9;&#9;&#9;</tr>
&#9;&#9;<table>
...

This messes up the output in the browser (in the style definition the CSS
styles are not interpreted cause they're full of those entities), my xml
profiles - everything that's serialized with the XMLSerializer. When I
switch to the HTMLSerializer I don't have this problem.
I neither have it with JDK 1.4.2 and Cocoon 2.1.5 nor with JDK 1.5 and
Cocoon 2.1.6, so it must be the combination of Java 5 and Cocoon 2.1.6.

The configuration in the sitemap looks as follows:

<map:serializer name="xhtml.full"
src="org.apache.cocoon.serialization.XMLSerializer" mime-type="text/html"
pool-grow="2" pool-max="64" pool-min="2">
	<doctype-public>-//W3C//DTD XHTML 1.0
Transitional//EN</doctype-public>
	
<doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</doc
type-system>
	<encoding>ISO-8859-1</encoding>
	<indent>yes</indent>
</map:serializer>

"Yes/no" for the indent parameter doesn't make a difference btw.

This problem can be reproduced on other computers (with Java 5 + Cocoon
2.1.6).

So, please help me to get my normal tab back! ;)

Thanx for your help,
Stefan 


Re: XMLSerializer replaces tabs with

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
On 2 Dec 2004, at 07:20, Stefan Pietschmann wrote:

> I already sent this to the users list but was asked to redirect this 
> problem
> to the dev list, so here it is:
>
> Instead of the "normal" tab indentation of my xml files, all files
> serialized by the XMLSerializer have the tabs replaced with &#9; 
> entities.
>
> The source of an xHTML-file which is returned now looks like this:
>
> ...
> &#9;&#9;<table>

<snip/>

>
> So, please help me to get my normal tab back! ;)

I see the same problem.
Cocoon 2.1.7-dev on Java 1.4.2_05 MacOSX.

regards Jeremy


--------------------------------------------------------

                   If email from this address is not signed
                                 IT IS NOT FROM ME

                         Always check the label, folks !!!!!
--------------------------------------------------------


Re: AW: AW: XMLSerializer replaces tabs with

Posted by Torsten Curdt <tc...@apache.org>.
Stefan Pietschmann wrote:
> So the question remains: when using tabs (and I do use them cause they're
> used by default in XMLSpy and I cannot convert all my xml files to
> whitespaces) - is it the intended behavior of the (new implementation of
> the) XMLSerializer to replace all of them with the &#9; entity?

Well, for one thing ...removing the tabs is probably a one-line command
but you can also change the encoding behaviour of the serializer.
Have a look at the EncodingSerializer in the serializers block.

HTH

cheers
--
Torsten

AW: AW: XMLSerializer replaces tabs with

Posted by Stefan Pietschmann <sp...@inf.tu-dresden.de>.
So the question remains: when using tabs (and I do use them cause they're
used by default in XMLSpy and I cannot convert all my xml files to
whitespaces) - is it the intended behavior of the (new implementation of
the) XMLSerializer to replace all of them with the &#9; entity?

Stefan

-----Ursprüngliche Nachricht-----
Von: Stefano Mazzocchi [mailto:stefano@apache.org] 
Gesendet: Montag, 6. Dezember 2004 18:10
An: dev@cocoon.apache.org
Betreff: Re: AW: XMLSerializer replaces tabs with 	

Torsten Curdt wrote:
> Stefan Pietschmann wrote:
> 
>> Hmm, i'm not really into this, so it is as simple as exchanging the
>> XMLSerializer with the 2.1.5 version before building, or are there other
>> dependencies?
> 
> 
> We have two different XML serializers. IIRC we changed
> the the default implementation recently. All you need
> to do is to use the old implementation. (change it in
> the cocoon.xconf) Although it has other issues.
> (Why the heck are you using tabs anyway?)

I had the same exact problem because stupid eclipse sometimes introduces 
tabs even when you don't want to. grrrr

-- 
Stefano.


Re: AW: XMLSerializer replaces tabs with

Posted by Stefano Mazzocchi <st...@apache.org>.
Torsten Curdt wrote:
> Stefan Pietschmann wrote:
> 
>> Hmm, i'm not really into this, so it is as simple as exchanging the
>> XMLSerializer with the 2.1.5 version before building, or are there other
>> dependencies?
> 
> 
> We have two different XML serializers. IIRC we changed
> the the default implementation recently. All you need
> to do is to use the old implementation. (change it in
> the cocoon.xconf) Although it has other issues.
> (Why the heck are you using tabs anyway?)

I had the same exact problem because stupid eclipse sometimes introduces 
tabs even when you don't want to. grrrr

-- 
Stefano.


Re: AW: XMLSerializer replaces tabs with

Posted by Torsten Curdt <tc...@apache.org>.
> I have the same problem.Using tab is to make xml file look nice.

Well ...no problem using spaces for that over here ;-)

...even makes them look nice in every editor

cheers
--
Torsten

Re: AW: XMLSerializer replaces tabs with

Posted by roy huang <li...@hotmail.com>.
I have the same problem.Using tab is to make xml file look nice.
----- Original Message ----- 
From: "Torsten Curdt" <tc...@apache.org>
To: <de...@cocoon.apache.org>
Sent: Monday, December 06, 2004 5:54 PM
Subject: Re: AW: XMLSerializer replaces tabs with &#9;


> Stefan Pietschmann wrote:
> > Hmm, i'm not really into this, so it is as simple as exchanging the
> > XMLSerializer with the 2.1.5 version before building, or are there other
> > dependencies?
> 
> We have two different XML serializers. IIRC we changed
> the the default implementation recently. All you need
> to do is to use the old implementation. (change it in
> the cocoon.xconf) Although it has other issues.
> (Why the heck are you using tabs anyway?)
> 
> cheers
> --
> Torsten
> 

Re: Proposed ImageReader patch

Posted by Torsten Curdt <tc...@apache.org>.
> let's not make a fuzz of it :-)

no fuzz ...but in order to
review the patch we expect
a diff -u as stated on the
website ...that's all I was
saying. not sure what this
has to do with impatience
as you were implying.

Just file to bugzilla whenever
you want and we will review
it whenever we want ;-)

cheers
--
Torsten

Re: Proposed ImageReader patch

Posted by george georgovassilis <ge...@open.gr>.
Dear All

let's not make a fuzz of it :-)
I'm new to this whole procedure of committing, patching etc. In the 
committers tips it advises 'patience', so please be patient even if it 
takes me a few days (given that I'm quite busy today and our network 
link is really nerve-testing) to create the patch and commit it. I 
promise that I'll do it, just give me time to do it the right way.

Best Regards
G.

Torsten Curdt wrote:

>> i have already this patch file (diff), so i can add the patch in 
>> bugzilla for you, if you dont mind.
>
>
> the file you posted wasn't a diff.
>
> cheers
> -- 
> Torsten
>
>



Re: Proposed ImageReader patch

Posted by Torsten Curdt <tc...@apache.org>.
> i have already this patch file (diff), so i can add the patch in bugzilla 
> for you, if you dont mind.

the file you posted wasn't a diff.

cheers
--
Torsten

Re: Proposed ImageReader patch

Posted by go...@osmosis.gr.
On Wed, 8 Dec 2004, Torsten Curdt wrote:
hi george

i have already this patch file (diff), so i can add the patch in bugzilla 
for you, if you dont mind.


--stavros 


> george georgovassilis wrote:
> > Dear All
> > 
> > I was thinking of changing the org.apache.cocoon.reading.ImageReader 
> > (from the 2.1.5.1 release) to accept any input image type supported by 
> > the j2se. Of course, due to the lack of available encoders the output is 
> > still jpeg. I'm attaching the source to this email, if you're happy with 
> > it let me know so I can commit it to bugzilla.
> 
> please create a diff -u patch and file it to bugzilla
> 
> thanks
> --
> Torsten
> 


Re: Proposed ImageReader patch

Posted by Torsten Curdt <tc...@apache.org>.
george georgovassilis wrote:
> Dear All
> 
> I was thinking of changing the org.apache.cocoon.reading.ImageReader 
> (from the 2.1.5.1 release) to accept any input image type supported by 
> the j2se. Of course, due to the lack of available encoders the output is 
> still jpeg. I'm attaching the source to this email, if you're happy with 
> it let me know so I can commit it to bugzilla.

please create a diff -u patch and file it to bugzilla

thanks
--
Torsten

Re: Proposed ImageReader patch

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Wednesday 08 December 2004 17:40, george georgovassilis wrote:
> Dear All
>
> I was thinking of changing the org.apache.cocoon.reading.ImageReader
> (from the 2.1.5.1 release) to accept any input image type supported by
> the j2se. Of course, due to the lack of available encoders the output is
> still jpeg. I'm attaching the source to this email, if you're happy with
> it let me know so I can commit it to bugzilla.

A couple of months ago, I have actually posted a much more advanced block, 
called ImageOpReader that can replace both the old ImageReader as well as the 
proposed patch, be extended with more Image operations, and is pretty quick 
for scaling operations.
See http://issues.apache.org/bugzilla/show_bug.cgi?id=31718  for details.

Unfortunately, noone has picked this up before :o(

Cheers
Niclas
-- 
   +------//-------------------+
  / http://www.dpml.net       /
 / http://niclas.hedhman.org / 
+------//-------------------+


Proposed ImageReader patch

Posted by george georgovassilis <ge...@open.gr>.
Dear All

I was thinking of changing the org.apache.cocoon.reading.ImageReader 
(from the 2.1.5.1 release) to accept any input image type supported by 
the j2se. Of course, due to the lack of available encoders the output is 
still jpeg. I'm attaching the source to this email, if you're happy with 
it let me know so I can commit it to bugzilla.

comments/advice welcome
G.

Re: XML Serializers [was: XMLSerializer replaces tabs with ]

Posted by george georgovassilis <ge...@open.gr>.
Dear All

I just migrated our projects to 2.1.6 and found that they were severely 
affected by this new behaviour as all our generated XHTML has escaped 
tabs, quotes etc. Thus I'd (I think we all do) appreciate clarity on 
what the correct (and expected) behaviour of the serialisation is.

In the meantime (since I wouldn't want to miss all the new, nice changes 
in 2.1.6) I found an almost workaround (have tried only with the XHTML 
serialiser) which requires only minor changes to the XSLs:

<map:serializer mime-type="text/html" name="xhtml" 
src="org.apache.cocoon.components.serializers.XHTMLSerializer">
    <doctype-public>-//W3C//DTD XHTML 1.0 Transitional//EN</doctype-public>
    
<doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</doctype-system>
    <encoding>UTF-8</encoding>
</map:serializer>

The only caveat is that in javascripts quotes are still escaped, which 
can be taken care of however by enclosing them with <xsl:comment>.

I hope I'm not too much off-topic
Regards
G.


Re: XML Serializers [was: XMLSerializer replaces tabs with ]

Posted by Torsten Curdt <tc...@apache.org>.
>> It is set up to serialize a Doctype if it's present in the incoming 
>> stream, but it doesn't read from the sitemap configuration to read 
>> specific values for cases where the stream doesn't have DOCTYPE info. 
>> Which leads to a few questions:
>>
>> 1) Is XSLT <output> the preferred way now to get a DOCTYPE on pipeline 
>> results?
> 
> 
> Not as far as i know. IIUC Cocoon does everthing via
> the serializers.
> 
> These are new serializers that Pier made recently for
> his app and donated back to Cocoon. I don't know
> whether they are finished or just enough to get his
> job done.

there are still some minor issues with them.
but it would be great if we could fix them
and switch to use them by default (IMHO)

>> 2) Would it make sense to have the new XML Serializer read 
>> configuration parameters for doctype-public and doctype-system? (I 
>> note that it already reads configuration for 'encoding', something 
>> else that can be set via XSLT output)
> 
> 
> I say yes. Implement them so that people can
> just switch the name of their component and
> directly use the same sitemap config.

sure thing.

cheers
--
Torsten

Re: XML Serializers [was: XMLSerializer replaces tabs with ]

Posted by David Crossley <cr...@apache.org>.
Micah Dubinko wrote:
> Stefan Pietschmann wrote:
>> The doctype is not set either as Micah already mentioned.
>>
> It is set up to serialize a Doctype if it's present in the incoming 
> stream, but it doesn't read from the sitemap configuration to read 
> specific values for cases where the stream doesn't have DOCTYPE info. 
> Which leads to a few questions:
> 
> 1) Is XSLT <output> the preferred way now to get a DOCTYPE on pipeline 
> results?

Not as far as i know. IIUC Cocoon does everthing via
the serializers.

These are new serializers that Pier made recently for
his app and donated back to Cocoon. I don't know
whether they are finished or just enough to get his
job done.

> 2) Would it make sense to have the new XML Serializer read configuration 
> parameters for doctype-public and doctype-system? (I note that it 
> already reads configuration for 'encoding', something else that can be 
> set via XSLT output)

I say yes. Implement them so that people can
just switch the name of their component and
directly use the same sitemap config.

> This might be a question for Pier, though I'll ask on the list first.

It is best to always ask on the list. Others
may know. If not then we can Cc Pier. Try to
keep discussions in the community.

--David



Re: AW: XML Serializers [was: XMLSerializer replaces tabs with ]

Posted by Micah Dubinko <md...@snapbridge.com>.
Stefan Pietschmann wrote:

>The doctype is not set either as Micah already mentioned.
>  
>
It is set up to serialize a Doctype if it's present in the incoming 
stream, but it doesn't read from the sitemap configuration to read 
specific values for cases where the stream doesn't have DOCTYPE info. 
Which leads to a few questions:

1) Is XSLT <output> the preferred way now to get a DOCTYPE on pipeline 
results?

2) Would it make sense to have the new XML Serializer read configuration 
parameters for doctype-public and doctype-system? (I note that it 
already reads configuration for 'encoding', something else that can be 
set via XSLT output)

This might be a question for Pier, though I'll ask on the list first.

Thanks,

.micah

AW: XML Serializers [was: XMLSerializer replaces tabs with ]

Posted by Stefan Pietschmann <sp...@inf.tu-dresden.de>.
Thank all alot for your efforts.

I've tried with the "new" XMLSerializer
(cocoon.components.serializers.XMLSerializer) and it looks promising,
however there is a problem with the mime-type!

<map:serializer mime-type="text/html" name="xhtml"
src="org.apache.cocoon.components.serializers.XMLSerializer">
	<doctype-public>-//W3C//DTD XHTML 1.0
Transitional//EN</doctype-public>
	
<doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</doc
type-system>
	<encoding>ISO-8859-1</encoding>
</map:serializer>

serves all files as text/xml (the encoding is right), although the mime-type
is set to text/html. In my browser they are shown as xml now - not really
what I was expecting. However the tabs seem to work (apart from the fact
that " is replaced with &quot; - not necessarily bad, but it is within
<script>s).
The doctype is not set either as Micah already mentioned.

Stefan

-----Ursprüngliche Nachricht-----
Von: Micah Dubinko [mailto:mdubinko@snapbridge.com] 
Gesendet: Dienstag, 7. Dezember 2004 03:16
An: dev@cocoon.apache.org
Betreff: XML Serializers

Torsten Curdt wrote:

>> I'll peek around in [org.apache.cocoon.serialization.XMLSerializer] 
>> to see if I can figure out what's going on.
>
>
> Better spend the time in fixing the last
> few issues in 
> [org.apache.cocoon.components.serializers.XMLSerializer]. ...that means
> (again) our homegrown one is better. Maybe
> we should sort out the last few issues and
> then switch.

 I started looking into 30824, another issue with the old serializer. I 
tried it to see how it would work with the new one, but this didn't 
produce any DOCTYPE at all:

    <map:serializer logger="sitemap.serializer.xhtml" 
mime-type="text/html" name="xhtml" pool-grow="2" pool-max="64" 
pool-min="2" src="org.apache.cocoon.components.serializers.XMLSerializer">
      <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>
      
<doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-s
ystem>
      <encoding>UTF-8</encoding>
    </map:serializer>

What is the proper way to deliver the requested DOCTYPE info to the new 
serializer?

Thanks,

.micah


XML Serializers

Posted by Micah Dubinko <md...@snapbridge.com>.
Torsten Curdt wrote:

>> I'll peek around in [org.apache.cocoon.serialization.XMLSerializer] 
>> to see if I can figure out what's going on.
>
>
> Better spend the time in fixing the last
> few issues in 
> [org.apache.cocoon.components.serializers.XMLSerializer]. ...that means
> (again) our homegrown one is better. Maybe
> we should sort out the last few issues and
> then switch.

 I started looking into 30824, another issue with the old serializer. I 
tried it to see how it would work with the new one, but this didn't 
produce any DOCTYPE at all:

    <map:serializer logger="sitemap.serializer.xhtml" 
mime-type="text/html" name="xhtml" pool-grow="2" pool-max="64" 
pool-min="2" src="org.apache.cocoon.components.serializers.XMLSerializer">
      <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>
      
<doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system>
      <encoding>UTF-8</encoding>
    </map:serializer>

What is the proper way to deliver the requested DOCTYPE info to the new 
serializer?

Thanks,

.micah

Re: AW: XMLSerializer replaces tabs with

Posted by Torsten Curdt <tc...@apache.org>.
Micah Dubinko wrote:
> FYI, my default sitemap has:
> 
>    <map:serializer logger="sitemap.serializer.xml" mime-type="text/xml" 
> name="xml" src="org.apache.cocoon.serialization.XMLSerializer"/>
> 
> and
> 
>    <map:serializer logger="sitemap.serializer.exml" mime-type="text/xml" 
> name="exml" src="org.apache.cocoon.components.serializers.XMLSerializer">
>      <encoding>UTF-8</encoding>
>    </map:serializer>
> 
> In a simple test, say the hello-world block, changing the serializer 
> from "xml" to "exml" makes the tabs serialize like you'd expect.
> 
> I'll peek around in the top one to see if I can figure out what's going on.

Better spend the time in fixing the last
few issues in the new one. ...that means
(again) our homegrown one is better. Maybe
we should sort out the last few issues and
then switch.

cheers
--
Torsten

Re: AW: XMLSerializer replaces tabs with

Posted by Micah Dubinko <md...@snapbridge.com>.
FYI, my default sitemap has:

    <map:serializer logger="sitemap.serializer.xml" mime-type="text/xml" 
name="xml" src="org.apache.cocoon.serialization.XMLSerializer"/>

and

    <map:serializer logger="sitemap.serializer.exml" 
mime-type="text/xml" name="exml" 
src="org.apache.cocoon.components.serializers.XMLSerializer">
      <encoding>UTF-8</encoding>
    </map:serializer>

In a simple test, say the hello-world block, changing the serializer 
from "xml" to "exml" makes the tabs serialize like you'd expect.

I'll peek around in the top one to see if I can figure out what's going on.

.micah


Torsten Curdt wrote:

>
> We have these two serializers
>
> ./src/java/org/apache/cocoon/serialization/XMLSerializer.java
> ./src/blocks/serializers/java/org/apache/cocoon/components/serializers/XMLSerializer.java 
>
>
> The first one uses the javax TransformerHandler,
> the second one is a cocoon implementation.
>
> Sorry, for pointing you to the cocoon.xconf
> usually they are specified inside the sitemap.
>
>
>  <map:serializers default="html">
>     <map:serializer
>         mime-type="text/xml"
>         name="xml"
>         src="org.apache.cocoon.serialization.XMLSerializer"/>
>
> ...but for me it seems like we are still using the
> old one as a default...
>
> cheers
> -- 
> Torsten
>
>


Re: AW: XMLSerializer replaces tabs with

Posted by Torsten Curdt <tc...@apache.org>.
> I tried replacing 
> 
> <xml-serializer
> class="org.apache.cocoon.components.sax.XMLByteStreamCompiler"
> logger="core.xml-serializer" pool-grow="4" pool-max="32" pool-min="8"/>
> 
> with 
> 
> <xml-serializer class="org.apache.cocoon.components.sax.XMLSerializer"
> logger="core.xml-serializer" pool-grow="4" pool-max="32" pool-min="8"/>

Ehm... what? No ...you better not replace the XMLByteStreamCompiler
like that ;-)

> in cocoon.xconf (and I hope this is what you were talking about), but had
> the same problem with my tabs. 

We have these two serializers

./src/java/org/apache/cocoon/serialization/XMLSerializer.java
./src/blocks/serializers/java/org/apache/cocoon/components/serializers/XMLSerializer.java

The first one uses the javax TransformerHandler,
the second one is a cocoon implementation.

Sorry, for pointing you to the cocoon.xconf
usually they are specified inside the sitemap.


  <map:serializers default="html">
     <map:serializer
         mime-type="text/xml"
         name="xml"
         src="org.apache.cocoon.serialization.XMLSerializer"/>

...but for me it seems like we are still using the
old one as a default...

cheers
--
Torsten

AW: XMLSerializer replaces tabs with

Posted by Stefan Pietschmann <sp...@inf.tu-dresden.de>.
Hi Torsten,

I tried replacing 

<xml-serializer
class="org.apache.cocoon.components.sax.XMLByteStreamCompiler"
logger="core.xml-serializer" pool-grow="4" pool-max="32" pool-min="8"/>

with 

<xml-serializer class="org.apache.cocoon.components.sax.XMLSerializer"
logger="core.xml-serializer" pool-grow="4" pool-max="32" pool-min="8"/>

in cocoon.xconf (and I hope this is what you were talking about), but had
the same problem with my tabs. 

Stefan :(

-----Ursprüngliche Nachricht-----
Von: Torsten Curdt [mailto:tcurdt@apache.org] 
Gesendet: Montag, 6. Dezember 2004 10:54
An: dev@cocoon.apache.org
Betreff: Re: AW: XMLSerializer replaces tabs with 	

Stefan Pietschmann wrote:
> Hmm, i'm not really into this, so it is as simple as exchanging the
> XMLSerializer with the 2.1.5 version before building, or are there other
> dependencies?

We have two different XML serializers. IIRC we changed
the the default implementation recently. All you need
to do is to use the old implementation. (change it in
the cocoon.xconf) Although it has other issues.
(Why the heck are you using tabs anyway?)

cheers
--
Torsten


Re: AW: XMLSerializer replaces tabs with

Posted by Torsten Curdt <tc...@apache.org>.
Stefan Pietschmann wrote:
> Hmm, i'm not really into this, so it is as simple as exchanging the
> XMLSerializer with the 2.1.5 version before building, or are there other
> dependencies?

We have two different XML serializers. IIRC we changed
the the default implementation recently. All you need
to do is to use the old implementation. (change it in
the cocoon.xconf) Although it has other issues.
(Why the heck are you using tabs anyway?)

cheers
--
Torsten

Re: AW: XMLSerializer replaces tabs with

Posted by Ralph Goers <Ra...@dslextreme.com>.
Stefan Pietschmann wrote:

>Hmm, i'm not really into this, so it is as simple as exchanging the
>XMLSerializer with the 2.1.5 version before building, or are there other
>dependencies?
>
>Cheers,
>Stefan
>  
>
I went and did diffs on XMLSerializer and its base classes. Only 
AbstractTextSerializer changed between 2.1.5 and 2.1.6 and that was a 
change to its cache key, so I don't see how that could change the output.

Ralph


AW: XMLSerializer replaces tabs with

Posted by Stefan Pietschmann <sp...@inf.tu-dresden.de>.
Hmm, i'm not really into this, so it is as simple as exchanging the
XMLSerializer with the 2.1.5 version before building, or are there other
dependencies?

Cheers,
Stefan

> -----Ursprüngliche Nachricht-----
> Von: Torsten Curdt [mailto:tcurdt@apache.org]
> Gesendet: Sonntag, 5. Dezember 2004 22:15
> An: dev@cocoon.apache.org
> Betreff: Re: XMLSerializer replaces tabs with
> 
> Stefan Pietschmann wrote:
> > Sorry to ask this again, but since I'm not the only one:
> >
> > Does anyone have a suggestion or fix for this?
> > Otherwise I'll have to go back to 2.1.5 :(
> 
> ...why not just switch back the old xml serializer?
> 
> cheers
> --
> Torsten


Re: XMLSerializer replaces tabs with

Posted by Torsten Curdt <tc...@apache.org>.
Stefan Pietschmann wrote:
> Sorry to ask this again, but since I'm not the only one:
> 
> Does anyone have a suggestion or fix for this? 
> Otherwise I'll have to go back to 2.1.5 :(

...why not just switch back the old xml serializer?

cheers
--
Torsten

Re: XMLSerializer replaces tabs with

Posted by Stefan Pietschmann <sp...@inf.tu-dresden.de>.
Sorry to ask this again, but since I'm not the only one:

Does anyone have a suggestion or fix for this? 
Otherwise I'll have to go back to 2.1.5 :(

----------------------------------------------------------------------

Instead of the "normal" tab indentation of my xml files, all files
serialized by the XMLSerializer have the tabs replaced with &#9; entities.

The source of an xHTML-file which is returned now looks like this:

...
&#9;&#9;<table>
&#9;&#9;&#9;<tr>
&#9;&#9;&#9;&#9;<td width="75">
&#9;&#9;&#9;&#9;&#9;<b>User:</b>
&#9;&#9;&#9;&#9;</td>
&#9;&#9;&#9;&#9;<td>
&#9;&#9;&#9;&#9;&#9;<input name="ID" type="text" size="15" /> 
&#9;&#9;&#9;&#9;</td> 
&#9;&#9;&#9;</tr>
&#9;&#9;<table>
...

This messes up the output in the browser (in the style definition the CSS
styles are not interpreted cause they're full of those entities), my xml
profiles - everything that's serialized with the XMLSerializer. When I
switch to the HTMLSerializer I don't have this problem.
I neither have it with JDK 1.4.2 and Cocoon 2.1.5 nor with JDK 1.5 and
Cocoon 2.1.6, so it must be the combination of Java 5 and Cocoon 2.1.6.

The configuration in the sitemap looks as follows:

<map:serializer name="xhtml.full"
src="org.apache.cocoon.serialization.XMLSerializer" mime-type="text/html"
pool-grow="2" pool-max="64" pool-min="2">
	<doctype-public>-//W3C//DTD XHTML 1.0
Transitional//EN</doctype-public>
	
<doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</doc
type-system>
	<encoding>ISO-8859-1</encoding>
	<indent>yes</indent>
</map:serializer>

"Yes/no" for the indent parameter doesn't make a difference btw.

This problem can be reproduced on other computers (with Java 5 + Cocoon
2.1.6).

So, please help me to get my normal tab back! ;)

Thanx for your help,
Stefan