Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D1A8F10005 for ; Sun, 30 Nov 2014 19:07:12 +0000 (UTC) Received: (qmail 71577 invoked by uid 500); 30 Nov 2014 19:07:12 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 71424 invoked by uid 500); 30 Nov 2014 19:07:12 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 71117 invoked by uid 99); 30 Nov 2014 19:07:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Nov 2014 19:07:12 +0000 Date: Sun, 30 Nov 2014 19:07:12 +0000 (UTC) From: "Michele Vivoda (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (JXPATH-174) Improve JXPath documentation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JXPATH-174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14229201#comment-14229201 ] Michele Vivoda edited comment on JXPATH-174 at 11/30/14 7:07 PM: ----------------------------------------------------------------- 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 a not null value, I believe should return null, should probably fill a jira issue -- [Test #85,#86,#87 | http://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. was (Author: vivodamichele@hotmail.com): 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 a not null value, 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)