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 27th, 2011, 12:19 PM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

The sample I posted works against the XML input sample you posted. That does not have any "response" element so it is hard to tell why you say you have a template with match="response".
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog
 
Old July 27th, 2011, 12:54 PM
Authorized User
 
Join Date: Jul 2010
Posts: 74
Thanks: 23
Thanked 0 Times in 0 Posts
Default

Sorry, I feel a little mess.

So, you mean to use another template which is matching for the Text? In my xsl file, in the
<xsl:template match="rootNode">

</xsl:template>
there are other codes to deal with the other part of the input xml. Where should I put the apply-templates? Anywhere in the <xsl:template match="rootNode">? And after
<xsl:template match="rootNode">

</xsl:template>
then I put
<xsl:template match="Node">
<node1 tag="Text">
<xsl:attribute name="detail">
<xsl:apply-templates select="anotherNode/Text"/>
</xsl:attribute>
</node1>
</xsl:template>
codes? Right?
 
Old July 27th, 2011, 12:59 PM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

I posted a complete stylesheet that should work against the input sample you posted. If you want to integrate that code into another stylesheet then copy the two xsl: template elements I posted.
If your input is more complex and you can't figure out how to write your code then you need to show a sample of the more complex input.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog
 
Old July 27th, 2011, 02:37 PM
Authorized User
 
Join Date: Jul 2010
Posts: 74
Thanks: 23
Thanked 0 Times in 0 Posts
Default

Thank you, Martin.





Similar Threads
Thread Thread Starter Forum Replies Last Post
XSL: Display distinct values elayaraja.s XSLT 1 July 17th, 2008 07:00 AM
Pass link values as xsl:parameter to php5 then xsl pauljr8 XSLT 1 July 2nd, 2007 10:32 PM
retrieving values with xsl Tomi XSLT 14 April 5th, 2007 02:07 AM
values comparison in xsl sani723 XSLT 2 April 3rd, 2007 04:05 AM
Reassigning values to variables in XSL. rmiller XSLT 1 September 25th, 2004 02:43 AM





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