Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WHat are Keys ? (plz Help)

 
Hussain
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Every Budy help me what are keys , and how it can be used with style sheet
<xsl:key/>
 
Anitha Lingam
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Definition and Usage
The <xsl:key> element defines a key. This element is used with the key() function.
Syntax
<xsl:key name="name" match="pattern" use="expression"/>
Example
Suppose you have an xml file called persons.xml:
<persons>
<person name="Tarzan" id="050676"/>
<person name="Donald" id="070754"/>
<person name="Dolly" id="231256"/>
</persons>
You can define a key in the .xsl file like this:
<xsl:key name="personreg" match="person" use="@id"/>
To find the person with id value "050676" you can write:
<xsl:apply-templates select="key('personreg','050676')"/>
Tips and Notes
<xsl:key> is a top level element, and must appear as a child node of the <xsl:stylesheet> element.
[ May 16, 2002: Message edited by: Anitha Lingam ]
 
Hussain
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thankx , u r Great and Smart

R U certified ...? Anita
 
Anitha Lingam
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am just preparing for the certification.
 
Hussain
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
we also are Preparing
Muhammad Hussain and Syed Ali Raza Zaidi
We are giving paper on 23rd,Thursday,May 2002.
and we Have registered.
If u can share some of Ur Experiences , It will be helpfull for both Of Us.
If u have MSN messanger,we can talk.
shahsahab90@hotmail.com
s_aliraza2001@hotmail.com
Hope u will reply
[ May 17, 2002: Message edited by: Muhammad Hussain ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic