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

Re: Selecting Specific Elements Regardless of Namespac

Subject: Re: Selecting Specific Elements Regardless of Namespace
From: "Lindy Quick" <lindyq@xxxxxxxx>
Date: Thu, 9 May 2002 15:13:40 -0400 (EDT)
xpath select a specific element
That isn't quite the answer to my question.  I am needing to do this regardless of the namespace.  Let me go into a little more detail

I am in an xsl sheet that creates html.  I need to know the value of the grannysmith/apple node using a xsl:value-of statment pathed directly to that node.  This xml I have however is in a fruit namespace and I don't want to know that I am in the fruit namespace. 

Thanks

Lindy

--- On Thu 05/09, Wendell Piez  wrote:
> Lindy,
> 
> At 02:33 PM 5/9/2002, you wrote:
> 
> >select="//*[local-name()='apple']"
> >
> >I have found where this statement allows me to get an element named
> apple 
> >regardless of where it is at in the tree.
> 
> Yes, and select="//apple" works even better. It actually gets
> *all* 
> elements named apple, not just one.
> 
> >   What if I need to get a specific apple.
> >
> >/fruit/apples/jonathan/apple
> 
> //jonathan/apple gets you all apples that are inside jonathans.
> 
> >as opposed to
> >/fruit/apples/grannysmith/apple
> 
> This is pretty basic XPath.
> 
> Fancier: all apples that are not in a grannysmith:
> 
> //apple[not(parent::grannysmith)]
> 
> Does anyone have a good recommendation on where new users can go to learn
> 
> XPath? A common weakness of currently-available XSLT books is in their 
> coverage of XPath's data model and syntax. Newbies need something that is
> 
> both (a) comprehensive, systematic and correct, and (b) easy to swallow
> and 
> digest. Unfortunately, it seems to be an area in which lots of folks think
> 
> they can cut corners and fake it, whereas in my experience a couple of 
> hours spent learning this stuff get you a *huge* return on investment in 
> time (and list bandwidth) saved later.
> 
> Anyway Lindy, there's your answer.
> 
> Enjoy,
> Wendell
> 
> 
> ======================================================================
> Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
> Mulberry Technologies, Inc.                http://www.mulberrytech.com
> 17 West Jefferson Street                    Direct Phone: 301/315-9635
> Suite 207                                          Phone: 301/315-9631
> Rockville, MD  20850                                 Fax: 301/315-8285
> ----------------------------------------------------------------------
>    Mulberry Technologies: A Consultancy Specializing in SGML and XML
> ======================================================================
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 

------------------------------------------------
Visit iWon.com - the Internet's largest guaranteed cash giveaway!

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.