Pomilui / Akira_Page

This page is for the Coding and Data Visualation project on the Akira anime.
The Unlicense
4 stars 0 forks source link

Control Scenes: New ODD Rules, Superpower Markup, HTML Reading View and SVG #15

Closed ebeshero closed 5 years ago

ebeshero commented 6 years ago

@Pomilui We were talking about how to highlight the scenes as marked by self-closing <milestone type="powers"> elements. The issue for running XSLT is that when you template match on <milestone/> it doesn't wrap anything, so you can't just hit <xsl:apply-templates> and see the subsequent script. SO, here's a solution, using <xsl:for-each-group>, which I've been using in the Pittsburgh Frankenstein Project for a slightly different purpose. I'm copying my template rule in here so you can see the syntax:

<xsl:template match="/">
       <xsl:for-each-group select="//milestone[@type='collate']/following-sibling::*" group-starting-with="milestone[@type='start'] group-ending-with="milestone[@type='end']">
           <div><!--ebb: this would be the HTML element to wrap around the script in the scene-->
               <xsl:apply-templates select="current-group()"/>
           </div>
   </xsl:for-each-group>
    </xsl:template>

but NOTE: we MAY need to modify this--take a look at Michael Kay or this page: https://www.xml.com/pub/a/2003/11/05/tr.html

Pomilui commented 6 years ago

@MarkTheShark01 @quantum-satire @ebeshero

To Do:

ebeshero commented 6 years ago

@Pomilui I've added the Schematron constraints we discussed to the Akira ODD with this commit: https://github.com/Pomilui/Akira_Page/commit/488c1108c4960d0e432d25fcedea11cfc35b3309

Pull it in and try it out on your Akira TEI script file. 1) You now must have a <note> element after every <milestone> element, and 2) Your <spGrp> must have an @type and an @subtype, and when that @subtype="super", your @who is only allowed to contain characters you've identified as having superpowers. Is it working the way you want?

Pomilui commented 6 years ago

@ebeshero Yep. Here are some good examples.

"Human" Control Scene

<spGrp type="controlScene" subtype="human" who="#colonel #doctor"> <sp who="#doctor" n="202" from="00:22:42.293" to="00:22:45.170" > <p>It may be rough on the boy...</p> </sp>

<sp who="#doctor" n="203" from="00:22:45.296" to="00:22:48.756" > <p>but I thought we might try starting him off with level 7 capsules.</p> </sp>

<sp who="#colonel" n="204" from="00:22:48.883" to="00:22:50.341" > <p>Is it safe, doctor?</p>

Note after milestone:

<milestone type="powers" who="#takashi"/><note>The army soldiers fire multiple rounds into the revolutionist, and, upon seeing the excessive blood, which Takashi and the other Espers fear, yells at the top of his lungs. His telekinetic powers are activated accidentally which causes the glass windows in the area to shatter and causes a rooftop structure to crash to the street.</note>

Update: I'm trying to add #nezu to the schematron rule for spGrp. Here's what I added to the ODD.

<sch:assert test="@who = ('#kaneda','#yamagata', '#doctor', '#colonel', '#colonel #doctor', '#tetsuo #kaneda', '#kiyoko #tetsuo #masaru #takashi', '#nezu #ryu')">

I'm seeing "#nezu" pop up when I add the who attribute, but I'm still getting an error. Is there more to the schematron settings for spGrp. Mr. Nezu has a couple of human control scenes. Thanks.

Pomilui commented 6 years ago

@ebeshero I submitted the new Power Graph on Courseweb. I'll touch it up before it's put on the website.