如何找到直接位於「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