[Lexicog] XML/XSL export from Toolbox with sound files
Nick Thieberger
thien at UNIMELB.EDU.AU
Thu May 19 10:25:09 UTC 2011
Loig,
In the pages I pointed you to there are the following scripts that use
HTML5 audio calls:
The script is at the page level, and then each item refers to the script:
<script>
function EvalSound(soundobj) {
var thissound=document.getElementById(soundobj);
thissound.play();
}
</script>
<form>
<p class="lpLexEntryPara"><audio id="audio8" src=" ../audio/aal.wav
<view-source:http://paradisec.org.au/SELexicon/audio/aal.wav>"/>
<audio id="audio8" src=" ../audio/aal.mp3
<view-source:http://paradisec.org.au/SELexicon/audio/aal.mp3>"/>
<form>
<input type="button" value="aal" onClick="EvalSound('audio8')">
</form> </a> <span id="e8" class="lpLexEntryName">aal</span>
<span class="lpSpAfterEntryName"> </span>
I use both an mp3 and wav version to account for different browsers. You
could equally include WebM or H.264.
Nick
On 19 May 2011 19:24, pwyll4 <pwyll4 at yahoo.fr> wrote:
>
>
>
>
> Hello,
>
> So far I've written this on my XML document :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?xml-stylesheet type="text/xsl" href="xslt_test.xsl"?>
> <database>
>
> <sf>../Soundfile_3.mp3</sf>
> <sf>../Soundfile_4.mp3</sf>
> <sf>../Soundfile_5.mp3</sf>
> <sf>../Soundfile_6.mp3</sf>
>
> </database>
>
> and this on my XSL Stylesheet :
>
> <xsl:template match="sf">
>
> <img src="../sound-icon.png"
> onclick="javascript:BatmoAudioPop('<xsl:value-of
> select="."/>',this.href,'1')"/>
>
> </xsl:template>
>
> ... but it doesn't work.
> Does someone know what should be corrected or modified?
>
> Thanks a lot in advance.
>
> Loig
>
>
> --- In lexicographylist at yahoogroups.com, "pwyll4" <pwyll4 at ...> wrote:
> >
> > Hi,
> >
> > Thanks for your answers. Unfortunately, Lexique Pro is too rigid for me,
> especially concerning the final layout (I don't want to change everything
> "by hand" in the final html and paper versions), that's why I prefer
> Toolbox, that allows me to do whatever I want.
> >
> > Now, Nick, I didn't find the javascript you mentioned, I couldn't find
> sound files in your dictionary... Where is it?
> > I just need to find one or two lines of XSL code so that clicking on my
> icons plays the corresponding soundfiles... so far I could't find it on
> google.
> >
> > Thanks
> >
> > L.
> >
> >
> >
> > --- In lexicographylist at yahoogroups.com, Nick Thieberger <thien@> wrote:
> > >
> > > Hi,
> > >
> > > While the XML export from Toolbox is great, if you want to have an html
> > > representation then I agree that lexiquepro does a very good job, and
> > > embedding sound with HTM5 has become very easy.
> > >
> > > My dictionary is here:
> > > http://paradisec.org.au/SELexicon/index-english/main.htm
> > >
> > > You can see the little bit of javascript that allows the sound to be
> called
> > > and you can trigger it from an image or button or whatever you want.
> You
> > > could also include this via XSLT to HTML from the Toolbox XML output I
> > > suppose.
> > >
> > > Nick
> > >
> > > On 18 May 2011 05:54, pwyll4 <pwyll4@> wrote:
> > >
> > > >
> > > >
> > > > Hello,
> > > >
> > > > I'd like to export my Toolbox dictionary in XML. There'll be
> soundfiles.
> > > >
> > > > In my XML file, I have the following :
> > > >
> > > > <sf>../soundfile.mp3</sf>
> > > >
> > > > (several times with different sound files everytime),
> > > > and I would like that with my stylesheet, on the final web page, you
> see a
> > > > small picture (in png or jpg format - always the same picture of a
> > > > loudspeaker), and that when you click on this picture, the
> corresponding
> > > > soundfile is played.
> > > >
> > > > What should I write in my XSL stylesheet so that it happens?
> > > > So far I've not found the solution anywhere.
> > > >
> > > > Thanks in advance for your help!
> > > >
> > > >
> > > >
> > >
> >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/lexicography/attachments/20110519/1fd02227/attachment.htm>
More information about the Lexicography
mailing list