cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anna Afonchenko" <a...@ubaccess.com>
Subject Problem with entities in XMLSerializer
Date Thu, 24 Apr 2003 12:23:32 GMT
Hi all.
Sorry if something like this was already asked, but I couldn't find
anything similar in the archives.
I have an html file with some entities inside (apostophe, trademark, quotes):

entities.html
-----------------
<html>
    <head>
        <title>Test entities</title>
    </head>
    <body>
        <p>Test entities
        <p>This is some text with &#8217; entities.</p>
        <p>Here is another &#8482; one</p>
        <p>And one &#8220; more</p>
    </body>
</html>

I want to convert it to xml format. So I make a pipeline:
<map:match pattern="testEntities">
    <map:generate src="entities.html" type="html"/>
    <map:serialize type="xml"/>
</map:match>

The output xml file has entities converted to corresponding characters:
<html>
  <head>
      <title>Test entities</title> 
</head>
   <body>
      <p>Test entities</p> 
      <p>This is some text with ' entities.</p> 
      <p>Here is another T one</p> 
      <p>And one " more</p> 
 </body>
</html>

And if I try to see the source code of this output from the browser (e.g. in Notepad), I get
strange characters instead of the
entities. And I can't work out why this is happening.
Can anybody explain me what the problem is? I think that maybe it's something in XMLSerializer?
Because when I use HTMLSerializer, in the source code I see the normal entity characters,
as was written
in the initial file entities.html.
But maybe I am just confusing something?

Any help will be appreciated.
Thank you very much for help.

Anna

Mime
View raw message