This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Selecting value of element, whose parent element is different

 
nirjari patel
Ranch Hand
Posts: 386
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Can I select like this? value from an element, whose parent element is diferent (ie value of an element from different context) ? OR do I have to select elements from respective parent element only ?

Thanks
 
Paul Clapham
Sheriff
Pie
Posts: 20758
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The <xsl:value> element doesn't care that it's a child of some other element which refers to something else. The only relevance of the <xsl:template> element which contains it is that it sets the context node. You can use any XPath element you like in the "select" element of <xsl:value>.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic