Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

From XML to XML or variables would be nice.

Hi All,
I'm starting to learn xml\xsl because a application we use (hp Openview Service
Desk) uses this to create reports.

A piece of the xml-format, as presented by SD is as follows
<group>
<field key="1"....> value</field>
<field key="2"....> value</field>
<field key="3"....> value</field>
</group>
I need to calculated with 2 of these fields, like the value of key 2- value
of key 3 via xsl.
Suggestions, anyone?
thanks
Inge
[538 byte] By [Inge Heijnen] at [2007-11-9 15:28:23]
# 1 Re: From XML to XML or variables would be nice.
Something like this should work.

<xsl:template match="group">
<xsl:value-of select="field[@key='2'] - field[@key='3']"/>
</xsl:template>

"Inge Heijnen" <webpostbus@hotmail.com> wrote in message
news:3e75e3d8$1@tnews.web.dev-archive.com...
>
> Hi All,
> I'm starting to learn xml\xsl because a application we use (hp Openview
Service
> Desk) uses this to create reports.
>
> A piece of the xml-format, as presented by SD is as follows
> <group>
> <field key="1"....> value</field>
> <field key="2"....> value</field>
> <field key="3"....> value</field>
> </group>
> I need to calculated with 2 of these fields, like the value of key 2-
value
> of key 3 via xsl.
> Suggestions, anyone?
> thanks
> Inge
Russell Jones at 2007-11-11 23:29:38 >