This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

XSL "Joining"


Hello, I have the following problem I need help with.  I would like to perform something like a join on two different nodes so that I may get a description field from another node.  Following is an example of the XML:

XML:
<response>
	<detail @id='1' @parent_key='2' @desc='First Row'/>
	<detail @id='2' @parent_key='3' @desc='Second Row'/>
	<detail @id='3' @parent_key='' @desc='Third Row'/>
</response>

Problem Statement:
In the xsl, I do a template match on //detail and output each attribute in a table.  What is the query to get the @desc attribute by joining the @parent_key attribute to the @id attribute?

Desired Outupt:

ID	Name		Parent
1	First Row	Second Row
2	Second Row	Third Row
3	Third Row	-

Constraints:
We have to use xmlns:xsl="http://www.w3.org/TR/WD-xsl";, so I cannot use any features of the new standard.

Any help would be deeply appreciated.

John Cooper

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]