XML source
... <scene> <FX>General Road Building noises.</FX> <speech speaker="Prosser"> Come off it Mr Dent, you can't win you know. There's no point in lying down in the path of progress. </speech> <speech speaker="Arthur"> I've gone off the idea of progress. It's overrated </speech> ...
XSLT stylesheet
... <xsl:template match="FX"> <fo:block font-weight="bold"> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="speech[@speaker='Arthur']"> <fo:block background-color="blue"> <xsl:value-of select="@speaker">: <xsl:apply-templates/> </fo:block> </xsl:template> ...
Result
3 of 18 |