Subject: Re: [xsl] nested output From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx> Date: Tue, 21 Dec 2004 11:37:00 -0500 |
?? the result you posted had no latex markup at all
(and does have a couple of strange characters (octal 226, decimal 150) just after each page number, is that intended to be a dash of some sort?
It displays fine in my mail program as an en-dash. I don't intend to deal with tex-escaping and such; just utf-8.
something like
<xsl:template match="xhtml:span" mode="output-latex"> <xsl:variable name="c" select="tokenize(@class, ' +')">
<xsl:if test="$c='italic'">\textit{</xsl:if> <xsl:if test="$c='bold'">\textbf{</xsl:if>
<xsl:apply-templates/>
<xsl:if test="$c='italic'">}</xsl:if> <xsl:if test=".='bold'">}</xsl:if> </xsl:template>
David, you have background in TeX. Do you have any thoughts about the best design approach to this intermediate (xhtml) representation to make output transformation to other targets easiest?
2) Split presentation from semantics, and embed the former in the element; like:
<span class="title" style="font-weight: bold; font-style: italic;">Riots and Pogroms</span>
The latter approach would require some rethinking of the code. Current templates look like:
<xsl:template match="mods:titleInfo[not(@type='abbreviated')]" mode="full"> <xsl:param name="prefix" /> <xsl:param name="suffix" /> <xsl:param name="font-style" /> <xsl:param name="font-weight" /> <xsl:value-of select="$prefix" /> <xsl:choose> <xsl:when test="../../bib:refclass='part-inSerial' and not(../../mods:name)" /> <xsl:otherwise> <span class="title {$font-style} {$font-weight}"> <xsl:apply-templates select="mods:title" /> <xsl:apply-templates select="mods:subTitle" /> </span> <xsl:value-of select="$suffix" /> </xsl:otherwise> </xsl:choose> </xsl:template>
Incidentally, I'm realizing that XSLT 2.0's unparsed-text() functions and reg-exp support means that this could theoretically be extended to handle TeX input documents.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] nested output, David Carlisle | Thread | Re: [xsl] nested output, David Carlisle |
Re: [xsl] non MS transform, António Mota | Date | RE: [xsl] non MS transform, Pieter Reint Siegers |
Month |