commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michele Vivoda (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JXPATH-174) Improve JXPath documentation
Date Sun, 30 Nov 2014 19:06:12 GMT

    [ https://issues.apache.org/jira/browse/JXPATH-174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14229201#comment-14229201
] 

Michele Vivoda commented on JXPATH-174:
---------------------------------------

I changed some code I had and made a quick and dirty git hub project about this:

https://github.com/eleumik/jxpath_test_reference_table

the results tables are not really user friendly but is a start

2 observations:

-- [Test  #48 | http://eleumik.github.io/jxpath_test_reference_table/TestReferenceTableBean.html#T48]
 - {{descendant-or-self::integer\[0\]}} returns the root, I believe should return null, should
probably fill a jira issue

-- [Test #85,#86,#87 | eleumik.github.io/jxpath_test_reference_table/TestReferenceTableBean.html#T85]
- show that when selecting properties of a bean is like some 'place' is reserved for properties
that are null.. I personally didn't expected this ;-) The [same tests on a map |  http://eleumik.github.io/jxpath_test_reference_table/TestReferenceTableMap.html#T85]
show results as expected. The tests use {{selectSingleNode}} but {{selectNodes}} show same
behavior and some items of the returned list are null, there is a test about this {{test85_86_87_Bean_SelectMultipleNodes}}.
 Should dig a little bit what happens for collections.


> Improve JXPath documentation
> ----------------------------
>
>                 Key: JXPATH-174
>                 URL: https://issues.apache.org/jira/browse/JXPATH-174
>             Project: Commons JXPath
>          Issue Type: Improvement
>            Reporter: Michele Vivoda
>            Priority: Minor
>              Labels: documentation
>             Fix For: 1.4
>
>
> I think a cause of issues with JXPath is in that the expected behavior in some cases
is not easy to specify if not undefined, this happens because XPath was designed for XML and
there is no specification for doing XPath on beans, maps or even collections as JXPath is
able to perform.
> For example what is {{/}} ? what is {{/\*}} ? What is 'document order' ? What is {{text()}}
? Some questions are answered http://commons.apache.org/proper/commons-jxpath/users-guide.html#Document_Order
but documentation is sparse.
> I think a table that summarizes what JXPath does at the moment would be handy and a way
to improve user experience.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message