Subject: Re: chords and lyrics notations via XSL From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Sat, 06 Nov 1999 22:13:45 -0800 |
I'd like to setup a lyrics and chords archive on the Internet and I'd like to use XML as the core representation of the data. The problem I discovered is that I'm not able to imagine any way, how to process following data:
I don't wanna <chord value="Gb"/>talk about things we've <chord value="Db/F"/>gone trough, though it's hurting <chord value="Dbm/Eb"/>me, now it's histo<chord value="Db"/>ry.
it should be rendered as:
Gb Db/F I don't wanna talk about things we've gone trough, Abm/Eb Db though it's hurting me, now it's history.
is there any way how to do this via XSL stylesheets? (I'll make the HTML renderer myself, no prob, but I'd like to support PDF as well...)
<!DOCTYPE song PUBLIC "-//GKH//DTD Chordsheet//EN"> <!-- 1996-12-13 18:50 --> <song c> <title>Joy To The World <subtitle>A Christmas Carol <author>Traditional <start> <notes><note 1> <chords><chord 1><chord 6><chord 1><chord 6><chord 1><chord 8><chord 1> <body> <stanza> <line><chord 1>Joy to the world! The Lord <chord 8>is <chord 1>come: <line><nochord>Let <chord 6>earth re<chord 8>ceive her <chord 1>King; <line><nochord>Let every heart prepare Him room, <line><nochord>And heaven and nature sing, <line><nochord>And <chord 8>heaven and nature sing, <line><nochord>And <chord 1>heaven, <chord 6>and <chord 1>heaven <chord 6>and <chord 1>na<chord 8>ture <chord 1>sing. <stanza> <line><chord 1>Joy to the world! The <chord 8>Saviour <chord 1>reigns; <line><nochord>Let <chord 6>men their <chord 8>songs em<chord 1>ploy, <line><nochord>While fields and floods, rocks, hills and plains, <line><nochord>Repeat the sounding joy, <line><nochord>Re<chord 8>peat the sounding joy, <line><nochord>Re<chord 1>peat, <chord 6>Re<chord 1>peat <chord 6>the <chord 1>soun<chord 8>ding <chord 1>joy.
A markup language for chording songsheets. The chords and notes are relative to the base key.
Handy-dandy reference guide for typical semi-tone numeric values: (use "egrep :$" to extract entire reference guide from this file) (use "egrep :key to extract only a single key guide from this file) : :C :C# :D :D# :E :F :F# :G :G# :A :A# :B :C : \Chord :C :Db :D :Eb :E :F :Gb :G :Ab :A :Bb :B :C : Key\ /Key : C 1 3 5 6 8 10 12 1 :C : 5 flats Db 12 1 3 5 6 8 10 12 :Db : 2 sharps D 12 1 3 5 6 8 10 :D : 3 flats Eb 10 12 1 3 5 6 8 10 :Eb : 4 sharps E 10 12 1 3 5 6 8 :E : 1 flat F 8 10 12 1 3 5 6 8 :F : 1 sharp G 6 8 10 12 1 3 5 6 :G : 4 flats Ab 5 6 8 10 12 1 3 5 :Ab : 3 sharps A 5 6 8 10 12 1 3 :A : 2 flats Bb 3 5 6 8 10 12 1 3 :Bb : C C# D D# E F F# G G# A A# B C : C Db D Eb E F Gb G Ab A Bb B C :
Examples: - the chord Fm7 in the key of C is <chord 6 mod="m7"> - the chord C#dim in the key of E is <chord 10 mod="dim"> - the chord F# in the key of F is <chord 2>
NB: This is not (yet) an implementation of SMDL. This is a simple markup language using terminology coined by someone with very little to no music theory (just a lot of experience strumming guitar chords).
Heritage: This DTD and associated DSSSL Stylesheet was developed for the music programme at Trinity United Church, in Kars, Ontario, CANADA K0A-2E0.
Status: This markup language specification is in the public domain, and the associated DSSSL stylesheet is in the shareware domain. -->
<!ELEMENT song - O ( title, subtitle?, author*, start?, body ) --Song-- >
<!ENTITY % st -- Semi-tone -- "st ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ) #REQUIRED -- Semi-tone -- -- The note within the key: -- -- 1 == tonic -- -- 3 == super-tonic -- -- 5 == mediant -- -- 6 == subdominant -- -- 8 == dominant -- -- 10 == submediant -- -- 12 == leading tone --" >
<!ENTITY % key -- Key -- "key ( C, G, D, A, E, F, Bb, Eb, Ab, Db ) #IMPLIED -- Key -- -- One key the song is known to have been played in. -- -- C == no flats or sharps -- -- G == one sharp -- -- D == two sharps -- -- A == three sharps -- -- E == four sharps -- -- F == one flat -- -- Bb == two flats -- -- Eb == three flats -- -- Ab == four flats -- -- Db == five flats --" >
<!ENTITY % mod -- Modifier -- "mod CDATA #IMPLIED -- Modifier -- -- Added to change the chord from a major chord --" >
<!ATTLIST song -- Attributes of a Song -- %key; >
<!ELEMENT title - O ( #PCDATA ) --Song Title-- >
<!ELEMENT subtitle - O ( #PCDATA ) --Song Subtitle-- >
<!ELEMENT author - O ( #PCDATA ) --Song Author-- >
<!ELEMENT start - O ( notes | chords )+ --Startup Information-- >
<!ELEMENT notes - O ( note+ ) --Collection of Notes-- >
<!ELEMENT note - O EMPTY --A single note-- >
<!ATTLIST note -- Attributes of a Note -- %st; >
<!ELEMENT chords - O ( chord+ ) --Collection of Chords-- >
<!ELEMENT body - O ( stanza | chorus )+ -- Song Body -- >
<!ELEMENT chorus - O ( stanza+ ) -- Chorus -- -- A repeating set of stanzas -- >
<!ELEMENT stanza - O ( chord*, line+, chord* ) -- Stanza -- -- A collection of lines -- >
<!ELEMENT line - O ( nochord | chord )+ -- Song Line -- -- A line of text -- >
<!ELEMENT nochord O O ( #PCDATA ) -- Non-chorded text -- -- Text in a line without a chord -- >
<!ELEMENT chord - O ( #PCDATA ) --A chorded portion of text-- --Text in a line with a chord-- >
<!ATTLIST chord -- Attributes of a Chord -- %st; %mod; >
-- G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995) Web site: XSL/XML/DSSSL/SGML services, training, libraries, products. Practical Transformation Using XSLT and XPath ISBN 1-894049-02-0 Next instructor-led training: 1999-11-08, 1999-11-09, 1999-12-05/06, - 1999-12-07, 2000-02-27/28, 2000-05-11/12, 2000-05-15
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: chords and lyrics notations via, Lee Anne Phillips | Thread | Re: chords and lyrics notations via, John E. Simpson |
RE: vendor neutral XSL extension na, Richard Reich | Date | Re: vendor neutral XSL extension na, David Carlisle |
Month |