Closed helvitiis closed 6 years ago
@quantum-satire Hey. We started the schema, but we have a simple syntax error. Could you please check it out when you get a chance? Thanks.
@Pomilui Taking a look now...
@Pomilui @MarkTheShark01
I found it! You had:
controlScene = element controlScene
plot = element plot {setting, analysis, background}
I changed this to:
controlScene = element controlScene {text}
plot = element plot {setting, analysis, background}
I'll push the fixed schema to the repo, I'm making a few other small changes and I'll explain them in comments in the file :-)
@Pomilui @MarkTheShark01 Here it is: https://github.com/Pomilui/Akira_Page/blob/master/textFiles/schema.rnc
Let me know if this helps!
@quantum-satire @MarkTheShark01
Happy Sunday. Here's what I got for adding Character tags in Regex to the script.
\n[a-z|A-Z|-]
finds the upper and lowercase "Speech" sections. Replacing them with \n<CHARACTERNAME>\n\n\n(whatever letter was found)
adds some begging character tags. I could then search for all the punctuation marks that end a "speech" and add the end tags if necessary.
All the extra new lines just give us some visual space, and can be undone later. Should I just use self-closing character tags so that I don't have to do all 5000 lines again?
@Pomilui I think I'm a little confused by what you mean here. Are you trying to wrap all of the character names in tags or the speeches in tags?
@quantum-satire @MarkTheShark01
Hola. I didn't get around to making a useful XQuery/HTML table for XQUERY Assignment 3, but I hope that we can either do a simple "Control Table" or "Character Table" tomorrow after class or when Mark and I meet tomorrow evening. I'm definitely ready to start chugging away at this.
@quantum-satire Welp, Mark and I are working on making an HTML table in XQUERY. Should we just make a simple FLOWR to make a table of the total # of sp tags and the total #of time tags?
Also, should we start marking the script with elements from our schema?
PS. Does this code look right for the Character Ref Sheet?
`
<person>`
and using the #
tage to reference it in the script file like this?
<sp who="#ref: Kaneda">
@Pomilui and @MarkTheShark01 : Here's something you can find out with a FLWOR, even if you don't have the speakers coded into the speeches yet. Try the string-length()
XPath function on the speeches, and see if you can find out the longest speeches and at what times those occur in the plot. string-length()
returns a number of characters. Look up string-length()
in the Michael Kay book or in the XPath Functions We Use Most page. You might find some other fun functions to play with, but string-length() seems potentially interesting! (Which are the longest speeches in Akira?) You can later on use string-length() to find the characters who give the longest speeches...
This is a rough approximation of something like an XQuery to generate string-length()
{
let $speeches := $akiraColl//sp (: I'm not sure how you coded this...:)
for $i in $speeches (: takes each speech one at a time :)
let $string-length := $i/string-length()
let $time := $akiraColl//sp[. = $i]/XPath-to-your-timeStamp
order by $string-length descending (: This organizes them from longest to shortest :)
where $string-length gt [some number??] (:You can shorten your table by giving it a cut-off point--no one cares about the one or two word speeches, usually...:)
return
<tr>
<td>{$timeStamp}</td>
<td> {$string-length}</td>
</tr>
}
@ebeshero @quantum-satire @MarkTheShark01
Hey, all. I'm about 1/10 of the way through adding characters to the script. Please let me know if I'm doing character ref sheet right. Seeing Ally's (sp) War of Currents ref sheet and her xml file made me want to use sp
in the ref sheet. I'm also unsure if adding the #
in the quotes is correct. Thanks.
@Pomilui I noticed one thing:
<person xml:id="News Lady">
<persName>News Lady</persName>
<persName>
<surname></surname>
<middlename></middlename>
<forename>News Lady</forename>
</persName>
</person>
Your xml:id
should have no whitespaces and be something simple that you can use multiple times in the scripts when you used the xml:id
to reference back to them (which you then use a hashtag for). This would be a better way to use the character sheet:
<person xml:id="nlady">
<persName>News Lady</persName>
<persName>
<forename>News Lady</forename>
</persName>
</person>
You don't need to know the exact name of the character for the xml:id
. If you wanted you could use "4309830" as a valid xml:id
. It won't matter, because when you call that id as a value in the script with the hashtag, it will bring the processor right back to the id sheet with all of the character's bio and information on it.
@Pomilui I'm also adding some comments on the commit 81face999a6ea593f7b5424c2a13afb82613b08c for you! Hopefully you find them helpful, I know this is a lot of work and it sucks to have anything "picked apart." It's looking great! Did @MarkTheShark01 finish those bios for the main characters? I'll look on the TEI site to see how to add them into the character sheet.
@quantum-satire Yep. Mark uploaded the character bios in the summaries folder. Thanks for the advice. P.S. Fixing some parts now.
Copying the midterm exam guidelines for your convenience here! You can check off the steps once you complete them :-)
[x] Schema Design: Design clear and well-documented schemas in Relax NG to guide and manage the team's markup for your project.
[x] XML Markup: Complete a substantial amount of XML coding (this to be determined within your project teams, but prepare a solid foundation.) Check and correct this code with help from your project schema.
[ ] You should feature some use of regular expressions (whether in up-conversion to XML, or in some kind of regular pattern matching) in your midterm project work.
[x] Website Development: Produce some new substantial pages on your team's website, indicating what you are accomplishing and what you aim to produce by the end of the semester. If you can, you may provide some data drawn from XQuery on your project.