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.
我有一个 xslt 变量声明如下:
<xsl:variable name="list"> <item>Elem1</item> <item>Elem2</item> <item>Elem3</item> </xsl:variable>
我需要一个 xpath 来匹配所有本地名称不属于$list. 我本可以选择*[not(self::Elem1|self::Elem2|self::Elem3)]等等。但是我想声明这个变量,以便以后更容易维护。请指教。
$list
*[not(self::Elem1|self::Elem2|self::Elem3)]
尝试..........
*[not(name()=$list/item)]