[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] user.head.content character limit?
Have you tried a different XSLT processor? Bob Stayton Sagehill Enterprises bobs@sagehill.net----- Original Message ----- From: "Tim Arnold" <jtim.arnold@gmail.com>
To: "DocBook Apps" <docbook-apps@lists.oasis-open.org> Sent: Tuesday, May 29, 2012 11:29 AM Subject: [docbook-apps] user.head.content character limit?
hi, I am inserting all the primary index terms for a page into the html metadata by using the user.head.content template. For one page that is particularly dense with technical terms I'm seeing my metadata get truncated with the contents overflowing into the html body. That is the keywords= metadata contains 2,527 characters and the rest of the metadata (637 characters) appears inside the <body> element I have two types of index terms; when I select either one of them with @type=, the html is rendered correctly. With the code below, where I do not specify a type value, I get the keywords split between the <head> and the <body> elements. I'm using the xsl-1.76.1 html stylesheets (namespaced) with DocBook 5. specify type 1: the result is 736 characters long; specify type 2: result is 2,415 characters no type specified: 3,164 characters and bad rendering. Can it be that there is a character limit for metadata in the stylesheets? thanks, --Tim Arnold simplified template code: <xsl:template name="user.head.content"> <xsl:call-template name="keywordset" /> </xsl:template> <xsl:template name="keywordset"> <xsl:variable name="section_level"> <xsl:number value="count(ancestor-or-self::d:section)" /> </xsl:variable> <xsl:variable name="indexterms"> <xsl:choose> <xsl:when test="$section_level < $chunk.section.depth"> <xsl:copy-of select="./d:indexterm[@type]/d:primary|./*[not(self::d:section)]//d:indexterm[@type]/d:primary" /> </xsl:when> <xsl:otherwise> <xsl:copy-of select=".//d:indexterm[@type]/d:primary" /> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="indexterms-unique"> <xsl:for-each select="exsl:node-set($indexterms)/*[not(. = preceding-sibling::*)]"> <xsl:value-of select="normalize-space(.)" /> <xsl:if test="not(position() = last())"> , </xsl:if> </xsl:for-each> </xsl:variable> <meta name="keywords"> <xsl:attribute name="content"> <xsl:value-of select="$indexterms-unique" /> </xsl:attribute> </meta> </xsl:if> </xsl:template> --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]