Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XSLT get parent node based on child node's attribute

 
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: 21315
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this, or something like it:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic