Attachment 'content.xsl'
Download 1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml"
3 xmlns:html="http://www.w3.org/1999/xhtml"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 xmlns:wwmode="urn:WebWorks-Engine-Mode"
6 xmlns:wwdoc="urn:WebWorks-Document-Schema"
7 xmlns:wwsplits="urn:WebWorks-Engine-Splits-Schema"
8 xmlns:wwimaging="urn:WebWorks-XSLT-Extension-Imaging"
9 xmlns:wwlog="urn:WebWorks-XSLT-Extension-Log"
10 xmlns:wwuri="urn:WebWorks-XSLT-Extension-URI"
11 xmlns:wwfilesystem="urn:WebWorks-XSLT-Extension-FileSystem"
12 xmlns:wwprojext="urn:WebWorks-XSLT-Extension-Project"
13 exclude-result-prefixes="html xsl wwmode wwdoc wwsplits wwimaging wwlog wwuri wwprojext wwfilesystem"
14 >
15 <xsl:import href="wwtransform:super" />
16
17 <xsl:template match="wwdoc:Marker[@name = 'MovieReference']" mode="wwmode:textrun">
18 <xsl:param name="ParamSplits" />
19 <xsl:param name="ParamCargo" />
20 <xsl:param name="ParamLinks" />
21 <xsl:param name="ParamSplit" />
22
23 <xsl:variable name="VarSourceDocumentPath" select="wwprojext:GetDocumentPath($ParamSplit/@documentID)" />
24 <xsl:variable name="VarMoviePath" select="./wwdoc:TextRun/wwdoc:Text/@value" />
25 <xsl:variable name="VarSourceMoviePath" select="wwfilesystem:Combine(wwfilesystem:GetDirectoryName($VarSourceDocumentPath), $VarMoviePath)" />
26 <xsl:variable name="VarTargetMoviePath" select="wwfilesystem:Combine(wwfilesystem:GetDirectoryName($ParamSplit/@path), $VarMoviePath)" />
27 <xsl:variable name="VarCopyMovie" select="wwfilesystem:CopyFile($VarSourceMoviePath, $VarTargetMoviePath)" />
28 <xsl:variable name="VarButtonId" select="translate($VarMoviePath, '/.', '')"/>
29
30 <html:input id="{$VarButtonId}" type="button" value="Play" onclick="createMoviePopUp('{$VarMoviePath}', this)" />
31
32 </xsl:template>
33
34 <xsl:template match="wwdoc:Paragraph[@stylename = 'Equation']" mode="wwmode:content">
35 <xsl:param name="ParamParagraph" select="." />
36 <xsl:param name="ParamSplits"/>
37 <xsl:param name="ParamSplit"/>
38
39 <xsl:variable name="VarWifFrameId" select="$ParamParagraph/descendant::wwdoc:Frame[1]/@id" />
40
41 <xsl:for-each select="$ParamSplits[1]">
42 <xsl:variable name="VarSplitsFrame" select="key('wwsplits-frames-by-id', $VarWifFrameId)[@documentID = $ParamSplit/@documentID]" />
43 <xsl:variable name="VarImageInfo" select="wwimaging:GetInfo($VarSplitsFrame/@path)" />
44
45 <xsl:variable name="VarSrc" select="wwuri:GetRelativeTo($VarImageInfo/@path, $ParamSplit/@path)" />
46
47 <html:table style="width: 100%;">
48 <html:tr>
49 <!-- First cell with relative width -->
50 <!-- -->
51 <html:td style="padding-left: 5%; text-align: left;">
52 <html:img src="{$VarSrc}" class="EquationGraphic" style="border: 0px; vertical-align: baseline;" />
53 </html:td>
54
55 <!-- Second cell with fixed width -->
56 <!-- -->
57 <html:td style="padding-right: 20px; text-align: right;">
58 <xsl:for-each select="$ParamParagraph/wwdoc:Number">
59 <html:div style="font-weight: bold; font-size: large;">
60 <xsl:for-each select="descendant::wwdoc:Text">
61 <xsl:value-of select="@value" />
62 </xsl:for-each>
63 </html:div>
64 </xsl:for-each>
65 </html:td>
66 </html:tr>
67 </html:table>
68 </xsl:for-each>
69 </xsl:template>
70
71
72 </xsl:stylesheet>
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.