RJP43 / CitySlaveGirls

The Restoration of Nell Nelson
http://nelson.newtfire.org
5 stars 4 forks source link

Help with XSLT -- Suggestions Please!! #63

Open RJP43 opened 8 years ago

RJP43 commented 8 years ago

@ebeshero @spadafour @nlottig94 @brookestewart

So the final reading view for the XSLTs that I need to finish is the one that highlights our grammatical markup and I am struggling to come up with a logical setup. So previously when we were highlighting our old grammatical markup we had a table running to the left of the article text basically listing all of the nouns and their corresponding adjectives. See here for how we were doing that before! We can do this again, but I wanted to see if anyone had any better ideas???

Also I wanted to see about outputting the SVG of each article's network graph before the output of the text (and possible tables), so that when the site user selects to view the article using the grammar xslt the network analysis for that specific article pops up and then as the user scrolls down you get the article text and possibly the tables if we decide on keeping those. What I am struggling with however is grabbing just what is necessary from the file (the group of them can be seen here) and calling on it in my XSLT. Since we are using PHP it is necessary that the XSLT can generically call on any given SVG according to the matching date that I already have the XSLT calling on in the <title> element of the HTML. I thought that by having the date in each of the network graphs' filenames it would be easier to match. I'm not sure if its even possible, but I think that would be cool. I guess the other thing we can do if we can't grab a piece of the SVG file is we can have all of the graphs output on a page under analysis with an id surrounding the div of each and just have a link that when the user clicks can jump them to the network analysis page where that article's network is, but I think having it all on one page would be a lot cooler! Maybe XQuery is the better place for that, but I guess then we would have to figure out how to get the rest of what I already have in this XSLT working using XQuery.

Any feedback and suggestions are welcome!!!!

ebeshero commented 8 years ago

@RJP43 I am not sure from your XSLT where you are doing the work of calling up the appropriate SVG network graph for a particular article, and I haven't seen how you are incorporating PHP yet, so I am not sure where the association of files is happening. However, what you want to do should be do-able, if you can match a string of text in the SVG base-uri() with some part of a title element or base-uri() of the current XML file being processed. You can write a variable that identifies the appropriate SVG file by:

(And you can do that stitch work in XSLT or XQuery--you don't need to switch technologies.)

Since most of my days this week are being totally consumed by the TEI Technical Council and the PHP portion of this is unfamiliar territory, I want to call for backup help on this issue for Becca and Rob! May I ask @djbpitt to look in on this?

RJP43 commented 8 years ago

@ebeshero @djbpitt I haven't yet actually called on it in the XSLT. So far the XSLT just takes care of all the other aspects of the text that need to be accounted for. I have not done anything yet to highlight our grammar markup because I was looking for suggestions, but I will give it a shot this evening after I finish a paper. I think I will go ahead and have the table alongside the text again, but I guess I was struggling with how to also have what's in the table be highlighted in correspondence to what's in the article text.

ebeshero commented 8 years ago

@RJP43 Okay, you know my thoughts on this, I think. Reduce the text at the top so we can access your interface more quickly. You need some kind of instruction or legend to be visible, but reduce the space of it, and I wouldn't use center alignment in that left-hand div. Try listing out the relevant information and instructions---will a bulleted list work there?

This is really a writing and organization challenge: Concentrate on prioritizing what's most important for your site visitors, and drawing the eye to the parts of the page they can interface with.

Is this a good moment to revisit the concept of multiple audiences for this project site?

I know your use of PHP is to guide people to different views of the Nelson articles based on their interests in a) your research question: studying the language of possession, b) learning more about the Chicago neighborhoods where Nelson did her interviews, and c) comparing versions of texts to see what was dropped.

For a), weren't we discussing an integration of an SVG network graph filtered for each article to appear with the text of the article? In which case, were you going to position the network graph on the page, and balance it with a toggle-able reading view that highlights possessive language in the text? The HTML table might appear, then, beneath the network graph.

I think you might also be able to match the text contents of <g> elements in the SVG output of your network graph with language in the table and text, so you have a three-way JavaScript toggling in play. (You'd need to figure out a way to highlight a selected node in the SVG--maybe by drawing a border around it as we did in our old homework exercise from last fall. Here's how we highlighted by drawing a red border around an SVG element: http://newtfire.org/dh/WSGA_Web.html ) Worth a try?