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

RE: further question on creating an id

Subject: RE: further question on creating an id
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Thu, 7 Feb 2002 09:42:51 -0000
creat id
Define
  xsl:key name='prof' match="profession" use="."

To get an id for a particular profession $p, use
  generate-id(key('prof', $p)[1])

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of ªL ¤lªä
> Sent: 06 February 2002 20:39
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  further question on creating an id
>
>
> hi there, i was wondering anyone could help me out on this question...
> suppose i have such structure...
>
> <people>
> <male>
>   <person>
>     <name>
>       <first_name>Alan</first_name>
>       <last_name>Turing</last_name>
>     </name>
>     <profession>computer scientist</profession>
>     <profession>mathematician</profession>
>     <profession>cryptographer</profession>
>   </person>
>
>   <person>
>     <name>
>       <first_name>Richard</first_name>
>       <middle_initial>M</middle_initial>
>       <last_name>Feynman</last_name>
>     </name>
>     <profession>physicist</profession>
>     <hobby>Playing the bongoes</hobby>
>   </person>
> ...
> </technic>
>
> <female>
> <person>
>     <name>
>       <first_name>Shelia</first_name>
>       <middle_initial>M</middle_initial>
>       <last_name>Feynman</last_name>
>     </name>
>     <profession>mathematican</profession>
>     <hobby>Jogging</hobby>
>   </person>
> ...
> </female>
> </people>
>
> my question is, i wish to transform it into a html format, is
> it possible
> to add an id to all the profession? will i be able to have
> the same id for
> identical profession? (e.g profession for mathematican will
> be the same
> regardless whether it is in the male element or female
> element)if no, is
> there a way to get round the problem?
>
> furthermore, i seen Andrew provide a solution for Yan for
> selecting an
> element dynamically, however, i was wondering how would i
> achieve similiar
> result using xalan and xerces?
>
> many thanks
>
> Kit
>
> _________________________________________________________________
> ¨Ï¥Î MSN Messenger »PªB¤Í¦b½u¤W²á¤Ñ¡Ghttp://messenger.microsoft.com/tc¡C
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 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.