i'm looking way write xpath/schematron test identify specific node time contains sort of non-white space, unwrapped text anywhere directly within node (meaning possibly among, not in child element). if xml looks this:
<root> ... <node> <arbitrarychild/> find me <arbitrarychild>don't find me</arbitrarychild> more text </node> ... <node> <arbitrarychild/> <arbitrarychild/> <arbitrarychild>don't find me</arbitrarychild> </somenode> ... </node> it identify first instance of somenode, not second. i've tried every variation of contains(...), text(), , test="..." can think of, i'm approaching wrong direction.
i think it's simply
node[text()[normalize-space()]]
i don't think "and *" in answer @har07 relates requirement stated in question: didn't there had @ least 1 element child, there had (non-empty) text.
Comments
Post a Comment