Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 7th, 2004, 11:07 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 290
Thanks: 24
Thanked 0 Times in 0 Posts
Default id() Function

Hi,

I am trying to figure out how to use the id() function and was wondering if someone could provide some explanation and if possible a simple example of how to use it.

Cheers,

Claudio


 
Old December 7th, 2004, 11:22 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

The id function retrieves a set of nodes based on a whitespace delimited list of ID's. To qualify as an ID the xml document must have a doctype with the attribute declared as of type ID, the name of the attribute is irrelevant.

See:

http://msdn.microsoft.com/library/de...asp?frame=true



--

Joe (Microsoft MVP - XML)
 
Old December 7th, 2004, 12:37 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 290
Thanks: 24
Thanked 0 Times in 0 Posts
Default

Hi Joe,

Thanks for your reply.

I read the example on Microsoft site but found it a bit complicated to understand. Would you have another more simple (less convoluted)
example??

Cheers,

Claudio

 
Old December 7th, 2004, 12:44 PM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Not really, what bit don't you follow? It does the same as document.getElementById in a web page except that it returns a node set (which may only consist of one node) rather than just one element.

It's rarely used in XSLT because you need a DTD, using the key function is usually easier.

--

Joe (Microsoft MVP - XML)
 
Old December 7th, 2004, 01:27 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 290
Thanks: 24
Thanked 0 Times in 0 Posts
Default

ok Joe,

thanks a lot






Similar Threads
Thread Thread Starter Forum Replies Last Post
'this.ID = id;' in class construction holf BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 October 6th, 2006 10:58 AM
Passing a variable into the id() function EstherMStrom XSLT 5 January 19th, 2005 02:32 PM
ZVON Tutorial Page 56 id() function scubaduba XSLT 1 November 1st, 2004 12:37 PM
why not index.asp?id=1 can be www.myweb.com/?id=1 BurhanKhan Classic ASP Professional 11 September 6th, 2004 02:06 PM
retreive function/Line from macro or function? MikoMax J2EE 0 April 1st, 2004 04:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.