Span Example
This example shows the usage of the span tag for formatting text. Including condensing, different font size and text decorations.
- Template: templates/example8.xsl
- Record: records/empty.xml
Span Example (Template)
<xsl:stylesheet version="2.0"
>
<xsl:template match="Record"
>
<image height="300"
width="400"
>
<field height="71"
width="380"
x="10"
y="10"
>
<text font-family="Times New Roman"
font-size="30"
>
Text
<span font-family="Tahoma"
font-size="20"
font-weight="bold"
text-decoration="overline"
>
Span
</span>
<span superscript="superscript"
font-size="24"
>
super
</span>
<span font-size="24"
>
normal
</span>
<span font-size="24"
superscript="subscript"
>
subscript
</span>
</text>
<label font-family="Verdana"
font-size="18"
>
Label with
<span font-size="26"
font-style="italic"
text-decoration="underline"
>
Span
</span>
<span font-family="Arial"
font-size="14"
text-decoration="linethrough"
>
Span
</span>
</label>
</field>
<field height="60"
width="380"
x="10"
y="90"
>
<text condense="1,0.8,0.6,0.4"
>
Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text
</text>
<label font-size="16,12"
>
Label Label Label Label Label Label Label Label Label
</label>
<label condense="1,0.8,0.6,0.4"
font-size="16"
>
Label Label Label Label Label Label Label Label Label
</label>
</field>
<field height="140"
width="180"
x="10"
y="150"
>
<text condense="1,0.8,0.6,0.4"
font-size="24"
>
<ul>
<li>
Text Text Text Text
</li>
<li condense="1"
>
Text Text Text Text
</li>
<li>
Text Text Text Text
</li>
<li condense="1"
font-size="24,22,20,18,16,14,12"
>
Text Text Text Text
</li>
</ul>
</text>
</field>
<field height="140"
width="190"
x="200"
y="150"
>
<text condense="1,0.8,0.6,0.4"
font-size="24"
>
<ol>
<li>
Text Text Text Text
</li>
<li condense="1"
>
Text Text Text Text
</li>
<li>
Text Text Text Text
</li>
<li condense="1"
font-size="24,22,20,18,16,14,12"
>
Text Text Text Text
</li>
</ol>
</text>
</field>
</image>
</xsl:template>
</xsl:stylesheet>
Generated Image
Execution Status
Execution Problem |
---|
OptionException: 'overline' is not a valid value for option text-decoration. Possible values are: underline, linethrough or none |
ImageRenderingException: at.mrdevelopment.toolkit.options.OptionException: Missing option: text-decoration |