-
Notifications
You must be signed in to change notification settings - Fork 3
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
SVG HELP! #28
Comments
@nlottig94 Before I check the poem itself, tell me if there is a chance a dash character could be sitting outside an |
I don't believe there are. |
Just took a look at poem 1, and you're right, they're all inside rdg elements. Actually I think you're missing some dashes because you're not actually counting the dashes themselves, but instead the parent elements that contain them! A few of these elements probably contain multiple dashes. So you want to be counting the dash characters directly, in any elements' text node. Let's see if we can figure out a way... |
Okay, I'll look at it tomorrow. I'm not at my computer right now. |
Opps, didn't mean to do that! I was typing a similar thought to @ebeshero and hit the wrong button lol |
I'm checking Michael Kay, and I think what we want is analyze-string--but let me check... |
Read about I think I know how to write this... |
@nlottig94 @brookestewart @amielnicki I tried a few strategies last night and this morning, and it's not quite right! But first of all, I made some corrections to your xsl:stylesheet so it would read TEI, and I found a reliable strategy for plotting the x position of your dots. What's not working is counting the hyphens...yet. I'm confident we'll figure it out, but I pushed what I have so far: See: https://github.com/ebeshero/EmilyDickinson16/blob/master/xslt_to_SVG.xsl You'll see that I've experimented with a couple of variables, and I need to explain to you how this works if I can get it to work. There may well be a simpler way to do this, so I'm going to ask for a little help myself. |
@djbpitt Hi David! I wonder if you can help us here: We're looking for a good strategy to do the following on the Dickinson project:
The problem is: Apparently I am generating lots of X's, and it looks like a different number for each poem, but I'm getting much too many: in the 400s through 600s, when the numbers should be more like the 20s to 30s. Can anyone help figure out what's going wrong here? I bet it's something to do with overcalculating or getting repeated counts somehow--some way in which I've framed how our looping through the poems and/or the rdg elements works. It may be my strategy is too complex, so maybe let's see if we can figure out a simpler way to do this! |
Dear Elisa and everyone else, It looks as if you're defining $hyphenX as equal to a element and string-length($hyphenX) - string-length(translate($hyphenX,'-','')) This strips the hyphens from $hyphenX (on the right) and subtracts its I just peeked at that bit of XSLT code, so I haven't explored the rest or Best, David On Tue, Dec 15, 2015 at 10:56 AM, Elisa Beshero-Bondar <
|
I'm finally looking back at this after a busy day! A quick correction for everyone: We should be calling these dashes (not hyphens). We're using a dash character. In your write-ups on Dickinson for the site, you really don't want to call these hyphens! |
@djbpitt Okay, a follow-up question: When I write this code:
should it not reach into the |
@djbpitt @nlottig94 @brookestewart @amielnicki Thanks to David's advice I worked out an alternative solution, which I've commented on in this commit: 0e1de33 If you can follow what I've started here, I think you'll be in good shape to continue with calculating your percentages. Beware of my testOutput SVG, which looks pretty but isn't correct! It's just outputting raw counts multiplied by a $y-interval, and this has nothing to do with your y-axis as you've plotted it. |
GIven this XML: blah—blah—blah——blah and this XLST: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" I get this result:
which is what I expect: one 'X' for each em-dash. Is that not what you get? On Tue, Dec 15, 2015 at 6:54 PM, Elisa Beshero-Bondar <
|
@djbpitt That's what I'd expect to get, and why I thought my strategy with I am glad that my strategy works in principle, but the practice of deploying it over a collection from within for-each seems to multiply the dashes! I wish I knew why--but do you think it's to do with the collection()? In other words, what if you had a collection of 11 files like this?
The XSLT I tried was something like this (pared down without SVG stuff):
Why do I generate such massive string-lengths with this? I don't think it would be giving me the length of the rdg elements which actually don't contain hundreds of characters...they are quite short--part of a Dickinson line. I think the problem must be with the template match on rdg, so my new solution doesn't involve a new template. |
@djbpitt @nlottig94 @brookestewart @amielnicki See my latest commit of the XSLT file. If you understand how
Hope this helps! |
THE SVG IS FINISHED!!!! However, @amielnicki I can't figure out where to paste the svg in the dash html...So the svg is not in a folder. It is named |
I think Alex told us how he expected it to come in when we were on the phone earlier but I'm sorry I don't recall the details. I think he just said to paste it on the page. What happens when you do that--is it visible? For guidance on positioning SVG on the HTML page, see our JavaScript Exercise 3 and look in the third bullet point under "Some guidance for stepping your way to a solution." |
And really, this should help: https://css-tricks.com/scale-svg/ |
It is live on the site!! http://dickinson16.newtfire.org/dash.html |
It looks awesome @ebeshero !!!!!!! CHECK IT OUT EVERYONE!!! @blawrence719 @brookestewart @ghbondar And thank you for your input @djbpitt ! |
@amielnicki @nlottig94 @blawrence719 @brookestewart Wow! That was speedy work, everyone, and what a fascinating graph! I see Brooke Lawrence's intro, about, and conclusion pages are up now, too, and I like what you've done to flesh out the story of our repurposing from Michele Ierardi's old student site. Here are some questions for the team, since I know you're still working on this for another day, maybe two if you need it:
Really brilliant work so far, everyone! |
@ebeshero I have the dash analysis finished except for the bibliography. I could remove some of the bibliographical info from the paragraph that explains the abbreviations and leave just the full title once the bibliography is finished, and just have viewers reference that for more info. |
@brookestewart Follow the style for citations that I posted in our 19c Brit Lit Annotation Research Assignment: http://newtfire.org/19cBrit/AnnotResearchAssign.html. MLA style makes sense. You may want to add comments to each entry of the bibliography to provide a little information about each work. Read more about these editions here: https://www.emilydickinsonmuseum.org/posthumous_publication @blawrence719 linked to that page on the home page she developed. |
@ebeshero @ghbondar So I'm helping @brookestewart with the SVG. I am trying to find the total dashes (
—
) in each original Dickinson poem. So this is the XPath that I came up with to search for them:count(//rdg[@wit[contains(., '#df16') or contains(., 'var0') or contains(., 'var1') or contains(., 'var2')]][contains(., '—')])
Sorry it's super long! It seemed to me that it would work correctly. I counted the dashes myself in poem 1, and it should be giving me 21; however, it is only giving me 17...any suggestions???
The text was updated successfully, but these errors were encountered: