Subject: Anybody know XSLT training in Dallas From: "Pady Srinivasan" <pady@xxxxxxxxxxxxx> Date: Wed, 9 Feb 2000 21:38:41 -0400 (EST) |
Thanks everybody for the reply. I need to know if somebody offers XSLT training in the Dallasarea. I am looking for a intermediate/advanced course. If anybody is in this area, and would like to take a private class for me, I would be interested. I need this course as soon as possible ( hopefully, this week ). Any help would be appreciated. Thanks Pady ----- Original Message ----- From: Steve Tinney <stinney@xxxxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxx> Sent: Wednesday, February 09, 2000 8:46 AM Subject: Re: Newbie to XSLT > > So to find out what size John's cubicle is, > > > > 1. I need to go to the 3rd "instance" node, ( type is "Association" > > ) > > 2. look up the relationship between John's PC and where his location > > is ( Cube 47 ) > > 3. Go back to 2nd "instance" node ( name is "location" ), and get the > > size. > > > > Note that there could be multiple PC's and Location's in the same XML > > document. > > > > From my basic knowledge of XSLT, I felt that doing this using a > > stylesheet would not be possible. So I was thinking of using the DOM > > tree and using XPath to do this. > > > > I want to know from the XSL gurus, if this can be done using a XSL > > stylesheet. ( Basically, how do we store the "Cube 47" value in a > > variable, then use it to go back through the document and look for the > > size for "Cube 47" ??? ) > > There is nothing here that cannot be done with XSLT (which is in some > sense a superset of XPath). > > To store a value in a variable, use xsl:variable. To reference it > later, prefix the name with '$'. To navigate around the document use > location steps and predicates. See the XPath and XSLT specs and the XSL > FAQ for further information. > > For example, you could do something like this, although it does not > function in the same way as you put it in the question: > > <xsl:variable name="cube" select="/*/instance[@type='Association'] > /reference[@dependent='location'] > /value"/> > <xsl:variable name="size" select="/*/instance > [@name='location'][value=$cube] > /size"/> > > You can even do all this without variables by using the current() > function. > > Steve > > > 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Newbie to XSLT, Steve Tinney | Thread | Re: Newbie to XSLT, Juergen Hermann |
Re: Newbie to XSLT, Juergen Hermann | Date | RE: feature request; id idref pair, Pawson, David |
Month |