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

Re: Problem with <a> conversion

Subject: Re: Problem with <a> conversion
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Mon, 01 Jul 2002 10:35:24 +0000
Re:  Problem with <a> conversion
Hi jeni
I agree with you..



From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
CC: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Problem with <a> conversion
Date: Mon, 1 Jul 2002 11:26:04 +0100

Hi Vasu,

> If you are trying to get hold of the all the a elements in the xml
> document irrespective of where or under which element they appear
> ,you can use //a instead of the a under each of the elements..

That's true, but it's simpler to just use "a", as in:

<xsl:template match="a">
  ...
</xsl:template>

The pattern "//a" matches all 'a' elements that are descendants of a
root node. Since all 'a' elements in a document are always descendants
of a root node, you may as well just match all 'a' elements rather
than having the extra test of seeing whether they're descendants of
a root node.

The same goes for any pattern: no match attribute needs to start with
"//".

Note that matching with a pattern is different from selecting with an
expression. If you had to *select* all the 'a' elements in the
document, then you would have to use "//a".

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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






_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx



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.