Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

XSLT get parent node based on child node's attribute  RSS feed

 
Vijay Rao
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I have been struggling to learn XSL and stuck with one issue.

My input xml file is as follows:



What i need is as follows:

if a object has parentId, get the object whose id attribute matches with
current object's parentId.

If matches and the type of the found parent object is of type 'horizontal',
then get the color object.

below is the xsl i was trying to write.
Any help would be appreciatable.


[ April 11, 2007: Message edited by: Vijay Rao ]
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this, or something like it:
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!