Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
| Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 3rd, 2005, 12:15 AM
Registered User
 
Join Date: Feb 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Exclude Nodes

I want all the nodes that have the attribute value equal to "monday".
All the rest I do not want.

How can I exclude all other nodes except attribute="monday"?
If I don't reference them, the built-in template rule outputs their text values.

Thanks


 
Old February 3rd, 2005, 06:00 AM
Authorized User
 
Join Date: Jul 2004
Location: Oxford, , United Kingdom.
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It would help if you included some example xml, and how do you want those nodes with the value="Monday" output.

Maybe you could use an Identity transform?

<xsl:template match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()[@value='Monday']"/>
  </xsl:copy>
</xsl:template>





Similar Threads
Thread Thread Starter Forum Replies Last Post
Exclude Namespace Atribute bonekrusher XSLT 3 May 4th, 2007 08:18 AM
Using a linkdoc to exclude rows geordaa XSLT 1 August 24th, 2006 11:19 AM
Exclude data base on date??? LouMattera BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 3 October 25th, 2004 07:47 AM
Exclude Certain Forms Ben Horne Access VBA 11 March 16th, 2004 03:06 PM
Exclude a field from refreshing Mimi Javascript How-To 2 August 25th, 2003 05:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.