Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
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 July 22nd, 2011, 01:32 PM
Authorized User
 
Join Date: Sep 2008
Posts: 56
Thanks: 0
Thanked 1 Time in 1 Post
Default How to skip a child node

Here is an example. I have 2 xmls that are similar in nature so I want to use 1 xsl instead of 2. Here is the first XML
<root>
<a>
<b>
<c>
<d>Real Val 1</d>
</c>
<c>
<d>Real Val 2</d>
</c>
</b>
</a>
<a>
<b>
<c>
<d>Fake Val 1</d>
</c>
<c>
<d>Fake Val 2</d>
</c>
</b>
</a>
</root>

Here is the second XML
<root>
<a>
<x>
<c>
<d>Real Val 1</d>
</c>
<c>
<d>Real Val 2</d>
</c>
</x>
</a>
</root>

I am doing
<xsl:for-each select = "a">
</xsl:for-each>

How do I make the change so I can do soething like select="a/SKIP/c/" I just want to know how to skip a child node in any circumstances.
 
Old July 23rd, 2011, 03:31 AM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 291
Thanks: 9
Thanked 29 Times in 29 Posts
Thumbs up

Try with <xsl:value-of select="a/*/c/">
__________________
Rummy





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to find child node when there is mentioned (child::*) mlohokare XSLT 3 May 12th, 2009 12:40 PM
Accessing a node bases on child node value musman0047 XSLT 1 February 27th, 2009 12:26 PM
The reference node is not a child of this node.XSL XMLUser XSLT 2 February 25th, 2008 05:22 AM
how to append child node after an node in XML + C# vishnu108mishra XML 5 November 13th, 2007 05:30 AM
Child Node Output Neal XSLT 0 June 7th, 2006 03:14 AM





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