Hi Uli…thanks for ur feedback
I am trying to do some data formatting with my xml.
For eg …my xml is as below
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet/webtemplate.xsl"?>
9210i
$300
9210
$250
9110
$50
8910i/7600
$300
8910
$170
8855
$110
8850/8890
$80
7110/6210
$25
8310
$110
8210
$60
8250
$80
7650
$200
7610
$550
6820
$240
6800/5100
$130
6610i
$220
6610/6100
$160
6230
$410
6510
$90
6150/6110/5110
$10
6108/3300
$170
6220/5140
$230
5210/3610/1100
$60
3660
$300
3650
$250
3530
$70
3310/3330
$45
2100
$70
N-gage QD
$220
and xslt is as below:
<xsl:stylesheet xmlns:xsl =
“XSLT Namespace” version =
“1.0” >
<xsl:output method=“html” indent=“yes” />
<xsl:template match=“//Phones” >
Yaddayadda…
<xsl:apply-templates />
</xsl:template>
<xsl:template match=“model[position() mod 2 = 1]”>
<xsl:value-of select=“./name” />
<xsl:value-of select=“./price” />
<xsl:value-of select=“following-sibling::node()[position() = 1]/name” />
<xsl:value-of select=“following-sibling::node()[position() = 1]/price” />
</xsl:template>
<xsl:template match=“name”/>
<xsl:template match=“price”/>
</xsl:stylesheet>
and my current output is as shown below
::: CURRENT OUTPUT:::
xsl transformation output:
9210i $300 9210 $250
9110 $50 8910i/7600 $300
8910 $170 8855 $110
8850/8890 $80 7110/6210 $25
8310 $110 8210 $60
8250 $80 7650 $200
7610 $550 7250i $220
which is similar to the following format…
I need to change the output format as below:
:::EXPECTED OUTPUT:::
How do i do that? anybody can help…?
Thanks,
Nayana
#Tamino#webMethods#API-Management