Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 7th, 2008, 01:52 AM
Authorized User
Points: 88, Level: 1
Points: 88, Level: 1 Points: 88, Level: 1 Points: 88, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2008
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default NEED XSLT CODE FOR XML

<POLICY>
   <POLINPUTS>
<FLD>
  <ISCPM>FF</ISCPM>
   <ISVPM>UU</ISVPM>
800</FLD>
<FLD>
  <ISCPM>FF1</ISCPM>
   <ISVPM>UU1</ISVPM>
901</FLD>
<FLD>
  <ISCPM>FF2</ISCPM>
   <ISVPM>UU2</ISVPM>
702</FLD>
   </POLINPUTS>
</POLICY>


Hello all,
here i am trying to get only the values of FLD i.e
800
901
702

but i am trying to use

<xsl:foreach select="<policy/ploinputs/fld>">
<xsl:value-of: select="."/>

But i am getting the result like

FFUU800
FF1UU1900
FF2UU2702

but i need the result in the form of

800
900
702
please can any one help me out of this query.....

Reply With Quote
  #2 (permalink)  
Old February 7th, 2008, 11:05 AM
Friend of Wrox
Points: 6,676, Level: 34
Points: 6,676, Level: 34 Points: 6,676, Level: 34 Points: 6,676, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2007
Location: Germany
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

The XML is very poorly strucured but you can try
Code:
  <xsl:for-each select="POLICY/POLINPUTS/FLD/text()[last()]">
Reply With Quote
  #3 (permalink)  
Old February 7th, 2008, 11:54 PM
Authorized User
Points: 88, Level: 1
Points: 88, Level: 1 Points: 88, Level: 1 Points: 88, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2008
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey thanx...........:)

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
xslt code for xml suji XSLT 2 February 5th, 2008 12:18 AM
xml and xsl templates as input to xslt gives xml rameshnarayan XSLT 5 August 3rd, 2005 01:58 AM
XSLT for complicated xml to xml transf. required doug@sirvisetti XSLT 3 June 17th, 2005 04:26 PM
merge two xml file and make new xml using xslt ketan XSLT 0 September 21st, 2004 08:48 AM
Merge XML files into a xml file using xslt lxu XML 4 November 6th, 2003 06:01 PM



All times are GMT -4. The time now is 08:28 PM.


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