<!-- This is sample use of ComicsML, applied to a handful of comics I have available on my website. It's intentionally sloppy, just to show off different ways it could be used. --> <!-- Let's start out by declaring the doctype, and then defining some entities that point to some (notional) files on my system, each of which holds a fully fleshed-out <strip> element defining another episode of this comic. --> <!DOCTYPE comic SYSTEM "./comics_ml.dtd" [<!ENTITY d1 SYSTEM "d1.xml"> <!ENTITY d2 SYSTEM "d2.xml"> <!ENTITY d3 SYSTEM "d3.xml"> <!ENTITY d4 SYSTEM "d4.xml"> <!ENTITY d5 SYSTEM "d5.xml"> ]> <!-- Now I'll make my base <comic> element, and fill in all my metadata. --> <comic> <title>Disbroken</title> <person> <firstname>Jason</firstname> <surname>McIntosh</surname> <email>jmac@jmac.org</email> <url>http://www.jmac.org</url> </person> <last-built>2000-01-30</last-built> <description>Zen-pop funny animal psychobabble from Jason McIntosh</description> <url>http://disbroken.jmac.org</url> <!-- I'm ready to start defining strips now! Were I to stick to my original strategy, I'd merely invoke all the elements I defined earlier, since all those strip elements live in other files. However, for the sake of clarity, I'll just define a couple of strips right here. --> <!-- First, I'll pull out all the stops and define this strip in excruciating detail. (I certainly don't have to if I don't want to, and I'll have an example of another strategy after this one.) --> <strip id="disbroken-10"> <date>2000-01-01</date> <title>Creation Myths</title> <panels> <panel> <url>http://www.jmac.org/xml/dcs-xml/panel1.gif</url> <panel-desc> <action>Martha, holding a knife and a fork, peers at an empty plate.</action> <narration>Father Fork and Mother Knife looked down upon the Plate of the World, and saw that it was empty.</narration> </panel-desc> </panel> <panel> <url>http://www.jmac.org/xml/dcs-xml/panel2.gif</url> <panel-desc> <action>Martha, smiling serenely, places a slice of bread upon the plate.</action> <narration>And so it came to pass that Father Fork said, "Let us put Bread upon the Plate, and give it Form. And so they did, and they smiled.</narration> <narration>But, ah! The Bread lay still on the Plate, itself empty, without Purpose. So Mother Knife said, "Let us call upon our Sister, Jar-of-Mayonaise and--</narration> </panel-desc> </panel> <panel> <url>http://www.jmac.org/xml/dcs-xml/panel3.gif</url> <panel-desc> <action>Burt interrupts Martha, brandishing a sandwich at her. Martha looks confused.</action> <speech> <character>Burt</character> <text><strong>Pagh!</strong>Again, I have completed construction of my chicken sandwich in half the time as you. Your "Kitchen Creation Myths" remain unconstructive drivel!</text> </speech> </panel-desc> </panel> <panel> <url>http://www.jmac.org/xml/dcs-xml/panel4.gif</url> <panel-desc> <action>Martha, a wild look in her eye, suddenly ripostes with her mayonaise-covered butterknife, disarming Burt, who drops his sandwich.</action> <speech> <character>Martha</character> <text><strong>Oh?</strong>And what do you tell<emphasis>your</emphasis> lunch, when it asks?</text> </speech> <speech> <character>Burt</character> <text><soft>Um...</soft></text> </speech> <speech> <character>Martha</character> <text><soft>I thought so.</soft></text> </speech> </panel-desc> </panel> </panels> </strip> <!-- Now I'll mark up the same strip again, but now just use only enough information for a syndication or an index page - note the use of a teaser, giving away only the first panel, and forcing interested viewers to come to my page to see the rest of it. --> <strip id="disbroken-10-2"> <date>2000-01-01</date> <title>Creation Myths</title> <url>http://disbroken.jmac.org/archive/?stripno=10</url> <teaser> <description>Burt scoffs at Martha's kitchen cosmology.</description> <panels> <panel><url>http://www.jmac.org/xml/dcs-xml/panel1.gif</url></panel> <!-- Actually, I just might want to use a <panel-desc> element here for accessibility reasons, but I'll skip it for now. --> </panels> </teaser> </strip> <!-- Without the panel descriptions, of course, the information loses its value for just about every other purpose. However, perhaps I want to keep two separate versions like these lying around. I could, for example make the latter version available for wide distribution, and keep the former, longer one local to me, and use it for my own archival purposes, or to enhance the comics on my own website. This arrangement might work well if, for example, I wanted to hit people reading my comics with micropayments, so I didn't want to give away all my content for free, but I did want to use ComicsML both to let people know when my comic gets updated, and use it to organize all my actual content. --> <!-- Cool, huh? ;) --> </comic>