ebeshero / dhclass-hub Goto Github PK
View Code? Open in Web Editor NEWa repository to help introduce and orient students to the GitHub collaboration environment, and to support DH classes.
License: GNU Affero General Public License v3.0
a repository to help introduce and orient students to the GitHub collaboration environment, and to support DH classes.
License: GNU Affero General Public License v3.0
Hey, so it seems that every time I use this function, my entire xml editor crashes and I have to fight it a bunch to get it working again? If anyone has an idea, let me know...
We have a separate template rule that matches the <listOrg> elements (holding the lists of organizations), so it will be invoked as a result of the preceding <xsl:apply-templates> instruction, and will fire once for each <listOrg> element in our Site Index
--Could somebody explain what this means? I understand that it is matching the elements (I think) but I what does the rest of it mean?
\n[A-Z]{2}.+?: --- getting 174 results
@ebeshero I am trying to find all of the Roman numerals in the Sonnets. However, when I use [IXCLV]+ to find all of the Roman numerals, oXygen also highlights all of the lines that start with or have the letters I, X, C, L, and V in them, such as the lines that start with 'If' or 'Look'. I was wondering if you could help me out here! Thanks a million!
Hey @ebeshero and @ghbondar and @RJP43 , I happened to notice that I scheduled my advising appointment at 11AM tomorrow morning and it seems I can't simply reschedule. So I won't be able to make it to class, at least not until after my meeting. I really would like to catch up and hear what I missed for class, which means, could I meet with one or more of you at some point between 11:20 and 12:30 OR 2:30 and 3:30?
I had trouble with the first XPath homework whenever it asked to find things in only one of the books, and I am having the same issue with the second homework assignment. I'm not sure how to isolate things found only in book 1.
Here is what I'm currently trying: //div[type="book"][1]
I was looking at the class example versus our homework instructions, and I noticed that the class example held much information in elements, but our homework information was in the attributes; how are we supposed to pick out the information from there? And also, I don't understand this (which I think has to do with my question): In this case, then, your <xsl:apply-template> elements inside the template rule for the document node will tell the system that you want to process the <string> elements of the <f name="question"> and all of the corresponding responses (<f name="response">) and the corresponding <string> insides of the <f name="note"> element all sitting inside of the same <fs> element. In order to specify that you only want specific Yes or No Questions then the <xsl:apply-template> elements inside the template rule for the document node will tell the system that you want to process the following elements only when one of the <f name="response"> has an @select="Yes", at which point the template rule for the document node will call out what portions of the document need to be processed at this particular point. That work actually gets done by other <xsl:template> rules, the ones that you’ve written that match the <f name="response"> with @select="Yes".
@ebeshero
In the assignment we state "Because this document is not in a namespace, you should not add the @xpath-default-namespace attribute, and we do not need to alter <oXygen>
's default XSLT stylesheet template at all this time." To be more clear you actually do have to alter the template slightly by adding the output line so that you get html. I guess that was just something we implied in class when we are making a transformation into an html versus just an identity transformation into xml.
In other words copy and paste what is below into the top of your stylesheet:
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:math="http://www.w3.org/2005/xpath-functions/math" exclude-result-prefixes="xs math" xmlns="http://www.w3.org/1999/xhtml" version="3.0"> <xsl:output method="xhtml" indent="yes" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
@amielnicki @spadafour @blawrence719 @CodyKarch @rCarls @nlottig94 @brookestewart @KariWomack
I've just made some repairs to the stylesheet we ran in Friday's class, added some comments to the file, and pushed it here to Class Examples on GitHub: https://github.com/ebeshero/DHClass-Hub/blob/master/Class-Examples/XSLT/ForsterChPlaceList-Model.xsl
Sync your GitHub and find the ForsterGeorgComplete.xml file in the Class Examples --> XSLT folder together with this XSLT file. You may wish to open them in oXygen, run the transformation, and to study the output. You may want to tinker with the template rules a bit as you're learning about how XSLT works.
I have also updated our "Explain XSLT" Tutorial with a few repairs so that our output isn't munged HTML! Remember: Always, always save your output and reopen it in oXygen to make sure it is valid and well-formed, because the XSLT results window in oXygen won't tell you this on its own.
@amielnicki @CodyKarch @ghbondar @RJP43 @KariWomack @nlottig94 @blawrence719 @brookestewart @spadafour @rCarls
@EBB8 The files are up. I would've had them up a few hours ago but I have this unfortunate habit of falling asleep right when I get home from school. Hope it's all up to snuff.
peace
<3
If this is an aid to anybody, here you go: https://en.wikibooks.org/wiki/XPath/Basic_Syntax
I found a source with the most basic information of XPath. I wish it had more on the topic though.
good times
I'm trying to tag the title of the chapters in the Voyage narrative. I have \</l\>(\n^.*\n^.*)
that selects the chapter name after the CHAP. which is tagged with <l></l>
but when I try to replace the \</l\>(\n^.*\n^.*)
with <l>\1</l>
it says that it's a malformed expression and won't replace it.
I need some clarification on part of the assignment... I have the entire thing done except for number 2:
b) Can you figure out how to retrieve the immediate parent element containing the word "homework"? (Hint: it involves looking for any element below the div and then its text() node, since we need the element whose text contains the word "homework.")
What exactly are you looking for in part A? The names of the @type associated with each div? I think if that question gets answered, it will clear up part B too.
Stuff never works right. Seriously!
I'm not sure what we're trying to find/select. For example, in the question "What XPath would find ONLY the chapters in the file?" are we trying to select the whole chapters or only the chapter headings?
First, read our Course Project Guidelines, and think about research questions that you might investigate with XML, based on the four Pitt-Greensburg-based projects we've been discussing this week. Post a proposal for what a small group of you might work together to produce this semester, based on the following projects, and referring to [our previous brainstorming discussion]: (#12)
By Saturday September 19, by 11:59 PM at the latest, each of you post a proposal for a proof-of-concept project that you would like to work on with a small team. Address both of the following:
On Sunday Sept. 20, by 11:59 PM at the latest, review the posted proposals and respond to at least one other student's proposal to indicate what looks especially interesting, offer suggestions and feedback, and/or suggest a connection with your own proposal. Since we ask each of you to make proposals but we're pulling you together into teams, your responses to each other are going to help us put teams together in class on Monday Sept. 21.
@amielnicki
@RJP43
@ghbondar
@KariWomack
@blawrence719
@brookestewart
@nlottig94
@CodyKarch
@rmz14
@rCarls
@spadafour
Hey, I was trying to use this
<xsl:template match="//head/l" <lb> <xsl:apply-templates/> </lb> </xsl:template>
to form a self closing tag in place of a line tag, but it keeps giving me an error; any ideas?
So, if you could use regular expression matching outside of <oXygen/>
, where can you imagine using it? We actually can use regular expressions in lots of everyday applications, and perhaps you've used a version of regular expressions before. This is an Issues post designed to collect your ideas and see where we might apply this powerful technology elsewhere!
http://dh.obdurodon.org/regex-assignment-01.xhtml (Assignment 1)
http://dh.obdurodon.org/regex-assignment-02-answers.xhtml (Assignment 2)
If you just want to look at the Obdurodon Site for examples and tutorials go to http://dh.obdurodon.org/
Hey, I'm trying to use this: //body//name(attribute::*)
but it won't work. Help?
@nlottig94 Ok I see you pushed a file into the troubleshoot folder . You mentioned that you were getting errors. Let's walk through what you have and what you don't. First it looks like you are good with setting up your columns by writing all the necessary <th>
elements inside of a single <tr>
all inside of your first <xsl:template match="/">
and you have all this sitting at the beginning of your document inside of the <html>
tags because this is all stuff you want to happen once. Then you continue with making your first selection: <xsl:apply-templates select="//div[@type='table']"/>
consider what all this is getting you and what the assignment is asking. You want to make sure you are "selecting the nodes you want to process to build the table" and that the nodes you select are the ones that are binding the specific responses to the corresponding questions:
all of the <what?>
that contain Questions with a possible response of Yes/No.
tell me what you have and how you might fix it to correspond with what I have hinted to here.
let's walk thru each part of your file so far step by step.
Started the next assignment but know there are some errors. Please let me know if there are any suggestions. There is an rnc and xml document named as "Zabelsky" in the troubleshooting folder. I think I posted this stuff correctly now.
Thanks, Ryan
So I have decided to create a travel timeline of my semester abroad, which includes pictures. However, when I view my XHTML in my browser, some of my pictures are really huge!! Will this change after I transfer it to my page in newtfire?? Or is there some way I can set size limits to my pictures??
(Reposted for @rmz14 ) I attempted to add a file but it says the file type is not supported when I try to add a document or rnc attachment. The code is below but there is some issues with it especially with combining attributes which I don't quite understand. Your help is appreciated...
start = article
article = element article {title, authors+, series, published, p+}
title = element title {text}
authors = element authors {person, text}
person = attribute person {text}
series = element series {completion, text}
completion = attribute completion {text}
p = element p {sentence, text, published}
sentence = attribute sentence {text, published}
published = element published {today, text, time, posted, text}
today = attribute today {text}
time = element time {posted, text}
posted= attribute posted {text}
p = element p {sentence, text, area}
sentence = attribute sentence {text, area}
area= element area {listed, text}
I'm lost at how we are supposed to get our xhtml and css onto the supercomputing space.
I've got everything solved except for counting the questions; how do I do it? It mentions an preceding::sibling in the instructions, but I'm not sure how to work it in. This is what I've got:
<xsl:value-of select="count(fs[f[@select='Yes']]) + 1"/>
Any tips?
Read Gabrielle Kirilloff, “<Traversing_the_Tree/>”, the short article, “Frankenstein novel analyzed” and scroll through Wendell Piez's conference talk and images for the Balisage Markup Conference 2014. If you like, you can take a close look at his LMNL code of Frankenstein on GitHub.
Special note of interest: Gabi Kirilloff was a student in a digital humanities course at Pitt like the one you are taking, and she originally wrote <Traversing_the_Tree/> for a seminar paper assignment in another class.
The discussion is worth points to you as a homework exercise. For full credit, your posts should make specific reference to passages in Kirilloff's essay, and reflect on those passages. Note: You (as an individual) do not have to respond to every one of the discussion prompts, but the class as a whole should cover them all. A good strategy would be to try to respond in some way to at least two of the prompts in the list above. Raising questions is encouraged, and so is responding to each other, but responding should do more than simply say, "yes, I agree." A good response will add something new to the conversation, or help promote more discussion. You should make at least two substantial posts to fully contribute to the discussion.
As you're drafting your comments, see if you can apply "Markdown" formatting if you'd like to use bold or italics or make a list, form a link, add an image, etc. Follow the link to "Markdown supported" at the top right of the comment "Write" screen for an orientation to Github's markdown.
http://www.pitt.edu/~upgstd/2015Convention/index_conventionPrep.xhtml
go ahead and try to comment on this issue :)
Hey, I am trying to tag the square brackets, but everything I have tried doesn't work. Any hints or suggestions?
I don't understand how to do 5b on the homework. I honestly don't even know where to start and the hints on the assignment aren't helping. So far all I have is my output of all of the dates as: //date/@when/format-date(xs:date(.), '[FNn] [MNn] [D] [Y]')
We plan to use this area of our DHClass-Hub for two kinds of activities:
The first activity is something GitHub's Issues are especially adapted for: raising specific questions about problems you're having with code. You can paste lines of code here, but you want to familiarize yourself with the special "markdown" associated with this space. Read GitHub's guide to its special markdown to familiarize yourself with how it works. If you post code in angle brackets, it won't render, and you need to use special tagging here to make sure your code comes out as code so we can read it. We'd also like you to push files you're having trouble with to the "Troubleshooting" directory, where we can do line-commenting on it to help pinpoint problem spots. We'll show you how this works with some examples over in that directory.
In this space we "open" issues when we make the first post on something, and when we do that, we try to find or set an appropriate Milestone marker and label (see to the right of this window). Labels are general: when it's a call for help, you use "help wanted," when it's an explanation of something (as I'm doing here), that will help make people's lives better if they understand things more clearly, we'll use "enhancement." For setting milestones, I'll create several of these, but you can create them, too. It will help us search and filter these later if we all use the same one for a particular kind of code, so if you're posting a question about Regular Expressions, please use the "Regex" milestone I'll have already created. (Look through the available milestones first, and if you don't see one that fits your question, make up a new one.)
Happy posting!
Closing Class Find:
^[A-Z.\- ]{2,}[A-Z]{2,}\s*\.*.+?\n\n
I have my books, and chapters marked, but I'm not sure how to pick up the beginning of paragraphs without the Chap. of chapter or the BOOK of book (AND include the square brackets with dates). Anybody?
Hey, does anybody remember how we are to assign specific names to each div element so that the CSS can modify each individual one? I think it had something to do with div#top
, I only remember there is something with a hashtag.
Hey, so I was trying to place the text from the head elements into an HTML with <h>
elements, but wasn't sure how I grab that. And what should I do about the multiple headlines? I can place them into one stylesheet rule that places them each under an <h4>
,right?
There's an undergraduate Digital Humanities conference, sponsored by a group of students, to be hosted at Davidson College in North Carolina, November 6-8. Read about it here: http://unrh.org/ The organizers are trying to make it as affordable as possible for students to participate: there's no fee for housing, food, or registration. We'd just need to find a way to cover travel to Davidson College, and we think we can pull together some campus and university resources to try to go!
Are any of you potentially interested in going and presenting from our projects? We're asking about an extension on the deadline for this, since we're generating project proposals this weekend, and the proposals to the conference are due on Sunday 9/20. If they're willing to give us a couple of days extension, we can probably submit something based on your write-ups this weekend, and based on a show of interest here.
If you are interested in being part of a presentation team from Pitt-Greensburg, please indicate your interest by responding here!
Here is my example issue with this GitHub repository.
I'm attempting to specify a count of the books from the homework. In order to specify the correct count, I need to reference the last instance of div type="book" . I don't know what symbols to wrap my type in within a count within an xslt... Okay, that's too many Russian dolls. This is what I'm talking about:
<xsl:template match="div[@type='book']">
<div type="book" number="{count()preceding-sibling::div[@type=book] + 1}">
What I can't seem to get to work is the preceding sibling: how do I specify the @type
? Single quotes and double quotes don't seem to work.
I pushed two files to Troubleshooting (https://github.com/ebeshero/DHClass-Hub/tree/master/Troubleshooting). I have an error in my schema and cannot figure out how to fix it! If anyone could figure it out, I would really appreciate it! Thanks!
Choose one of the following Greensburg project sites under development. Your first post should describe (in your own words) at least one significant topic it seems to be exploring, and reflect on what we might want to try next to improve the "UX," and/or develop the research areas of the project. Then let's develop this into a conversation--everyone should post at least twice here and discuss with each other some directions we might take together with one or more of these ongoing projects this semester:
How do I stop the xsl from grabbing the elements within the elements. Also, if someone could remind me how to attach what I have so far to GitHub so you can see what Im doing, that would be great. Havent had to push files in a while, don't remember how.
I'm attempting to do the second xslt assignment, but I'm not getting anything in my output window except for my h1. I tried to follow along from the in class example as closely as I could while sticking to the assignment of which lists were ordered or unordered, so I'm not exactly sure where I went wrong. I pushed my file into the troubleshooting folder. I was able to understand what was going on in class, but I am completely lost on my own. I'm unsure when I'm supposed to be matching things and what exactly I should be matching and I don't understand how to make them output into a list.
I am currently on the Fall Arts Trip in Boston, posting from my hotel room, and obviously will be missing class tomorrow. Is it possible for someone to fill me in on any important notes I miss during class? If not I'll just figure it out, but if you could, it would be really helpful. Thanks!!!
Having sooooo much trouble with returning parent elements in XPath. I keep coming up with errors and I don't know how to even begin to find where I'm going wrong. I've checked the readings and examples, but they are not helping. HHHHHHHHEEEEEEEEEEEEEELLLLLLLLLLPPPPPPPPPPPPPPP MMMMMMMMMMMMEEEEEEEEEEEEEEEEEEE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.