Open hlapin opened 6 years ago
Problem is back. I think I understand what is happening but not how to fix. We default to the alphabetical order. the mishnahControllers.js app calls xquery by http request in line 32, but the content of the the "wits" parameter and/or variable is allowed to be the default one. The xquery module generates a list of witnesses from ref.xml or the index file as a query order, but I don't know how to return that to the js app.
I think collatex returns the data in alphabetical order nonetheless. I wrote code to re-order the table and that's probably not doing what it should. See lines 57-70. We can look at it together tomorrow
Yes, let's. I could not figure out how to get the initial request list back to the js.
On Tue, Apr 10, 2018 at 4:56 PM, Raffaele Viglianti < notifications@github.com> wrote:
I think collatex returns the data in alphabetical order nonetheless. I wrote code to re-order the table and that's probably not doing what it should. See lines 57-70 https://github.com/umd-mith/mishnah/blob/exist/resources/editapp/mishnaControllers.js#L57. We can look at it together tomorrow
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/umd-mith/mishnah/issues/17#issuecomment-380243866, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBRzeAgo0SsTfPRRQHuJPgOH5oXEUqFks5tnRyCgaJpZM4S3cOa .
I think I figured out what is going on. passThru.xql serialized as json I changed this (following your earlier module, getTknsJson.xql) to
declare option output:method "text"; declare option output:media-type "text/javascript";
This seems to work, and does not affect the functioning of calls on the function from within exist.
On Tue, Apr 10, 2018 at 4:56 PM, Raffaele Viglianti < notifications@github.com> wrote:
I think collatex returns the data in alphabetical order nonetheless. I wrote code to re-order the table and that's probably not doing what it should. See lines 57-70 https://github.com/umd-mith/mishnah/blob/exist/resources/editapp/mishnaControllers.js#L57. We can look at it together tomorrow
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/umd-mith/mishnah/issues/17#issuecomment-380243866, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBRzeAgo0SsTfPRRQHuJPgOH5oXEUqFks5tnRyCgaJpZM4S3cOa .
Editor app sorting not working properly
Still/again not working right. I will generate a set of test cases to examine.
Have put in some dummy tokens at the beginnings of <ab>
s so we can test. A new <w>
element is added in 1.1.1.1 and 1.1.1.2 whose text is the idno.
1.1.1.1:
1.1.1.2:
Editor app sorting not working properly
What if the xquery that generates the json for collatex actually returns an array:
array[0] = query order as comma-separated string or array
array[1] = json for collatex
Then we don't have to iterate through the json to extract order.
Editor app sorting not working properly
Another, even simpler possibility: Assign a serial prefix to each witness when the data is sent to CollateX:
001-S07326
002-S00483
etc.
The data automatically comes back sorted by query order.
No sorting required. The only thing we need to do at that point is truncate the prefix.
Editor app sorting not working properly
@raffazizzi :
Changed CollateX input to add 001, 002 etc as prefixes to witnesses to force sort results in query order. The attached photo confirms correct order vs earlier example.
Please have a look!
Made minimal modifications to mishnahControllers.js and compare.xql to account for this. As you know, I had planned to rewrite the CollateX input to TEI apparatus format so I am not planning to do much else with the xq right now, but as I understand the code in the js app there is now some unnecessary sorting that I don't want to screw up.
Editor app sorting not working properly
Sorting by input data does not work properly. Sorts the row headers but not the data. In the screenshot below, S00483 has the token "TEST" at the beginning of the target
<ab>
and it still appears where the alphabetically sorted tokens would be (i.e., P00001, P00002, S00483, ...), but the row headers reflects the query order (S00483 first)