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 10th, 2014, 10:36 AM
Friend of Wrox
 
Join Date: Apr 2013
Posts: 101
Thanks: 14
Thanked 0 Times in 0 Posts
Default How do I format address output in xslt?

How do I format my xslt code below to which pulls address from an xml document to have (transformation)output look like this?
xml out put to look like this:
Code:
<AddressFullText>
542 E Main Street SE
Apartment 204B
Montreal
Onatario, Canada 99999
</AddressFullText>
xslt code looks like this and I am not sure how to change it to produce the above xml
Code:
<AddressFullText>
   <xsl:value-of select="AddressLine1"/>
   <xsl:value-of select="AddressLine2"/>
   <xsl:value-of select="AddressLine3"/>
   <xsl:value-of select="AddressLine4"/>
</AddressFullText>
 
Old July 10th, 2014, 03:58 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Either use the xsl:text element to explicitly output whitespace (i.e. the newline character) to the output file, or use concat() within the xsl:value-of, for example

Code:
<xsl:value-of select="concat(AddressLine1, '&#xa;')"/>
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
The Following User Says Thank You to mhkay For This Useful Post:
winkimjr2 (July 11th, 2014)
 
Old July 11th, 2014, 01:05 AM
Registered User
 
Join Date: Jul 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default A triathlon or wanted to do and you

A triathlon or wanted to do and you have questions about that will team is pretty well-versed in that knowledge and to ensure you went to share that information with you or anything you have questions about you specific questions about you maybe there's some information that doesn't jive with your doctor your personal trainer your nutritionist and you want to find out the truth well we’re here to benefit you call us at: 1478 7 13 10 or a 772 528 1310 let's go to Joe you're on a ticket I George type question for you my wife has by their to be ROM workout machine she doesn't know more she’s at worst places that have or do actually work I know they have claim that a 4-minute workout for body I have bought into it you didn't buy its Joe now I like 15 Grand Isle don't um are you guys really worth it I'm sure you are you just don't know the name with it when your home on the airplane and you open up the magazine or even in the Rob Report so the luxury magazine and you see this bikes that looks loves so high tech today so use a-minute workout that's all you need is fifteen thousand dollars but it's an art looking bike a machine as you will it creates resistance and supposedly works your entire body Joe this is what I'll tell you cut it Ida research with my friend doctor Conrad earnest on this who's a PhD's scientist and we talked about it while can give you the great cardiovascular benefit that you mentioned earlier and that you if you listen to the burst training we discussed over the past several years here it can give you that benefit you canals do that with a four hundred dollar piece of machinery call the exerciser call doctor Western on that are me or whatever Dada 29 it's down to three hundred dollars whatever and naked you the same benefits now when we talk about the strength.
For more information, visit this site >>>>>>> http://maxmanpoweradvice.com/
 
Old July 11th, 2014, 11:19 AM
Friend of Wrox
 
Join Date: Apr 2013
Posts: 101
Thanks: 14
Thanked 0 Times in 0 Posts
Default

That worked thanks





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to obtain this output using XSLT jastao XSLT 1 September 5th, 2011 05:26 AM
how to get the output in xslt in following case? gandhit XSLT 0 July 6th, 2011 05:44 AM
maintain the format in the output xml Prabeen XSLT 4 June 5th, 2009 10:44 AM
Convert/Output HTML to MHT format takwirira ASP.NET 2.0 Professional 0 February 23rd, 2009 08:19 AM
XSLT Looks right, but no output Alderian72 XSLT 1 June 9th, 2005 08:47 AM





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