You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gus Masaaki Suga <gu...@evolutionb.com> on 2001/02/24 03:07:45 UTC

Unescaped format

All,

I have an xml file and an xsl file, which are as simple as hello-page.xml in
the Cocoon example.

I use HTMLFormatter and set the encoding to "Shift_JIS" (This is one of the
Japanese encodings).  I could get this work with no problem on a browser.
When I view the source of this result page on a browser, I can see a bunch
of character entities (like &#12467;&#12463;&#12540;&#12531;.....). This
works fine on many browsers such as IE5, NN6 but there are a few browsers
which don't support character entity rendering such as Ntt DoCoMo iMode
browsers.  So, I've been trying to find a way to get Cocoon generate HTML
without any escape.  disable-output-escaping in an XSL might be one way
however, since I know all of the contents for iMode should not be escaped,
this is not practical to use. Plus Cocoon FAQ's suggests it be a bad
programming practice.

The first question is: Is there any property in cocoon properties file or
any other files
that in the package could turn on and off this escaping? By looking at
org.apache.cocoon.formatter.AbstractFormatter.java, there seems to be no
configuration options for this purpose.  Please let me know if miss big
piece.

The second question:
It is not extremely difficult to write my own Serializer and Formatter
implementation for iMode
in org.apache.xml.serializer package and org.apache.cocoon.serializer
package respectively.
Possibly modify/extend some other factory classes in xerces and cocoon
packages.
Is this reasonable thing to do?  Has anyone out there addressed
similar problem and implemented solution already is more question I'd like
to ask.

My environment:
Win2000 Professional (English)
Apache web server 1.3.14
Cocoon 1.8.2
JDK1.2.2

Your comments, ideas and suggestions are very much welcome.
Thanks in advance.

_______________________________
gus masaaki suga
senior software engineer
gus@evolutionb.com