[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
Norm, 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, free"> 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" mode="html.header"/> </xsl:attribute> </meta> </xsl:template> <xsl:template match="keyword" mode="html.header"> <xsl:apply-templates/><xsl:text>, </xsl:text> </xsl:template> <xsl:template match="keyword[position()=last()]" mode="html.header"> <xsl:apply-templates/> </xsl:template> 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. -M __________________________________________________ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.com/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC