Reputation: 16321
xsltproc
complains "Entity 'larr' not defined'" when I try to use a plain left arrow (←
, i.e. ←) which I don't see in any of the DocBook 5 entity lists. What do I need to include to get it to work?
My current XSL is:
<?xml version='1.0'?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl"/>
<xsl:output method="html"
encoding="UTF-8"
indent="no"/>
<xsl:param name="html.stylesheet" select="'main.css'"/>
<xsl:param name="generate.toc">
book toc,title
</xsl:param>
<xsl:param name="glossterm.auto.link" select="1"/>
</xsl:stylesheet>
...and the docbook file starts merely with:
<book xmlns:xl="http://www.w3.org/1999/xlink">
...after which I go straight into the title
and chapter
tags.
Do I need to link to something else to get the "larr" entity, or is it simply cut out from DocBook 5?
Upvotes: 1
Views: 353
Reputation: 22617
It is not the XSLT stylesheet that is causing your problem (except if you used ←
in the XSLT code, but did not show it). I assume you are using the ←
entity in the input XML document.
Can you add an entity declaration at the top of your XML file?
<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE book [
<!ENTITY larr "←">
]>
<book/>
I'm not familiar with Docbook, but this page seems to suggest that's possible.
There are a few versions of this arrow, represented by different Unicode characters.
Upvotes: 1