xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas B. Passin" <tpas...@mitretek.org>
Subject Re: Newbie question: Character Entities
Date Tue, 16 Nov 1999 21:34:49 GMT

From: Armin Pfarr <apfarr@netsurf.de>


You would have to define your entities in the source xml document.  If you have
done that and still have problems, you would have to escape them in the HTML
output.  You should be able to do that using the <xsl:output> element, but I
don't know if Cocoon supports that yet.  Check the w3c xslt standard at
www.w3c.org to get the syntax for the <xsl:output> element.

Tom Passin
================================================================================
======
<original-question>
I'm trying to use Cocoon 1.5 as a publishing engine for XML-Documents. Since
I'm living in Germany, I often have to deal with what we call "Umlaute" like
äÄöÖüÜ. I have a DTD that references the ISOLatin1-Entity-Set. Therefore, my
documents look pretty much like HTML, for example

<memo>
<to>Herbert H&ouml;nig</to>
<from>&Uuml;berhaupt nicht interessant</to>
.....
</memo>

When using Cocoon, all my "Umlaute" get lost during the
transformation-process to HTML. A typical XSL-Styesheet looks like

<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">

<xsl:template match="/">
<html>
<xsl:apply-templates/>
</html>
</xsl:template>


<xsl:template match="head">
<head>
<xsl:apply-templates/>
</head>
</xsl:template>

<xsl:template match="body">
<body>
<h1>Inhaltsverzeichnis</h1>
<div class="toc">
<xsl:apply-templates select="sect1//title" mode="toc"/>
</div>
<xsl:apply-templates/>
</body>
</xsl:template>

<xsl:template match="head//title">
<title>
<xsl:apply-templates/>
</title>
</xsl:template>

<xsl:template match="sect1">
<xsl:apply-templates/>
</xsl:template>
...
</xsl:stylesheet>

Any idea how to solve the problem?

</original-question>



Mime
View raw message