OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Re:[xml-dev] [ANN] XML Limerick Competition

[ Lists Home | Date Index | Thread Index ]

At 03:13 PM 1/11/2002 -0500, Mike Champion wrote:
>Kick me out of the fraternity if you want, but I can
>imagine doing this input, validation, display job
>MUCH easier with procedural code than XML ....Can
>somebody restore my faith (which I almost had, for a
>minute there) in strongly typed XML and declarative

The following covers at least the syllabification:

<?xml version="1.0" encoding="UTF-8"?>
<!ENTITY % normal.foot "(%iamb; | %anapest; |  %tertius.paeon; )">
<!ENTITY % last.foot "(%iamb; | %anapest; | %tertius.paeon; )">

<!ENTITY % iamb "( da, dum )">
<!ENTITY % anapest "( da, da, dum )">
<!ENTITY % tertius.paeon "( da, da, dum, da )">

<!ELEMENT limerick (long, long, short, short, long)>
<!ELEMENT long ( %normal.foot;, %normal.foot;, %last.foot; )>
<!ELEMENT short ( %normal.foot;, %last.foot; )>

Here is an XML instance that validates against the DTD:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE limerick SYSTEM "c:/temp/limerick.dtd">

Some work remains to be done here. First, I have not represented word 
boundaries or punctuation here. This brings up the topic of multiple 
concurrent hierarchies, which could be addressed in a number of ways, 
including TEI milestones or stand-off markup.

Once the words are represented, we have to determine whether stress is 
accurately represented. This requires access to a dictionary of the 
language that represents stress and syllabification. GIven this, a schema 
adjunct could be written, using a vocabulary designed to determine if the 
marked-up stress is accurate. Similarly, another vocabulary could be 
designed to represent the desired rhyme scheme, and this could leverage a 
rhyming dictionary. Both of these dictionaries should be represented as 
XML, of course.

A stylesheet can be written to provide a standard representation of this.

Shall we start this project on Sourceforge?



News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS