|
[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Newbie to XSLT
Subject: Newbie to XSLT
From: "Pady Srinivasan" <pady@xxxxxxxxxxxxx>
Date: Wed, 9 Feb 2000 07:46:09 -0600
|

|
I have a XML document as follows:
<instance name="pc">
<value>John</value>
</instance>
<instance name="location">
<value>Cube
47</value>
<size>26 ft</size>
</instance>
<instance type="Association">
<reference
antecedent="pc">
<value>John</value>
</reference>
<reference
dependent="location">
<value>Cube
47</value>
</reference>
</instance>
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"
??? )
Thanks
Pady
|

|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
| RSS 2.0 |
|
| Atom 0.3 |
|
|