Subject: Re: entities and mixed processing of the guide with SGML/XML tools
To: None <k.heinz.apr.fuenf@onlinehome.de>
From: Hiroki Sato <hrs@NetBSD.org>
List: netbsd-docs
Date: 04/03/2005 22:33:57
----Security_Multipart(Sun_Apr__3_22_33_57_2005_918)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Klaus Heinz <k.heinz.apr.fuenf@onlinehome.de> wrote
in <20050403112809.GB28289@silence.homedns.org>:
k> I was able to select the PIs in my stylesheet, but the XSLT processor
k> always creates "&someentity;" instead of "&someentity;" in the HTML
k> file.
k> Am I trying to do the impossible?
It is possible. The attached stylesheet should do the job.
--
| Hiroki SATO
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version='1.0'>
<xsl:output method='xml'/>
<xsl:template match="processing-instruction('sdataEntity')">
<xsl:text disable-output-escaping="yes">&</xsl:text>
<xsl:value-of select="substring-before(.,' [')" />
<xsl:text>;</xsl:text>
</xsl:template>
<xsl:template match="*">
<xsl:copy>
<xsl:for-each select="@*">
<xsl:copy />
</xsl:for-each>
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
----Security_Multipart(Sun_Apr__3_22_33_57_2005_918)--
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)
iD8DBQBCT/DHTyzT2CeTzy0RAqQDAKDP/SyP1Nhgyhj7r+TMpu4LTZTJOQCfSBsh
k3wTkbHaBZMctb6LqIZ8+hI=
=OtmX
-----END PGP SIGNATURE-----
----Security_Multipart(Sun_Apr__3_22_33_57_2005_918)----