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 | Calendar | 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
Thread Tools Display Modes
  #1 (permalink)  
Old May 1st, 2007, 07:44 AM
Authorized User
Join Date: Mar 2007
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Adding elements from an XML to XSL.

I need to add an XML to my stylesheet.

Here is the problem

I have an XSL as follows:

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" 
<xsl:output method="xml"/>

<xsl:param name="Description">EQ.D</xsl:param>
    <xsl:template match="fix:FIXML">
        <xsl:apply-templates select="fix:Order"/>

<xsl:template match="fix:Order">

    <xsl:element name="i:Interest">

    <xsl:element name="strategies.Settlement">
    <xsl:value-of select="@SettlDt"></xsl:value-of>                  

    <xsl:element name="Delta"></xsl:element>
    <xsl:element name="Ref"></xsl:element>


2) I have an XML document which is:
<?xml version="1.0" encoding="UTF-8"?>
<i:Underlying value="KGF" xmlns:common="http://www.ABC.com/common" xmlns:i="common">
3) The entire XML should look like this:
  <i:Underlying value="KGF">
How can I include the XML contents in my XSL? Can anybody please suggest?
Is this possible?

Reply With Quote
  #2 (permalink)  
Old May 1st, 2007, 12:12 PM
Authorized User
Points: 251, Level: 5
Points: 251, Level: 5 Points: 251, Level: 5 Points: 251, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: , , Canada.
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rushman

Try the document() function...

Dijkstra's law on Programming and Inertia:

If you don't know what your program is supposed to do, don't try to write it.
Reply With Quote

Thread Tools
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
XSL file can't find elements in XML data? Mateo1041 XSLT 2 September 18th, 2008 09:37 AM
how t do comparision of elements in xsl suji XSLT 2 February 28th, 2008 11:27 AM
Dynamically Finding Elements in XSL tclancy XSLT 2 March 1st, 2006 02:25 PM
adding elements in XSLT 1.0 spencer.clark XSLT 3 July 25th, 2005 09:41 AM
adding option elements dynamically to a select richard.york Javascript 4 December 5th, 2003 03:57 AM

All times are GMT -4. The time now is 08:31 AM.

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