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 April 10th, 2007, 09:23 AM
Authorized User
Join Date: Mar 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Converting XML into a particular format using XSLT

I am trying to convert the undermentioned XML into the the flwg

XML Code:

<?xml version="1.0" encoding="UTF-8"?>
<FIXML xmlns="http://www.fixprotocol.org/FIXML-4-4">
<Order Acct="1" MinQty="10" Px="480.25" SettlDt="2009-12-01" StopPx="480.25" ><Hdr SID="DUMMULSEHUB" SeqNum="2" Snt="2007-04-05T13:34:47" TID="HSBC"/><PreAll Acct="2" Qty="1000"/><TrdSes SesID="0"/><Instrmt CpnRt="5.1" EncIssrLen="2" ID="3134865" Sfx="P" Src="2" /><OrdQty Cash="1" Qty="500"/></Order></FIXML>

INTO THE Format:

I am using the undermentioned,but the value doesnt appear

<xsl:template match="/">
        <xsl:value-of select="Order/@Acct"/>


Can someone please tell me the correct way if possible.
Help appreciated very much.

Old April 10th, 2007, 09:47 AM
mhkay's Avatar
Wrox Author
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts

Your elements are in a namespace so your path expressions need to refer to them by prefixed names. Please see the first "sticky" post in this forum (link to default namespaces at the end), or google for "XSLT default namespace).

Michael Kay
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference

Similar Threads
Thread Thread Starter Forum Replies Last Post
Difficulties converting XML to XML using XSLT Reznik XSLT 7 June 3rd, 2008 05:45 AM
Converting to FoxPro 2.6 Format msnayak21 ADO.NET 1 June 25th, 2007 12:27 PM
Converting to FoxPro 2.6 Format msnayak21 SQL Server 2005 2 May 11th, 2007 05:01 AM
Converting to FoxPro 2.6 Format msnayak21 .NET Framework 2.0 0 May 10th, 2007 05:27 AM
Converting to FoxPro 2.6 Format msnayak21 ASP.NET 2.0 Professional 0 May 10th, 2007 05:23 AM

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