Exmaralda-Org / exmaralda

26 stars 15 forks source link

XSL Transformation with AudioPlayer #404

Closed wuddel closed 11 months ago

wuddel commented 11 months ago

The transformation...

unparsedFolker2HTMLContributionListAudio.xsl

produces an output with paths to the source audio file that does not play in the browser (I have Firefox), e.g.:
<audio>
  <source src="c:\Users\xxxxxxx\Documents\Audio\xxxxxxx.WAV" type="audio/wav">
</audio>
...

However, the audio plays fine, if we replace the backslashes by slashes and add "file:/" in the front, e.g. by employing:

<audio>
  <xsl:element name="source">
    <xsl:attribute name="src"><!--<xsl:text>./</xsl:text>--><xsl:value-of select="concat('file:/',replace($AUDIO_FILE,'\\','/'))"/></xsl:attribute>
    <xsl:attribute name="type">audio/wav</xsl:attribute>
  </xsl:element>
 </audio>

By the way... the -tag is not closed in the HTML-Output, but this does not seem matter.

berndmoos commented 11 months ago

cf. #183

berndmoos commented 11 months ago

Close via #413