[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|