I need an XPath expression that does the following:
- If the context node is not the first child, it returns blank
- If the context node is the first child then the expression should return the value of a "temp" node elsewhere in the document
- In this example that value would be \[code\]<myisplayNameTemp>Green, John</myisplayNameTemp>\[/code\]
- InfoPath only supports XPath 1.0 and does not support "Position" expressions
- I am using MS InfoPath and will use rules to apply this expression if more than one child node is detected.
- I believe that I need an expression which utilizes the \[code\]|\[/code\] command and the expression just mentioned above for the first child, or simply a "" for anything else.
- I believe that checking for the existence of a node in the preceding sibling might reveal which node is first without using any position expressions.I can't quite cobble it together.