[
Lists Home |
Date Index |
Thread Index
]
Hi
I hope that follows help you :)
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version='1.0'>
<xsl:template match="/">
<Criteria>
<Messages>
<xsl:apply-templates/>
</Messages>
</Criteria>
</xsl:template>
<xsl:template match="Messages">
<Message code="{@Code}"><xsl:value-of
select="@Message_Text"/></Message>
</xsl:template>
</xsl:stylesheet>
And read books...
NM> I have an XML like this.
NM> <Criteria>
NM> <Messages Code="SSS" Message_Text="Congrats!" />
NM> <Messages Code="JJJ" Message_Text="Bad Luck"/>
NM> <Criteria>
NM> Can someone help me in transforming into the following
NM> using XSL. I want to use XSL and transform this into
NM> XML like below.
NM> <Criteria>
NM> <Messages>
NM> <Message code="APF">Congrats!</Message>
NM> <Message code="JJJ">Bad Luck!</Message>
NM> </Messages>
NM> </Criteria>
NM> Appreciate any help. Thanks in Advance.
NM> Nischal
--
С уважением,
Vasil I Yaroshevich
|