[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Accessing immediate parent node in XSL

Subject: Re: Accessing immediate parent node in XSL
From: Brian Chrisman <incubus@xxxxxxxxxxxxxx>
Date: Wed, 16 Mar 2005 22:50:09 -0800
xsl access parent node
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.