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

Re: Child locations

Subject: Re: Child locations
From: Luke Jones <ljones@xxxxxxxxxx>
Date: Wed, 25 Apr 2007 17:21:35 -0500
Re:  Child locations
Thanks David!

That got me going on the right track.

-Luke

On Wed, 2007-04-25 at 21:42 +0100, David Carlisle wrote:
> > I'm trying to prevent the first occurrence of a child tag from line
> 
> XSLT has no access to the tags in a document, you mean child element.
> 
> 
>  <xsl:template match="amended/para">
> this will only match teh para, some other code may or may not match your
> catchline but you don't show it.
> 
>                 <xsl:for-each select = "child::node()">
> this is the same as
>                 <xsl:for-each select = "node()">
> 
> and selects all child nodes of the current para, in your exaple this is
> always a single text node.
> 
> <xsl:when test="child::node()[not(.=normalize-space(.))][1][self::para]
> the first sterp of this is selcting all child nodes of teh current text
> nodes, text nodes never have any children so thi sset will always be
> empty and test as false.
> 
> I think you want something like
> 
> <xsl:template match="ammended">
>   <xsl:apply-templates select="para"/>
> </xsl:template>
> 
> <xsl:template match="para">
> <fo:block>
> <xsl:if test="position()=1">
> <fo:inline>
> <xsl:apply-templates select="preceding-sibling::catchline"/>
> <xsl:text> </xsl>text>
> </fo:inline>
> </xsl:if>
> <xsl:apply-templates/>
> </fo:block>
> </xsl:template>
> 
> David

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.