On 7 Jun 2004, at 08:53, Paulo Eleutério Tibúrcio wrote:

Em Qua 02 Jun 2004 14:26, Phil Taylor escreveu:
Interesting.  If you look at the html source for the first tune in
that file it looks like this:

<p class=MsoNormal style='margin-right:.5in;tab-stops:.6in 1.1in
1.6in 2.1in 2.6in 3.1in 3.6in 4.1in 4.6in 5.1in 5.6in'><span
lang=EN-GB style='mso-ansi-language:EN-GB'>X<span
class=GramE>:1</span><o:p></o:p></span></p>

[snip]

It's a long way from abc. I suspect it's actually microsoftml, and probably written in MS Word.

Surely is, with all that redundance in the 'mso' style tags. You see, this garbage is intended to solve MS Office's problems of interoperability, not to produce anything convenient or suitable for the Web. (In fact, if you check the source code for the page, you can see a META element saying it was generated by "Microsoft Word 10".)

The right way to HTMLize it would be something like

<pre class="music abcnotation"
     title="ABC notation of A. A. Cameron's Strathspey in A Mix">
<code>
X:1
T:A. A. Cameron's
M:4/4
L:1/8
R:Strathspey
K:A Mix
|:eA3 A4 B3Gd3B|eA3 A4 d3g (3f2e2d2|eA3 A4 B3Gd3B|
% And so on ...
</code>
</pre>

I tried this with four different browsers, and it worked fine in all of them.


(Of course, you'd have to substitute &amp; &lt; and &gt; for any & < and > characters respectively in the source. Defining presentation of the ABC segment would be simply a matter of defining a style for a CODE element which is a child of a PRE element with classes 'music' and 'abcnotation' set. It would also be straightforward to parse.)

Probably better to eliminate the < and > characters entirely (they're only shortcuts after all).

Maybe the standard should state (or at least recommend) how ABC source code should be embedded in HTML/XML.

Using <pre)...</pre> has been suggested before. I don't think John likes it because the tune finder bot will still have to parse .html files as well as .abc. And, of course there's the problem of getting people to use it.

Phil Taylor

To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html

Reply via email to