[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] XPath expression "everything but..." ?
Subject: RE: [xsl] XPath expression "everything but..." ? From: Mark Wilgus <mwilgus@xxxxxxxxx> Date: Wed, 14 Feb 2001 10:51:53 -0600 |
I have to agree with Michael, though. Taking into consideration your observation, Jeni, I'd probably code it like: <xsl:template match="chapter"> <xsl:apply-templates select="title"/> <xsl:apply-templates select="*[not(title)]"/> </xsl:template> Just a modicum of brackety quotey thingies, but it forces the template for title to be processed first. > -----Original Message----- > From: Jeni Tennison [mailto:mail@xxxxxxxxxxxxxxxx] > Sent: Wednesday, February 14, 2001 10:31 AM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Re: [xsl] XPath expression "everything but..." ? > > > Michael Beddow wrote: > > Simplify your template to > > <xsl:template match="chapter"> > > <xsl:apply-templates/> > > </xsl:template> > > > > Then provide a template matching on "title" (or maybe chapter/title, > > depends on your document structure) > > that does <h1><xsl:apply-templates/></h1> > > Be aware, though, that if the 'title' subelement isn't the first child > of the 'chapter' element, then you won't get the h1 at the top of the > chapter with this method. > > Cheers, > > Jeni > > --- > Jeni Tennison > http://www.jenitennison.com/ > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XPath expression "everyth, Peter Flynn | Thread | Re: [xsl] XPath expression "everyth, David Carlisle |
[xsl] Re: empty element sabotages x, Nick Ridout | Date | [xsl] choose an "artificial" root n, Fr\id\iric SCHWEBEL |
Month |
Keywords