OK, am going back to trying to solve the whitespace problem. This seems
to touch on a number of issues, so let me see what people think.
Let’s look at an example template:
<xsl:template match=“mods:originInfo”>
<xsl:param name=“prefix”/>
<xsl:param name=“suffix”/>
<xsl:if test=“mods:place”>
<xsl:value-of select="$prefix"/>
<xsl:apply-templates select=“mods:place”/>
<xsl:apply-templates select=“mods:publisher”/>
<xsl:value-of select="$suffix"/>
</xsl:if>
</xsl:template>
This is transforming MODS content into an intermediate representation.
The problem is that the prefix and suffix content is placed outside the
wrapper element, so that the result (internally) would be something like:
, <bib:span class=“origin”>whatever</bib:span>,
This is what causes the whitespace problem, because whitespace only gets
preserved within the bib:span element.
OK, so in theory I could instead do:
<bib:span class=“origin”>, whatever, </bib:span>
That solves the whitespace issue, but probably introduces side-effects.
For example, if you assign special font formatting (bold, italic,
etc.) to that content, does that apply to both the prefix and suffix
content AND the actual element content, or just the latter? If the
latter, then perhaps that suggests the need for:
<bib:span class=“origin”>, bib:contentwhatever</bib:content>, </bib:span>
And then what about XML output?
Thoughts?
Bruce