You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by MAHE Vincent FTRD/DIH/REN <v....@rd.francetelecom.com> on 2004/02/18 18:44:31 UTC

Problem with disable-output-escaping with the 2.1.4 version

I use <xsl:text disable-output-escaping="yes"> to generate some add-hoc content with my XSLT.
After my XSLT, I have an i18n transform in the pipeline, so I have put method="xml" in my <xsl:output declaration in order to make sure I have pretty XML before i18n is triggered.
 
It used to work well with all previous cocoon 2.0.X versions and even with cocoon 2.1.3.
 
Since I moved to 2.1.4, I have problems with this instruction.
For instance, if I have this in my XSLT file :
<xsl:text disable-output-escaping="yes"> &amp;#149; </xsl:text>
 
I get the following in my HTML output :
<?javax.xml.transform.disable-output-escaping > &amp;#149; <?javax.xml.transform.enable-output-escaping >
 
With cocoon 2.1.3, I used to have &#149; in my HTML output.
 
 
The funny thing is that I only have problems when I use Tomcat (I have tested both 4.0.1 and 4.1.29 versions).
There is no problem if I use Resin 2.1.10.
 
Can anyone help me ?
 
I know that an XSL guru should not use disable-output-escaping but I'm a speedy guy and didn't look for a better solution :-)
so please don't tell me I shouldn't use this instruction.
 
Vincent
 
 

Re: Problem with disable-output-escaping with the 2.1.4 version

Posted by "J.Pietschmann" <j3...@yahoo.de>.
David Leangen wrote:
> Although I do not doubt that this is the intent, I believe that in practice,
> the <xsl:output> DOES have an effect on intermediate steps. If this is not
> the intent, then my suspicion is that this may be a bug.

It *is* supposed to only effect serialized output, according to the
spec. However, Xalan and perhaps a few other processors insert PI
nodes into the result tree for output control, and if these controls
are preserved by intermediate processing streams, and the output
is serialized by a compatible serializer, it will take effect.

Note that while it is standardized to use PIs for this purpose, the
actual PI names are left to the implementation, therefore don't
expect it to work if serialization is done by a different processor
or even a slightly different configured processor of the same breed.

As for the OP, I suspect something eats the PIs now.

J.Pietschmann

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


RE: Problem with disable-output-escaping with the 2.1.4 version

Posted by David Leangen <dl...@canada.com>.
Joerg,

I just wanted to point something out that probably has no relevance at all
to this escaping problem.

> > I use <xsl:text disable-output-escaping="yes"> to generate
> > some...
>
> I wonder how this should have worked. The xsl:output is only for
> serializing the XML, so has no meaning for the intermediate steps.

Although I do not doubt that this is the intent, I believe that in practice,
the <xsl:output> DOES have an effect on intermediate steps. If this is not
the intent, then my suspicion is that this may be a bug.

See the following post for more info:

http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=107870687307714&w=2



Dave



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


Re: Problem with disable-output-escaping with the 2.1.4 version

Posted by Joerg Heinicke <jo...@gmx.de>.
On 18.02.2004 18:44, MAHE Vincent FTRD/DIH/REN wrote:

> I use <xsl:text disable-output-escaping="yes"> to generate some
> add-hoc content with my XSLT. After my XSLT, I have an i18n transform
> in the pipeline, so I have put method="xml" in my <xsl:output
> declaration in order to make sure I have pretty XML before i18n is
> triggered.
> 
> It used to work well with all previous cocoon 2.0.X versions and even
> with cocoon 2.1.3.

I wonder how this should have worked. The xsl:output is only for 
serializing the XML, so has no meaning for the intermediate steps.

> Since I moved to 2.1.4, I have problems with this instruction. For
> instance, if I have this in my XSLT file : <xsl:text
> disable-output-escaping="yes"> &amp;#149; </xsl:text>
> 
> I get the following in my HTML output : 
> <?javax.xml.transform.disable-output-escaping > &amp;#149;
> <?javax.xml.transform.enable-output-escaping >

That's caused by disable-output-escaping. Also something that is only 
done during serialization. But the serializer must to get know what 
output not to escape. This is done by the above processing instruction.

> With cocoon 2.1.3, I used to have &#149; in my HTML output.
> 
> The funny thing is that I only have problems when I use Tomcat (I
> have tested both 4.0.1 and 4.1.29 versions). There is no problem if I
> use Resin 2.1.10.
> 
> Can anyone help me ?

Maybe something with endorsed dirs?

> I know that an XSL guru should not use disable-output-escaping but
> I'm a speedy guy and didn't look for a better solution :-) so please
> don't tell me I shouldn't use this instruction.

You should not use it :-P

Joerg

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