xsl-list
[Top] [All Lists]

RE: [xsl] why no indent here

2011-12-12 02:26:46

No, The xml file is made by Symphony cms where this is a part of the whole xml 
file. 

Body is a name I gave it to the text a person reads on the website so a body of 
a article. 

 

So I can't preserve the linebreaks in the xml file into the html file ?

 

Roelof



----------------------------------------
From: bbosgoed(_at_)bkwi(_dot_)nl
Date: Mon, 12 Dec 2011 09:22:16 +0100
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] why no indent here


Op 12 dec 2011, om 08:59 heeft Roelof Wobben het volgende geschreven:

When I have a xml piece of this :
<body>Naam : Tamara Wobben
Geboorte gewicht : 2000 gram
Geboorte lengte : 44 cm.
Geboortedatum : 1 september 2005

</body>
And I do <xsl:value-of select="body" or I do <xsl:copy-of select="body"> 
Then all the text will be displayed as this :

Tamara Wobben Geboorte gewicht : 2000 gram Geboorte lengte : 44 cm 
Geboortedatum : 1 september 2005

Roelof,

With this xml input it is hard to create the output you want. Do you 
create/generate the xml input file yourself? It has a lack of structure.

Actually, the labels you are using, like "Naam" and "Geboorte gewicht" can be 
the element names in the xml input file.

<body>
<naam>Tamara Wobben</naam>
<geboortegewicht>2000 gram</geboortegewicht>
<geboortelengte>44 cm</geboortelengte>
<geboortedatum>1 september 2005</geboortedatum>
</body>

With this kind of structured xml you can create any output you want by using 
xslt


--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
                                        
--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>