How do I select the last N elements with XPath?

前端 未结 2 1703
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-15 23:37

I support a web site which generates content XML that is then translated into web pages using XSLT. I have been asked to create a new stylesheet which will transform the ou

2条回答
  •  被撕碎了的回忆
    2020-12-15 23:53

    position()/last() returns position/last position within the current context, so when the navigator is positioned in one , position() will return within that month, and last() will return last within that month, but i guess you know that.

    Therefore, what you could do is flatten all 's in an array and put in a variable, prior to selecting just like you did before.

    
    
    

提交回复
热议问题