Subject: Re: [xsl] grouping xhtml title with first sibling From: Michael Kay <mike@xxxxxxxxxxxx> Date: Tue, 18 Jan 2011 14:34:09 +0000 |
<xsl:function name="f:is-heading" as="xs:boolean"> <xsl:param name="e" as="element()"/> <xsl:sequence select="matches(local-name($e), 'h[1-9]')"/> </xsl:function>
<xsl:template match="body/*"> <xsl:copy-of select="."/> </xsl:template>
<xsl:template match="body/*/is-heading(.)" priority="10"> <div> <xsl:copy-of select=".|following-sibling::*[1]"/> </div> </xsl:template>
My goal is to prevent *orphans* title, that's why I need to group each title with his first-sibling (with conditions as said before).
Michael Kay Saxonica
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] grouping xhtml title with, Matthieu Ricaud-Duss | Thread | Re: [xsl] grouping xhtml title with, Matthieu Ricaud-Duss |
Re: [xsl] grouping xhtml title with, Matthieu Ricaud-Duss | Date | Re: [xsl] grouping xhtml title with, Matthieu Ricaud-Duss |
Month |