如何找到直接位于“specialElem”-element(本例中为“Foo-”)前面的文本节点?当“主”元素内的所有其他空格都应保留时,“特殊元素”元素前面的空格将被删除。XSLT在混合内容元素中查找前面的文本节点
<main>
Foo Foo
<someElem>
Foo Foo
</someElem>
Foo Foo
<otherElem>
<subElem>
Foo Foo
</subElem>
</otherElem>
Foo- <!-- the whitespaces here shall be removed -->
<specialElem>
Bar!
<specialElem/>
Foo Foo
</main>
所需的输出:
富富富富富富富富富酒吧! Foo Foo
Thnaks提前!
你能给我们一个真实的例子,你需要什么?这似乎有点奇怪的要求。 – JLRishe 2014-09-11 13:29:09