Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
| 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 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 August 1st, 2008, 10:58 AM
Registered User
 
Join Date: Aug 2008
Location: houston, tx, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to create xml tag version?

Hi Guys,

I have to send the message in the following format, i have the problem in creating the second xml verion tag in the xslt mapping. can somebody explain how to acheive the second xml tag

<?xml version="1.0" ?>
<AccessRequest xml:lang='en-US'>
<AccessLicenseNumber>YOURACCESSLICENSENUMBER</AccessLicenseNumber>
<UserId>YOURUSERID</UserId>
<Password>YOURPASSWORD</Password>
</AccessRequest>
<?xml version="1.0" ?>
<AddressValidationRequest xml:lang='en-US'>
<Request>
<TransactionReference>
<CustomerContext /><XpciVersion>1.0001</XpciVersion>
</TransactionReference>
<RequestAction>XAV</RequestAction>
<RequestOption>3</RequestOption>
</Request>
<MaximumListSize>3</MaximumListSize>
<AddressKeyFormat>
<ConsigneeName>UPS Capital</ConsigneeName>
<BuildingName>Business Credit</BuildingName>
<AddressLine>425 Day Hill Road</AddressLine>
<AddressLine>P.O. Box 400</AddressLine>
<AddressLine>Main Office</AddressLine>
<PoliticalDivision2>Windsor</PoliticalDivision2>
<PoliticalDivision1>CT</PoliticalDivision1>
<PostcodePrimaryLow>06095</PostcodePrimaryLow>
<CountryCode>US</CountryCode>
</AddressKeyFormat>
</AddressValidationRequest>


 
Old August 1st, 2008, 11:29 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

It is not clear to me what you want to achieve.
The markup you have posted is not a well-formed XML document, rather it looks like the concatenation of two documents.
So I am not sure what you want to achieve. If you want to have two documents as the result of an XSLT transformation then you can use xsl:result-document in XSLT 2.0 but you will create two separate documents that way.

--
  Martin Honnen
  Microsoft MVP - XML
 
Old August 1st, 2008, 06:07 PM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

You mean, you want to create an output file that contains two separate XML documents concatenated end-to-end?

You can't do that with standard XSLT, because it's a very non-standard arrangement. Create the two documents separately, and then concatenate them with some other non-XML-aware utility.

Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer's Reference




Similar Threads
Thread Thread Starter Forum Replies Last Post
Transform xml to xml changing one tag. surfer97301 XSLT 2 April 21st, 2010 05:14 PM
how to get xml tag name project2n5e0o1 Ajax 1 December 15th, 2006 09:51 AM
How to create end tag on empty elements rjonk XSLT 1 July 21st, 2006 01:18 PM
how to get xml tag names in xslt mdawoodk XSLT 8 March 14th, 2005 05:55 AM
XML to (different <tag>) XML mapping Thodoris XML 4 April 27th, 2004 04:02 AM





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