How to select ancestor based on ancestor's attribute
- by kman
I am new to this, so please bear with me...
I need to very simply modify content based on a template match:
topic/body/section/title
This template match works fine. However, I need this to only happen if the topic element has a title element with the value of "Preface".
Can someone please help with the code?
Here is the code:
<topic>
<title>Preface</title>
<body>
<p>This publication was written for...</p>
<section>
<title>Publication Information/Version</title>
I need to be able to modify section/title only when the text of topci/title = "Preface".
make sense?