cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Pope <benpop...@gmail.com>
Subject Re: How to stop using numeric entities?
Date Mon, 25 Apr 2005 09:13:11 GMT
makoto hirayama wrote:
> On 2005.04.25, at 10:04, Ben Pope <benpope81@gmail.com> wrote:
> 
> 
>>What about the encoding of your original files?
>>
>>hello.xml:
>><?xml encoding="Shift-JIS"?>
>><yada yada>
>>
>>hello.xsl:
>><?xml encoding="Shift-JIS"?>
>><xsl:output encoding="Shift-JIS">
>><yada yada>
> 
> 
> My files are 
> 
> hello.xml:
> <?xml version="1.0" encoding="Windows-31J"?>
> <page>...
> 
> hello.xsl:
> <?xml version="1.0" encoding="Windows-31J"?>
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:output encoding="Windows-31J"?>
> <xsl:template...>

What about:

hello.xml:
<?xml version="1.0" encoding="Windows-31J"?>
<page xml:lang="ja">...

hello.xsl:
<?xml version="1.0" encoding="Windows-31J"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="Windows-31J"?>
<xsl:template xml:lang="ja">...

And if that doesn't work, what about the identity transform with
disable-output-escaping?

I don't know how to make that work, but for an individual node (called
"item") it might look something like:

<?xml version="1.0"?>
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="item">
    <xsl:copy>
      <xsl:attribute name="disable-output-escaping">true</xsl:attribute>
      <xsl:apply-templates/>
    </xsl:copy>
  </xsl:template>

  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates/>
    </xsl:copy>
  </xsl:template>
</xsl:transform>

Ben

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


Mime
View raw message