[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Change error message in output for missing xinclude?
I'm not sure if anyone mentioned this, but you
could customize the scripting to handle unresolved xincludes. You create a
template that matches on xi:include to output your own message. The
default message comes from this template that matches on any unrecognized
element:
<xsl:template match="*">
<xsl:message> <xsl:text>Element </xsl:text> <xsl:value-of select="local-name(.)"/> <xsl:text> in namespace '</xsl:text> <xsl:value-of select="namespace-uri(.)"/> <xsl:text>' encountered</xsl:text> <xsl:if test="parent::*"> <xsl:text> in </xsl:text> <xsl:value-of select="name(parent::*)"/> </xsl:if> <xsl:text>, but no template matches.</xsl:text> </xsl:message> <span style="color:
red">
<xsl:text><</xsl:text> <xsl:value-of select="name(.)"/> <xsl:text>></xsl:text> <xsl:apply-templates/> <xsl:text></</xsl:text> <xsl:value-of select="name(.)"/> <xsl:text>></xsl:text> </span> </xsl:template> You could create a custom template like
this:
<xsl:template match="xi:include">
<span class="EmptyInclude"> <xsl:text>Currently there is no Data available.</xsl:text> </span> </xsl:template> and perhaps add an xsl:message if you need
it.
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]