Hello Kavitha,
as I see you have a working version:
> <td><i18n:text>Male</i18n:text><xsl:value-of select="gender/name"/></td>
and a non-working version
> <i18n:text><xsl:value-of select="@sex"/></i18n:text><xsl:value-of
> select="gender/name"/>
The problem is really easy, it's only an XPath problem. The @sex attribute
as not on the <person> element, but on the <gender> element. SO you either
change the XML:
<person sex="Male">
<name>Ravi</name>
</person>
or in the XSL:
<xsl:value-of select="gender/@sex"/>
I hope it works now,
Joerg
kavitha ramesh wrote:
> Hi Jeorg,
>
> Now my xsl is like this:
>
> conc.xsl
> --------
>
> <xsl:for-each select="menu/person">
> <tr>
> <td><i18n:text>Male</i18n:text><xsl:value-of select="gender/name"/></td>
> </tr>
> </xsl:for-each>
>
>
> My xml file is as follows:
>
> conc.xml
> --------
> <?xml version="1.0" encoding="UTF-8"?>
> <test>
> <menu>
> <person>
> <gender sex="Male">
> <name>Ravi</name>
> </gender>
> </person>
>
> <person>
> <gender sex="Female">
> <name>Veena</name>
> </gender>
> </person>
> </menu>
>
> <menu>
> <item>
> <link>
> <href>conc.xml?locale=en_US</href>
> <title>English </title>
> </link>
> </item>
> <item>
> <link>
> <href>conc.xml?locale=de_DE</href>
> <title>German </title>
> </link>
> </item>
> </menu>
> </test>
>
> and my sitemap is as follows:
>
> <map:match pattern="*.xml">
> <map:generate src="{1}.xml"/>
> <map:transform src="conc.xsl"/>
> <map:transform type="i18n"/>
> <map:serialize/>
> </map:match>
>
> and in the browser Iam getting the result as
>
> Mr.Ravi
> Mr.Veena
>
> In the xsl file if I do the following, nothing is displayed,,,
>
> <i18n:text><xsl:value-of select="@sex"/></i18n:text><xsl:value-of
> select="gender/name"/>
>
> Please suggest me how to write the stylesheet for displaying,
>
> Mr.Ravi
> Mrs.Veena
>
>
> Regards
> Kavitha
--
System Development
VIRBUS AG
Fon +49(0)341-979-7419
Fax +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>