Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
2 つの xpath 式の共通セットを取得する方法を教えてください。それはユニオンの反対です(|ではありません)
$ns1これは、2 つのノードセットとの交点を選択するためのよく知られたケイエシアンの公式 (恒等式) です$ns2。
$ns1
$ns2
$ns1[count(. | $ns2) = count($ns2)]
この式は、1.0 を含むすべてのバージョンの XPath で使用できます。$ns1and$ns2を、交差させたい 2 つのノード セットを選択する特定の XPath 式に置き換えるだけです。