[jira] Created: (JXPATH-108) count() on NodeSet returned from custom function.

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (JXPATH-108) count() on NodeSet returned from custom function.

Gary D. Gregory (Jira)
count() on NodeSet returned from custom function.
-------------------------------------------------

                 Key: JXPATH-108
                 URL: https://issues.apache.org/jira/browse/JXPATH-108
             Project: Commons JXPath
          Issue Type: Improvement
    Affects Versions: 1.3
            Reporter: Michele Vivoda
            Priority: Blocker


If a NodeSet (SimpleNodeSet) is returned from a custom function,
count() does not work and returns always 1.

Perhaps could be added In ri.compiler.CoreFunction.java, method functionCount(EvalContext)

else if (value instanceof Collection) {... }
else if (value instanceof NodeSet) {
            count = ((NodeSet) value).getValues().size();
        }

or similiar.



--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (JXPATH-108) count() on NodeSet returned from custom function.

Gary D. Gregory (Jira)

     [ https://issues.apache.org/jira/browse/JXPATH-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michele Vivoda updated JXPATH-108:
----------------------------------

    Priority: Minor  (was: Blocker)

lowered priority..

> count() on NodeSet returned from custom function.
> -------------------------------------------------
>
>                 Key: JXPATH-108
>                 URL: https://issues.apache.org/jira/browse/JXPATH-108
>             Project: Commons JXPath
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Michele Vivoda
>            Priority: Minor
>
> If a NodeSet (SimpleNodeSet) is returned from a custom function,
> count() does not work and returns always 1.
> Perhaps could be added In ri.compiler.CoreFunction.java, method functionCount(EvalContext)
> else if (value instanceof Collection) {... }
> else if (value instanceof NodeSet) {
>             count = ((NodeSet) value).getValues().size();
>         }
> or similiar.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (JXPATH-108) count() on NodeSet returned from custom function.

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

     [ https://issues.apache.org/jira/browse/JXPATH-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Benson updated JXPATH-108:
-------------------------------

    Description:
If a NodeSet (BasicNodeSet) is returned from a custom function,
count() does not work and returns always 1.

Perhaps could be added In ri.compiler.CoreFunction.java, method functionCount(EvalContext)

else if (value instanceof Collection) {... }
else if (value instanceof NodeSet) {
            count = ((NodeSet) value).getValues().size();
        }

or similiar.



  was:
If a NodeSet (SimpleNodeSet) is returned from a custom function,
count() does not work and returns always 1.

Perhaps could be added In ri.compiler.CoreFunction.java, method functionCount(EvalContext)

else if (value instanceof Collection) {... }
else if (value instanceof NodeSet) {
            count = ((NodeSet) value).getValues().size();
        }

or similiar.




> count() on NodeSet returned from custom function.
> -------------------------------------------------
>
>                 Key: JXPATH-108
>                 URL: https://issues.apache.org/jira/browse/JXPATH-108
>             Project: Commons JXPath
>          Issue Type: Improvement
>    Affects Versions: 1.3
>            Reporter: Michele Vivoda
>            Priority: Minor
>
> If a NodeSet (BasicNodeSet) is returned from a custom function,
> count() does not work and returns always 1.
> Perhaps could be added In ri.compiler.CoreFunction.java, method functionCount(EvalContext)
> else if (value instanceof Collection) {... }
> else if (value instanceof NodeSet) {
>             count = ((NodeSet) value).getValues().size();
>         }
> or similiar.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (JXPATH-108) count() on NodeSet returned from custom function.

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

     [ https://issues.apache.org/jira/browse/JXPATH-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Benson updated JXPATH-108:
-------------------------------

        Fix Version/s: 1.3
    Affects Version/s:     (was: 1.3)
                       Nightly Builds

> count() on NodeSet returned from custom function.
> -------------------------------------------------
>
>                 Key: JXPATH-108
>                 URL: https://issues.apache.org/jira/browse/JXPATH-108
>             Project: Commons JXPath
>          Issue Type: Improvement
>    Affects Versions: Nightly Builds
>            Reporter: Michele Vivoda
>            Priority: Minor
>             Fix For: 1.3
>
>
> If a NodeSet (BasicNodeSet) is returned from a custom function,
> count() does not work and returns always 1.
> Perhaps could be added In ri.compiler.CoreFunction.java, method functionCount(EvalContext)
> else if (value instanceof Collection) {... }
> else if (value instanceof NodeSet) {
>             count = ((NodeSet) value).getValues().size();
>         }
> or similiar.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (JXPATH-108) count() on NodeSet returned from custom function.

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

     [ https://issues.apache.org/jira/browse/JXPATH-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Benson resolved JXPATH-108.
--------------------------------

    Resolution: Fixed

Fixed.  Thanks!

> count() on NodeSet returned from custom function.
> -------------------------------------------------
>
>                 Key: JXPATH-108
>                 URL: https://issues.apache.org/jira/browse/JXPATH-108
>             Project: Commons JXPath
>          Issue Type: Improvement
>    Affects Versions: Nightly Builds
>            Reporter: Michele Vivoda
>            Priority: Minor
>
> If a NodeSet (BasicNodeSet) is returned from a custom function,
> count() does not work and returns always 1.
> Perhaps could be added In ri.compiler.CoreFunction.java, method functionCount(EvalContext)
> else if (value instanceof Collection) {... }
> else if (value instanceof NodeSet) {
>             count = ((NodeSet) value).getValues().size();
>         }
> or similiar.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Reopened: (JXPATH-108) count() on NodeSet returned from custom function.

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

     [ https://issues.apache.org/jira/browse/JXPATH-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Benson reopened JXPATH-108:
--------------------------------


> count() on NodeSet returned from custom function.
> -------------------------------------------------
>
>                 Key: JXPATH-108
>                 URL: https://issues.apache.org/jira/browse/JXPATH-108
>             Project: Commons JXPath
>          Issue Type: Improvement
>    Affects Versions: Nightly Builds
>            Reporter: Michele Vivoda
>            Priority: Minor
>             Fix For: 1.3
>
>
> If a NodeSet (BasicNodeSet) is returned from a custom function,
> count() does not work and returns always 1.
> Perhaps could be added In ri.compiler.CoreFunction.java, method functionCount(EvalContext)
> else if (value instanceof Collection) {... }
> else if (value instanceof NodeSet) {
>             count = ((NodeSet) value).getValues().size();
>         }
> or similiar.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (JXPATH-108) problems with NodeSet returned from custom function.

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

     [ https://issues.apache.org/jira/browse/JXPATH-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Benson updated JXPATH-108:
-------------------------------

    Description:
If a NodeSet (BasicNodeSet) is returned from a custom function,
count() does not work and returns always 1.

Perhaps could be added In ri.compiler.CoreFunction.java, method functionCount(EvalContext)

else if (value instanceof Collection) {... }
else if (value instanceof NodeSet) {
            count = ((NodeSet) value).getValues().size();
        }

or similiar.


  was:
If a NodeSet (BasicNodeSet) is returned from a custom function,
count() does not work and returns always 1.

Perhaps could be added In ri.compiler.CoreFunction.java, method functionCount(EvalContext)

else if (value instanceof Collection) {... }
else if (value instanceof NodeSet) {
            count = ((NodeSet) value).getValues().size();
        }

or similiar.



        Summary: problems with NodeSet returned from custom function.  (was: count() on NodeSet returned from custom function.)

Additional problem reported by M. Vivoda:
selecting a single value from a returned NodeSet returns the nodeset rather than treating as a valid part of the xpath graph.  User suggested fix for both issues (obviating the fix in CoreFunction) to convert the NodeSet to an EvalContext when the extension function is called.  I agree with the analysis.

> problems with NodeSet returned from custom function.
> ----------------------------------------------------
>
>                 Key: JXPATH-108
>                 URL: https://issues.apache.org/jira/browse/JXPATH-108
>             Project: Commons JXPath
>          Issue Type: Improvement
>    Affects Versions: Nightly Builds
>            Reporter: Michele Vivoda
>            Priority: Minor
>             Fix For: 1.3
>
>
> If a NodeSet (BasicNodeSet) is returned from a custom function,
> count() does not work and returns always 1.
> Perhaps could be added In ri.compiler.CoreFunction.java, method functionCount(EvalContext)
> else if (value instanceof Collection) {... }
> else if (value instanceof NodeSet) {
>             count = ((NodeSet) value).getValues().size();
>         }
> or similiar.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (JXPATH-108) problems with NodeSet returned from custom function.

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

     [ https://issues.apache.org/jira/browse/JXPATH-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Benson resolved JXPATH-108.
--------------------------------

    Resolution: Fixed

svn rev 604261.

> problems with NodeSet returned from custom function.
> ----------------------------------------------------
>
>                 Key: JXPATH-108
>                 URL: https://issues.apache.org/jira/browse/JXPATH-108
>             Project: Commons JXPath
>          Issue Type: Improvement
>    Affects Versions: Nightly Builds
>            Reporter: Michele Vivoda
>            Priority: Minor
>             Fix For: 1.3
>
>
> If a NodeSet (BasicNodeSet) is returned from a custom function,
> count() does not work and returns always 1.
> Perhaps could be added In ri.compiler.CoreFunction.java, method functionCount(EvalContext)
> else if (value instanceof Collection) {... }
> else if (value instanceof NodeSet) {
>             count = ((NodeSet) value).getValues().size();
>         }
> or similiar.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.