lmcneil7 / teen-titans

project for digital humanities spring 2020 (a continuation from fall 2019 DH course)
2 stars 0 forks source link

help its 3 am and this isn't working #37

Closed lmcneil7 closed 3 years ago

lmcneil7 commented 4 years ago

As I was working on the markup for episode 2, I came across a situation that I mentioned during one of the meetings: with attribute not containing all the possibilities for the <action> tag. Amber also said it at the meeting today.

My first solution was designing a system and going from there. The order would be Robin, Cyborg, Starfire, Raven, and Beast Boy. From there, we would update the schema whenever necessary with the combination. For example, Robin is traveling with Cyborg, Starfire, and Raven; Beast Boy separated from them. The attributes so far are

"S"|"RB"|"C"|"R"|"BB"|"none"|"all"

To fix the problem, we would just add to it, so the solution to the answer would be:

<action mrkr="Robin" with="CSR" move="2" place="park"/>

for Cyborg, Starfire and Raven and the updated list would be

"S"|"RB"|"C"|"R"|"BB"|"none"|"all"|"CSR"

lm: This is hard to word as I'm aware I didn't explain it well, but I can try to explain it better if given questions to answer. The system I came up with isn't ideal, and I was trying to figure out a way to make it work similarly to XSD: IDREFS, where you could separate it with space.

<spkr ref="Robin Starfire">

is how XSD:IDREFS works, but instead, I wouldn't want to make more ids on the XML document. I want to add spaces to attributes.

<action mrkr="Robin" with="C S R" move="2" place="park"/>

Is this possible to do even if they aren't defined ids??? I have a feeling it isn't but would like some feedback from the instructors to see if they have any insight. At the moment, they have only attributed values. I hope I explained it well enough, but our schema looks like this:

with = attribute with {"S"|"RB"|"C"|"R"|"BB"|"none"|"all"}

Another solution could be to use their ids again as we used for other parts, but I wanted to check with this first to see if there was any other way.

<action mrkr="Robin" with="Cyborg Starfire Raven" move="2" place="park"/>

For instance, is there any way to keep the schema and construct it similar to the datatype to allow multiple values in the XML like <spkr>? This problem is frustrating and not helpful at 3 am. Please let me know if you guys have any suggestions for this problem.

P.S. We are currently battle-testing the with attribute, do you think it's helpful to us for mapping the characters' movements?

frabbitry commented 4 years ago

sorry I just got up but here's a link to an issue where Dr. B talks about a way to make a rule for multiple attribute values, which is kind of what you're talking about, right? Maybe try putting "S"|"RB"|"C"|"R"|"BB"|"none"|"all" in a list like with = attribute with {list {"S"|"RB"|"C"|"R"|"BB"|"none"|"all"}+ } ? But then again I just woke up so maybe that won't help at all.

BMT45 commented 4 years ago

@lmcneil7 @frabbitry Yeah I think that's right but wouldn't you have an asterisk to state that it could either be zero, one, or many depending on what is there? with = attribute with {list {"S"|"RB"|"C"|"R"|"BB"|"none"|"all"}* } This would be a more brittle solution to the issue.

ebeshero commented 4 years ago

@lmcneil7 @BMT45 I think @frabbitry is on the mark here: You just want to make it possible for there to be multiple attribute values from the list that you've defined--follow the link she posted and try it out!

You may want a Schematron rule to make sure they're properly combined if you know that one character can't ever appear with the others, for example.

ebeshero commented 4 years ago

Here is the special list syntax you need in RNG that permits plural attribute value separated by white space (from the issue Fiona posted here): https://github.com/ebeshero/DHClass-Hub/issues/596

precip = attribute precip { list {("rain" | "sleet" | "snow")+}}
lmcneil7 commented 4 years ago

Thank you very much, everyone! I'm glad to find out that there was a solution and fixed the schema accordingly. @amberpeddicord I don't know if you still need it, but the with attribute now offers multiple names!