[Oberon] XML Parser-API for OBERON

Dieter d.gloetzel at web.de
Mon Jan 18 10:44:54 CET 2016


Doug,

you are right. I should express myself more clearly.

My overall theme is typesetting musical notes. There exists a 
description language called "MusicXML" developed by RECORDARE Inc., 
which can be exported from several musical typesetting systems.
And there is a TeX based musical typesetting system called "MusiXTeX" 
with a preprocessor called "PMX".

I want to convert MusicXML as input to PMX. I have solved my problem 
already by brute force Oberon programming, but I wonder whether there is 
a more elegant way to do it.
My program is pretty long,  and several times I hit the compiler limit 
of 64K for module size already. Also the modular layout may be less then 
optimal.

I am looking for something like a  database which makes accessible the 
contents of the MusicXML file.

I.e. answering questions like "What is the pitch and duration of the 
25th note in measure 10 of instrument 7?"

I attach an example.

It would be great, if somebody could share his experience in XML 
programming with Oberon.

Regards,
Dieter

P.S.: I am using ETHOberon 2.5 plugin for Windows.


Am 18.01.2016 um 00:28 schrieb Dougls G. Danforth:
> Dieter,
> Your question is ambiguous.
> Do you mean a parser of Oberon written in XML?
> If so what is the output of the parser?
> Or do you mean a parser of Oberon that generates XML?
>
> -Doug Danforth
>
> On 1/17/2016 7:57 AM, Dieter wrote:
>> I wonder wether anybody on this mailing list knows about the 
>> existence of an XML Parser API for Oberon.
>>
>> Thanks and regards,
>> Dieter Glötzel
>>
>> -- 
>> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
>> https://lists.inf.ethz.ch/mailman/listinfo/oberon
>>
>
> -- 
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
>


-- 
____________________________________
Dr. Dieter Glötzel
Im Rosengarten 27
64367 Mühltal
Tel.: 06151 / 360 82 72

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SchbAvMaSample.xml
Type: text/xml
Size: 247775 bytes
Desc: not available
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20160118/a970987d/attachment-0001.xml>
-------------- next part --------------
---
\input musixtex
\input pmx
\input musixper
\def\trml#1{\raise2\internote\hbox{\loffset{0.5}{\ibl5{#1}9}\roffset{0.5}{\tbl5}}}%
\def\trmu#1{\raise-3\internote\hbox{\loffset{0.5}{\ibu5{#1}9}\roffset{0.5}{\tbu5}}}%
\def\trrml#1{\raise3\internote\hbox{\loffset{0.5}{\ibbl5{#1}9}\roffset{0.5}{\tbl5}}}%
\def\trrmu#1{\raise-4\internote\hbox{\loffset{0.5}{\ibbu5{#1}9}\roffset{0.5}{\tbu5}}}%
\def\trrrml#1{\raise3\internote\hbox{\loffset{0.5}{\ibbbl5{#1}9}\roffset{0.5}{\tbl5}}}%
\def\trrrmu#1{\raise-4\internote\hbox{\loffset{0.5}{\ibbbu5{#1}9}\roffset{0.5}{\tbu5}}}%

\def\Trml#1{\raise3\internote\hbox{\ibl5{#1}9\roffset{1.25}{\tbl5}}}%
\def\Trmu#1{\raise-4\internote\hbox{\loffset{1.1}{\ibu5{#1}9}\roffset{0.15}{\tbu5}}}%
\def\Trrml#1{\raise3\internote\hbox{\ibbl5{#1}9\roffset{1.25}{\tbl5}}}%
\def\Trrmu#1{\raise-4\internote\hbox{\loffset{1.1}{\ibbu5{#1}9}\roffset{0.15}{\tbu5}}}%
\def\Trrrml#1{\raise3\internote\hbox{\ibbbl5{#1}9\roffset{1.25}{\tbl5}}}%
\def\Trrrmu#1{\raise-4\internote\hbox{\loffset{1.1}{\ibbbu5{#1}9}\roffset{0.15}{\tbu5}}}%

---%<?xml version="1.0" encoding="UTF-8"?>
%<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml .org/dtds/partwise.dtd">
%Ave Maria (Ellen's Gesang III) - Page 1
%% work number : D. 839
%Franz Schubert
%encoding date : 2011-08-08 
% Rights : Copyright © 2002 Recordare LLC
%Software : Finale 2011 for Windows Dolet 6.0 for Finale
%Part P1 : Choir Aahs
%Part P2 : Grand Piano
%
%
% nv, -noinst, nostaves per instrument
 3 -2 2 1
% mtrnuml,mtrdenl,mtrnmp,mtrdnp,xmtrnum0,isig
 4 4 4 4 0 -2
%
% npages,nsyst,musicsize,fracindent 
 0 2 20 0.07
Grand Piano
Choir Aahs
btt
./
Tt
Ave Maria (Ellen's Gesang III) - Page 1
Tc
Franz Schubert
Abep




% Part, staff, voice( 2|Grand Piano| 2| 2), Bar 1
 b81u zb2 r8 b81u zb2 r8 b81u zb2 r8 b81u zb2 r8 | /
% Part, staff, voice( 2|Grand Piano| 1| 1), Bar 1
 \zcharnote{12}{Sehr langsam}\ r4x6 (1l d4u o. Dpp zf4 f4u o. zb4 b4u o. zd5 f4u o. zb4 d4u o. )1 zf4 
r4x6 (1l d4u o. zf4 f4u o. zb4 b4u o. zd5 f4u o. zb4 d4u o. )1 zf4 D< r4x6 (1u f4l o. zb4 b4l o. zd5 
d5l o. zf5 b4l o. zd5 f4l o. )1 zb4 r4x6 (1u a4fl o. zd5 d5l o. zf5 f5l o. za5f d5l o. zf5 D<+0+3 a4l 
o. )1 zd5 | /
% Part, staff, voice( 1|Choir Aahs| 1| 1), Bar 1
 rp | /
% Part, staff, voice( 2|Grand Piano| 2| 2), Bar 2
 b81u zb2 r8 b81u zb2 r8 b81u zb2 r8 b81u zb2 r8 | /
% Part, staff, voice( 2|Grand Piano| 1| 1), Bar 2
 r4x6 D> (1u g4l o. zb4 b4l o. ze5 e5l o. zg5 b4l o. ze5 g4l o. )1 zb4 r4x6 (1u g4fl o. za4n a4l o. ze5 
e5l o. zg5f a4l o. ze5 D>+0+3 g4l o. )1 za4 r4x6 (1u f4l o. zb4 b4l o. zd5 d5l o. zf5 b4l o. zd5 f4l 
o. )1 zb4 r4x6 (1l d4u o. zf4 f4u o. zb4 b4u o. zd5 f4u o. zb4 d4u o. )1 zf4 | /
% Part, staff, voice( 1|Choir Aahs| 1| 1), Bar 2
 rp | /
% Part, staff, voice( 2|Grand Piano| 2| 2), Bar 3
 Rl b81u zb2 r8 g81u zg2 r8 f81u zf2 r8 f81u zf2 r8 | /
% Part, staff, voice( 2|Grand Piano| 1| 1), Bar 3
 r4x6 d4u zf4 f4u zb4 b4u zd5 f4u zb4 d4u zf4 r4x6 d4u ze4n e4u zb4 b4u zd5 e4u zb4 d4u ze4 r4x6 d4u 
zf4 f4u zb4 b4u zd5 f4u zb4 d4u zf4 r4x6 e4fu za4 a4u zc5 c5u ze5 a4u zc5 e4u za4 | /
% Part, staff, voice( 1|Choir Aahs| 1| 1), Bar 3
 b4d4l [u a14u b14u ] (1u d4dd5l c15l )1 | /
% Part, staff, voice( 2|Grand Piano| 2| 2), Bar 4
 g81u zg2 r8 g81u zg2 r8 e81u ze2 r8 f81u zf2 r8 | /
% Part, staff, voice( 2|Grand Piano| 1| 1), Bar 4
 r4x6 d4u zg4 g4u zb4 b4u zd5 g4u zb4 d4u zg4 r4x6 d4u zg4 g4u zb4 b4u zd5 g4u zb4 d4u zg4 r4x6 e4u zg4 
g4u zc5 c5u ze5 g4u zc5 e4u zg4 r4x6 e4u zf4 f4u za4 a4u zc5 f4u za4 e4u zf4 | /
% Part, staff, voice( 1|Choir Aahs| 1| 1), Bar 4
 b44l r4 (1u c45l G2m3sd5 c5 [u b14u a14u )1 (1l g14u a14u )1 ] | /
% Part, staff, voice( 2|Grand Piano| 2| 2), Bar 5
 b81u zb2 r8 b81u zb2 r8 b81u zb2 r8 b81u zb2 r8 | /
% Part, staff, voice( 2|Grand Piano| 1| 1), Bar 5
 r4x6 d4u zf4 f4u zb4 b4u zd5 f4u zb4 d4u zf4 r4x6 d4u zf4 f4u zb4 b4u zd5 f4u zb4 d4u zf4 D< r4x6 d4u 
zf4s f4u zb4 b4u zd5 f4u zb4 d4u zf4 r4x6 d4u zg4 g4u zb4 b4u zd5 g4u zb4 D<+0+3 d4u zg4 | /
% Part, staff, voice( 1|Choir Aahs| 1| 1), Bar 5
 b44l r8 d85l [l d8d5l (1u c35l b34l )1 ] [u a14u g14u ] [l d15l e15nl ] | /
% Part, staff, voice( 2|Grand Piano| 2| 2), Bar 6
 a81u za2 r8 a81u za2 r8 f81su zf2s r8 f81u zf2 r8 | /
% Part, staff, voice( 2|Grand Piano| 1| 1), Bar 6
 r4x6 D> e4nu zg4 g4u zb4 b4u zd5 g4u zb4 e4u zg4 r4x6 e4u zg4 g4u za4 a4u zc5s g4u za4 e4u zg4 D>+0+3 
r4x6 e4fu za4 a4u zc5n c5u ze5 a4u zc5 e4u za4 r4x6 e4u za4 a4u zc5 c5u ze5 a4u zc5 e4u za4 | /
% Part, staff, voice( 1|Choir Aahs| 1| 1), Bar 6
 d45l [l c8d5sl a14l ] [l c8d5nl b14l ] (1u a84x3 c5l )1 d5l (1u e85x3 c5l )1 a4l | /
% Part, staff, voice( 2|Grand Piano| 2| 2), Bar 7
 g81u zg2 r8 g81u zg2 r8 a81u za2 r8 d82u zd3 r8 | /
% Part, staff, voice( 2|Grand Piano| 1| 1), Bar 7
 r4x6 d4u zg4 g4u zb4 b4u zd5 g4u zb4 d4u zg4 r4x6 d4u ze4n e4u zb4 b4u zd5 e4u zb4 d4u ze4 r4x6 c4u 
zf4 f4u za4 a4u zc5 f4u za4 c4u zf4 r4x6 f4l zg4 g4l zb4n b4l zf5 g4l zb4 f4l zg4 | /
% Part, staff, voice( 1|Choir Aahs| 1| 1), Bar 7
 b4d4l (1u [l d15l c15l )1 ] [l c8d5l a14l ] (1u g84x3 b4nl )1 d5l (1u f85x3 d5l )1 b4l | /
% Part, staff, voice( 2|Grand Piano| 2| 2), Bar 8
 c82u zc3 r8 c82u zc3 r8 f82u zf3 r8 f82u zf3 r8 | /
% Part, staff, voice( 2|Grand Piano| 1| 1), Bar 8
 r4x6 f4l za4 a4l zc5 c5l zf5 a4l zc5 f4l za4 r4x6 e4nu zb4 b4u zc5 c5u ze5n b4u zc5 e4u zb4 r4x6 f4l 
za4 a4l zc5 c5l zf5 a4l zc5 f4l za4 r4x6 f4l za4 a4l zc5 c5l zf5 a4l zc5 f4l za4 | /
% Part, staff, voice( 1|Choir Aahs| 1| 1), Bar 8
 (1u {0u c45l c45x6 }0 g4u a4u b4fu G2m2sc5 b4 a4u g4u )1 f44u r8 f84u | /
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AveMariaY.pdf
Type: application/pdf
Size: 31625 bytes
Desc: not available
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20160118/a970987d/attachment-0001.pdf>


More information about the Oberon mailing list