How do I use an XPath conditional expression to replace node text?
Posted on 2009-05-06
I am trying to create an XPath 2.0 expression that will navigate to an attribute, test its value, e.g. "S" or "Sensitive" then replace the text with other text in the attribute's parent.
Using XSLT 2.0 is not an option as I am accepting an XSD compliant document then evaluating node values using XPath expressions stored in a "rules" table, for the document's acceptance or rejection. The latest wrinkle is not testing for a value in one node attribute, then replacing ALL the text in the node.
The help given will cause me to burn a sacrifice in your names to the BBQ gods (I have not had a great deal of time off lately), and award the assigned points with enthusiasm.
Your expertise is most appreciated.