OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: DOCBOOK-APPS: XSL HTML stylesheets: combining keywords into singleMETA tag


I hacked my stylesheet's head.content template to
output my <keywordset> keywords, but they show up as
separate META tags.  All sites I have seen (and docs I
have read on search engine HOWTO sites) suggest using
a single META tag, name="keywords" (note plural),
content="<comma-separated list of keywords>".

Current output:
<META name="keyword" content="Python">
<META name="keyword" content="tutorial">
<META name="keyword" content="free">

Proposed output:
<META name="keywords" content="Python, tutorial,

Here is sample XSL to do this:

<xsl:template match="keywordset" mode="html.header">
  <meta name="keywords">
    <xsl:attribute name="content">
      <xsl:apply-templates select="keyword"

<xsl:template match="keyword" mode="html.header">
  <xsl:apply-templates/><xsl:text>, </xsl:text>

<xsl:template match="keyword[position()=last()]"

Of course this relies on solving the vexing problem
(mentioned in a previous message) of head.content not
outputting keywords at all, for which I do not have a
good solution.


Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC