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

Re: text() and not()

Subject: Re: text() and not()
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 8 Jan 2002 13:17:23 GMT
Re:  text() and not()
> If I dont use this a load of info gets output that isnt necessary in this
> instance (but it useful to someone somewhere :)

No. only if you apply templates to elements containing that text,
it is far more common to select or not select elements rather than
selecting all elements but then just not copying the text nodes.

> >//text()[not(parent::title)]
> This is close :) however it fails to match the trailing close bracket ')'
> for some reason.

that matches any text node  whose parent is not title.

There are three text nodes in your example.
the first has parent title
the second has parent xref
the third (which is just white space)
All the text nodes in your example have parent title, so it 
does not match any of them.

  Renew LP Piston Seal (Fig 5.5.1
  <xref xrefid="F5.5.1" xidtype="FIGURE">) </xref>

What do you want to do that isn't done by

<xsl:template match="title">
<p class="title">

<xsl:template match="xref">
 [whatever you want xref to do]


This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

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.