Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

position函数对比不支持count函数 #66

Closed
Ruffianjiang opened this issue Sep 2, 2021 · 2 comments
Closed

position函数对比不支持count函数 #66

Ruffianjiang opened this issue Sep 2, 2021 · 2 comments
Labels

Comments

@Ruffianjiang
Copy link

Please answer these questions before submitting your issue. Thanks!

  1. What did you do , If possible, provide a recipe for reproducing the error.(使用的表达式与使用场景,确保能够复现)?
<bookstore>

<book category="COOKING">
  <title lang="en">Everyday Italian</title>
  <author>Giada De Laurentiis</author>
  <year>2005</year>
  <price>30.00</price>
</book>

<book category="CHILDREN">
  <title lang="en">Harry Potter</title>
  <author>J K. Rowling</author>
  <year>2005</year>
  <price>29.99</price>
</book>

<book category="WEB">
  <title lang="en">XQuery Kick Start</title>
  <author>James McGovern</author>
  <author>Per Bothner</author>
  <author>Kurt Cagle</author>
  <author>James Linn</author>
  <author>Vaidyanathan Nagarajan</author>
  <year>2003</year>
  <price>49.99</price>
</book>

<book category="WEB">
  <title lang="en">Learning XML</title>
  <author>Erik T. Ray</author>
  <year>2003</year>
  <price>39.95</price>
</book>

</bookstore>

类似语法如下:
"/bookstore/book[position()<count(/bookstore/book)]/price"
"/bookstore/book[position()<count(/bookstore/book)-1]/price"
"/bookstore/book[position()<count(/bookstore/book)-1]/price"
"/bookstore/book[position()<count(/bookstore/book)-sum(/bookstore/book/year)]/price"
2. What did you expect to see(期望看到什么)?

  1. What did you see instead(JsoupXpath给出的结果)?

语法报错

  1. What version of JsoupXpath are you using(当前版本)?
    2.5.0
@zhegexiaohuozi
Copy link
Owner

下一版中修复

@zhegexiaohuozi
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants