[Home] [By Thread] [By Date] [Recent Entries]


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


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member