Subject: Re: Accessing immediate parent node in XSL
From: Brian Chrisman <incubus@xxxxxxxxxxxxxx>
Date: Wed, 16 Mar 2005 22:50:09 -0800
|
On Wed, Mar 16, 2005 at 10:48:37PM -0800, Arulraj wrote:
> Hi all,
>
> I have need some XPath way to access the attribute.
> I am having the following XML structure.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Layout>
> <Box name="toolbar" position="absolute" top="37px"
> left="0px" width="797px" height="26px" z-index="7"
> background-color="transparent">
> ....................
> </Box>
> <Box name="applicationframe" position="absolute"
> top="63px" left="0px" width="797px" height="504px"
> z-index="16">
> <Box name="rowlist" type="list" top="44px" left="11px"
> width="763px" height="24px" z-index="17"
> background-color="transparent">
> .......................
> </Box>
> </Box>
> </Layout>
>
> In my XSL,
>
> <xsl:template match="Box" mode="list">
> ......
> </xsl:template>
> The above template access Box with a name="rowlist"
> from here i want to access immediate parent node i.e
> widht and height of applicationframe Box.
Could do parent::Box[@name='applicationframe']/width or more generally
ancestor::Box[@name='applicationframe']/@width if you are nested more
deeply....
>
> pls help me
> Thanks
> Regards,
> Arul
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Make Yahoo! your home page
> http://www.yahoo.com/r/hs
|