Thx for your help.. Shall redirect my XSLT question  

regards,
raman
-----Original Message-----
From: Jim Hopp [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 02, 2004 12:52 PM
To: [EMAIL PROTECTED]
Subject: Re: Accessing XMl attributes in fop

Your select attribute in the xsl:value-of should be "." - the for-each sets
the context to each element node as it iterates the list.

To get the id attribute, you'd use <xsl:value-of select="location/@id"/>
(above the for-each loop).

A more natural way to do this would be with xsl:apply-templates.

These are basic XSLT questions, not FOP questions - RTFM or ask them on the
XSLT list: http://www.mulberrytech.com/xsl/xsl-list/index.html

-Jim

Subbiah wrote:

> My XML -
> <location id="texas">
>   <name>Jim</name>
>       <children>tommy</children>
>       <children>pam<children>
>       <children>sam<children>
>    </name>
> </location>
> 
> I need to do two things
> 
> 1. access location.id
> 
> 2. The number of children can vary so I need to get all the children, 
> when I use a for-each tag I am not able to access it.
>       
> <xsl:for-each select = "location/name/children">
>               <fo:block text-align="left">
>               <xsl:value-of select = "location/name/children"/>
>               </fo:block> 
>       </xsl:for-each>
> 
> 
> Any help ?
> 
> regards,
> raman
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to