aspose file tools*
The moose likes XML and Related Technologies and the fly likes Selecting value of element, whose parent element is different Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Selecting value of element, whose parent element is different " Watch "Selecting value of element, whose parent element is different " New topic
Author

Selecting value of element, whose parent element is different

nirjari patel
Ranch Hand

Joined: Apr 23, 2009
Posts: 374

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
Bartender

Joined: Oct 14, 2005
Posts: 18564
    
    8

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>.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Selecting value of element, whose parent element is different