Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: How to use xsl to format this xml tag

From: naijacoder <lurowam@-----.--->
To: NULL
Date: 6/23/2009 5:37:00 PM
Thanks Martin for that but
This is what i'm trying to do below
<xsl:for-each select=3D"order_notes">

						<table class=3D"tabledetails" cellspacing=3D"0" style=3D"table-
layout:fixed" border=3D"0" width=3D"645px">

							<tr>
								<td width=3D"50px"></td>
								<td>
									<b style=3D"font-size:10pt;font-family:Tahoma;">Order Notes: </
b>
									<br/>
									<xsl:apply-templates select=3D"text"/>
									<br/>
								</td>
							</tr>

						</table>

</xsl:for-each>

As you would see i'm trying to put a break line and to format the node
properly.
The xml unfortunately isn't done properly as the nodes aren't unique
Is this possible?
Thanks

On Jun 23, 9:25=A0pm, Martin Honnen <mahotr...@yahoo.de> wrote:
> Patrick.O .Ige wrote:
> > <order_notes>
> > <text>*$199 SHARED =A0 =A0 =A0</text>
> > <text>24MTHS </text>
> > <text>AS PER AGREEEMENT PRE MAY. =A0 =A0</text>
> > <text></text>
> > <text>*BAN: 645938292 =A0 =A0 =A0 =A0 =A0 =A0 =A0 </text>
> > </order_notes>
>
> > How can i use xsl to format this node like this
>
> > *$199 SHARED
> > 24MTHS
> > AS PER AGREEEMENT PRE MAY.
> > *BAN: 645938292 =A0
>
> That looks like you want plain text output for each 'text' element that
> has contents:
>
> <xsl:stylesheet
> =A0 =A0xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform"
> =A0 =A0version=3D"1.0">
>
> =A0 =A0<xsl:output method=3D"text"/>
>
> =A0 =A0<xsl:template match=3D"order_notes">
> =A0 =A0 =A0<xsl:apply-templates select=3D"text[text()]"/>
> =A0 =A0</xsl:template>
>
> =A0 =A0<xsl:template match=3D"text">
> =A0 =A0 =A0<xsl:value-of select=3D"concat(normalize-space(.), '&#13;&#10;=
')"/>
> =A0 =A0</xsl:template>
>
> </xsl:stylesheet>
>
> --
>
> =A0 =A0 =A0 =A0 Martin Honnen --- MVP XML
> =A0 =A0 =A0 =A0http://msmvps.com/blogs/martin_honnen/



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent