[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: grouping xhtml title with first sibling

Subject: Re: grouping xhtml title with first sibling
From: Matthieu Ricaud-Dussarget <matthieu.ricaud@xxxxxxxxx>
Date: Tue, 18 Jan 2011 16:34:52 +0100
Re:  grouping xhtml title with first sibling
Thank you Michael, this looks more appropiate to my need ;-)

After adding the f prefix to :
<xsl:template match="body/*/f:is-heading(.)" priority="10">

I get an "Failed to compile stylesheet" error :
Error at xsl:template on line 23 column 63 of orphans.xsl:
XTSE0340: XSLT Pattern syntax error at char 7 on line 23 in {body/*/igs:is-heading(.}:
Function call may appear only at the start of a pattern
Failed to compile stylesheet. 1 error detected.

Feeding function with node seems not to work on xsl:template?


Le 18/01/2011 15:34, Michael Kay a icrit :
<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:template match="body">
<xsl:apply-templates select="* except (*[f:is-heading(.)]/following-sibling::*[1])"/>

<xsl:template match="body/*">
<xsl:copy-of select="."/>

<xsl:template match="body/*/is-heading(.)" priority="10">
<xsl:copy-of select=".|following-sibling::*[1]"/>

Matthieu Ricaud
Service Livre numirique

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.