This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Using !ENTITY to include html
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] Using !ENTITY to include html
- From: "dante" <dante at vianet dot net dot au>
- Date: Wed, 29 Aug 2001 11:47:57 +0800
- References: <98C7D2E5BCD2374C9AAE0BCD2E9C1DD9075B3F@esebe013.NOE.Nokia.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
G'Day all,
I've been trying to use the following code in the beginning of my XSL to add
some html to my output document:
----------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp " " >
<!-- declares title.html as an external parsed entity -->
<!ENTITY title SYSTEM "title.html">
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml" version="1.0">
<xsl:output method="xml" media-type="text/html" omit-xml-declaration="yes"
indent="yes"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" encoding="UTF-8" />
<xsl:template match="/">
<html>
<head>
<title>&title;</title>
etc.
----------------------------------------------------------
This works fine using the MSXML parser, but when I've tried server-side
parsing with Axkit I'm not getting the entity added - just a space.
There is no error showing in the Apache error.log -
Apache::AxKit::Language::Sablot::handler seems to be working fine.
Is it AxKit or XML::Sablotron that's causing the problem?
Or is there a problem with my coding that the MSXML parser ignores & AxKit
doesn't?
Thanks,
Oliver Reid
Perth, Western Australia
dante@vianet.net.au
www.vianet.net.au/~dante
p.s. Does anyone know what's been happening with the AxKit.org List & Site?
<tip type="DTD" author="Oliver Reid">
I've found this very useful: http://www.pault.com/pault/dtdgenerator
</tip>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list