exf:sort bug

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

exf:sort bug

Steve Lenhart
Alex / Erik,

I'm trying to use exf:sort to sort an itemset in my select1 .... if I
use ...

<xforms:itemset nodeset="instance('geographicOrg')//node[not(node/id)]">
    <exf:sort select="name"/>
    <xforms:label ref="name"/>
    <xforms:value ref="id"/>
</xforms:itemset>

I get no errors but it also doesn't sort on name. If I try ....

<xforms:itemset
nodeset="exf:sort(instance('geographicOrg')//node[not(node/id)], 'name')">
    <xforms:label ref="name"/>
    <xforms:value ref="id"/>
</xforms:itemset>

I get this error ..... XForms error: Non-comparable types found while
sorting: Objects are not comparable (class
org.orbeon.saxon.dom4j.NodeWrapper, class
org.orbeon.saxon.dom4j.NodeWrapper)

Is this a bug??

Steve






--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

slenhart.vcf (299 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: exf:sort bug

Alexander Žaťko
Steve, according to Erik's response to my question:

http://www.objectweb.org/wws/arc/ops-users/2006-12/msg00185.html

...seems like you will have to use the "function variant" of the sort  
functionality as the "element variant" is not supported by OF.

A.


On Jan 15, 2007, at 5:00 PM, Steve Lenhart wrote:

> Alex / Erik,
>
> I'm trying to use exf:sort to sort an itemset in my select1 .... if  
> I use ...
>
> <xforms:itemset nodeset="instance('geographicOrg')//node[not(node/
> id)]">
>    <exf:sort select="name"/>
>    <xforms:label ref="name"/>
>    <xforms:value ref="id"/>
> </xforms:itemset>
>
> I get no errors but it also doesn't sort on name. If I try ....
>
> <xforms:itemset nodeset="exf:sort(instance('geographicOrg')//node
> [not(node/id)], 'name')">
>    <xforms:label ref="name"/>
>    <xforms:value ref="id"/>
> </xforms:itemset>
>
> I get this error ..... XForms error: Non-comparable types found  
> while sorting: Objects are not comparable (class  
> org.orbeon.saxon.dom4j.NodeWrapper, class  
> org.orbeon.saxon.dom4j.NodeWrapper)
>
> Is this a bug??
>
> Steve
>
>
>
>
> <slenhart.vcf>
>
> --
> You receive this message as a subscriber of the ops-
> [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/ 
> wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: exf:sort bug

Steve Lenhart
Alex,

Thanks, that answers why it is working that way, but I still get the error below when I try to use the "function variant".

Steve


Alexander Zatko wrote:
Steve, according to Erik's response to my question:

http://www.objectweb.org/wws/arc/ops-users/2006-12/msg00185.html

...seems like you will have to use the "function variant" of the sort functionality as the "element variant" is not supported by OF.

A.


On Jan 15, 2007, at 5:00 PM, Steve Lenhart wrote:

Alex / Erik,

I'm trying to use exf:sort to sort an itemset in my select1 .... if I use ...

<xforms:itemset nodeset="instance('geographicOrg')//node[not(node/id)]">
   <exf:sort select="name"/>
   <xforms:label ref="name"/>
   <xforms:value ref="id"/>
</xforms:itemset>

I get no errors but it also doesn't sort on name. If I try ....

<xforms:itemset nodeset="exf:sort(instance('geographicOrg')//node[not(node/id)], 'name')">
   <xforms:label ref="name"/>
   <xforms:value ref="id"/>
</xforms:itemset>

I get this error ..... XForms error: Non-comparable types found while sorting: Objects are not comparable (class org.orbeon.saxon.dom4j.NodeWrapper, class org.orbeon.saxon.dom4j.NodeWrapper)

Is this a bug??

Steve




<slenhart.vcf>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

slenhart.vcf (299 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: exf:sort bug

Alexander Žaťko
Steve,

It took me a while to figure out how to populate the function params to make it work. It is possible that I have also encountered the error you are seeing, but I do not remember any more. I assume you are using one of the newer OF builds that support the function?

This is the sorting snippet from my code that is working:

<xforms:repeat nodeset="exf:sort(//row, concat('item[',//app/sorting,']/v'), //app/sorting/@data-type, //app/sorting/@order)" id="row">

If you want I can send you the complete XHTML file.

A.


On Jan 15, 2007, at 6:34 PM, Steve Lenhart wrote:

Alex,

Thanks, that answers why it is working that way, but I still get the error below when I try to use the "function variant".

Steve


Alexander Zatko wrote:
Steve, according to Erik's response to my question:

http://www.objectweb.org/wws/arc/ops-users/2006-12/msg00185.html

...seems like you will have to use the "function variant" of the sort functionality as the "element variant" is not supported by OF.

A.


On Jan 15, 2007, at 5:00 PM, Steve Lenhart wrote:

Alex / Erik,

I'm trying to use exf:sort to sort an itemset in my select1 .... if I use ...

<xforms:itemset nodeset="instance('geographicOrg')//node[not(node/id)]">
   <exf:sort select="name"/>
   <xforms:label ref="name"/>
   <xforms:value ref="id"/>
</xforms:itemset>

I get no errors but it also doesn't sort on name. If I try ....

<xforms:itemset nodeset="exf:sort(instance('geographicOrg')//node[not(node/id)], 'name')">
   <xforms:label ref="name"/>
   <xforms:value ref="id"/>
</xforms:itemset>

I get this error ..... XForms error: Non-comparable types found while sorting: Objects are not comparable (class org.orbeon.saxon.dom4j.NodeWrapper, class org.orbeon.saxon.dom4j.NodeWrapper)

Is this a bug??

Steve




<slenhart.vcf>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
<slenhart.vcf>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: exf:sort bug

Steve Lenhart
In reply to this post by Steve Lenhart
See the attached example for the error I keep getting .... tested with the nightly build and got the same result.

Steve


Steve Lenhart wrote:
Alex,

Thanks, that answers why it is working that way, but I still get the error below when I try to use the "function variant".

Steve


Alexander Zatko wrote:
Steve, according to Erik's response to my question:

http://www.objectweb.org/wws/arc/ops-users/2006-12/msg00185.html

...seems like you will have to use the "function variant" of the sort functionality as the "element variant" is not supported by OF.

A.


On Jan 15, 2007, at 5:00 PM, Steve Lenhart wrote:

Alex / Erik,

I'm trying to use exf:sort to sort an itemset in my select1 .... if I use ...

<xforms:itemset nodeset="instance('geographicOrg')//node[not(node/id)]">
   <exf:sort select="name"/>
   <xforms:label ref="name"/>
   <xforms:value ref="id"/>
</xforms:itemset>

I get no errors but it also doesn't sort on name. If I try ....

<xforms:itemset nodeset="exf:sort(instance('geographicOrg')//node[not(node/id)], 'name')">
   <xforms:label ref="name"/>
   <xforms:value ref="id"/>
</xforms:itemset>

I get this error ..... XForms error: Non-comparable types found while sorting: Objects are not comparable (class org.orbeon.saxon.dom4j.NodeWrapper, class org.orbeon.saxon.dom4j.NodeWrapper)

Is this a bug??

Steve




<slenhart.vcf>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
  


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

test.xhtml (2K) Download Attachment
slenhart.vcf (299 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: exf:sort bug

Steve Lenhart
In reply to this post by Alexander Žaťko
Alex,

Thanks, I got it working now. I added 'text' to the sort function ...... not sure why this is needed, its supposed to be optional and default to 'text' but apparently it's not.

Steve



Alexander Zatko wrote:
Steve,

It took me a while to figure out how to populate the function params to make it work. It is possible that I have also encountered the error you are seeing, but I do not remember any more. I assume you are using one of the newer OF builds that support the function?

This is the sorting snippet from my code that is working:

<xforms:repeat nodeset="exf:sort(//row, concat('item[',//app/sorting,']/v'), //app/sorting/@data-type, //app/sorting/@order)" id="row">

If you want I can send you the complete XHTML file.

A.


On Jan 15, 2007, at 6:34 PM, Steve Lenhart wrote:

Alex,

Thanks, that answers why it is working that way, but I still get the error below when I try to use the "function variant".

Steve


Alexander Zatko wrote:
Steve, according to Erik's response to my question:

http://www.objectweb.org/wws/arc/ops-users/2006-12/msg00185.html

...seems like you will have to use the "function variant" of the sort functionality as the "element variant" is not supported by OF.

A.


On Jan 15, 2007, at 5:00 PM, Steve Lenhart wrote:

Alex / Erik,

I'm trying to use exf:sort to sort an itemset in my select1 .... if I use ...

<xforms:itemset nodeset="instance('geographicOrg')//node[not(node/id)]">
   <exf:sort select="name"/>
   <xforms:label ref="name"/>
   <xforms:value ref="id"/>
</xforms:itemset>

I get no errors but it also doesn't sort on name. If I try ....

<xforms:itemset nodeset="exf:sort(instance('geographicOrg')//node[not(node/id)], 'name')">
   <xforms:label ref="name"/>
   <xforms:value ref="id"/>
</xforms:itemset>

I get this error ..... XForms error: Non-comparable types found while sorting: Objects are not comparable (class org.orbeon.saxon.dom4j.NodeWrapper, class org.orbeon.saxon.dom4j.NodeWrapper)

Is this a bug??

Steve




<slenhart.vcf>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
<slenhart.vcf>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

slenhart.vcf (299 bytes) Download Attachment