[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: al quraan
- To: developer at arabeyes dot org
- Subject: Re: al quraan
- From: Walid Shaari <ws070 at mdx dot ac dot uk>
- Date: 31 Oct 2002 08:48:47 +0000
On Thu, 2002-10-31 at 04:16, Mohammad DAMT wrote:
> On Wed, Oct 30, 2002 at 10:35:32PM +0200, Mohammed Sameer wrote:
> > well done, i had a look at the code, however i didn't understand why we pass the first argument to guran_init ?
>
> I'm going to change the quran_init API, so the only argument is the
> location of the file. Quran lang will be determined by XML file, so we
> must alter XML file to something like this
>
> <quran lang="ar" mediatype="text">
> <quran lang="ar" mediatype="mp3">
>
> for "mp3" media type, we will have
> <sura id=1 name="al fatiha">
> <aya id=1>
> <qurandata file="alfatiha.mp3" offset=0/>
> </aya>
> <aya id=2>
> <qurandata file="alfatiha.mp3" offset=xxxxx length=zzzzz/>
> </aya>
> <aya id=3>
> <qurandata file="alfatiha.mp3" offset=yyyyy length=ttttt/>
> </aya>
> ...
> </sura>
>
> where xxxxx and yyyyy are offset to mp3 stream. In the implementation,
> if we want to hear aya#2 of alfatiha, we just open the alfatiha.mp3 as stream and play the stream starting from offset
> xxxxx for zzzzzz bytes.
>
> what do you think?
Ok another thoughts on the XML file after a quick look :
1- why the unnecessary element searchtext, I am sure search is something
separate than data and the striping of the taskheel can be handled in
the code, assume that someone will be usin DOM for processing that File,
that will double the memory requirements, I suggest that data that can
be derived from the source XML file should be eleminated as the good
thing about XML is that programs can understand it, and know where to
search for data.
2- The Quarn by definition is in Arabic so the lang attribute should be
by default in Arabic. and instead use an Element to define the language
that way you can have other attributes related to the language if any,
or you will be able to include/link different langs within one doc not
separate as in a book of tafseer/Meaning of the Quran in English/etc.
3- I might be all wrong, but at least I can debate things :)
hth
Walid