Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor App #17

Open
hlapin opened this issue Mar 22, 2018 · 8 comments
Open

Editor App #17

hlapin opened this issue Mar 22, 2018 · 8 comments
Assignees

Comments

@hlapin
Copy link
Collaborator

hlapin commented Mar 22, 2018

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)

image

@hlapin hlapin changed the title Sort of witnesses not working in js edit app Editor App Mar 23, 2018
@hlapin hlapin closed this as completed Mar 29, 2018
@hlapin hlapin reopened this Apr 10, 2018
@hlapin
Copy link
Collaborator Author

hlapin commented Apr 10, 2018

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.

@raffazizzi
Copy link
Member

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

@hlapin
Copy link
Collaborator Author

hlapin commented Apr 10, 2018 via email

@hlapin
Copy link
Collaborator Author

hlapin commented Apr 11, 2018 via email

@hlapin
Copy link
Collaborator Author

hlapin commented Apr 12, 2018

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:

image

1.1.1.2:    

image

@hlapin hlapin reopened this Apr 12, 2018
@hlapin
Copy link
Collaborator Author

hlapin commented Apr 12, 2018

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.

@hlapin
Copy link
Collaborator Author

hlapin commented Apr 13, 2018

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.

@hlapin
Copy link
Collaborator Author

hlapin commented Apr 20, 2018

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!
image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants