Ouch,
Make it:
<xsl:template match="space">
<xsl:value-of select="concat('[',@extent,'-character gap here]')"/>
</xsl:template>
(forgot the brackets)
Note that from the context node, at which you are at the moment of
matching (= space), you reach for the local attributes by prefixing
their name with a [log in to unmask]
HTH,
Piotr
On 28/11/11 17:03, Piotr Bański wrote:
> Hi Sebastiaan,
>
> I'd try e.g.
>
> <xsl:template match="space">
> <xsl:value-of select="concat(@extent,'-character gap here')"/>
> </xsl:template>
>
> best,
>
> Piotr
>
> On 28/11/11 16:39, Sebastiaan Verweij wrote:
>> Dear list
>>
>> Sorry, this will be a total rookie question, and mostly showing my lack
>> of XSLT. I'm wondering how best to render spaces, or lacunae, left in
>> the text (from XML to HTML). Mostly these are there because the
>> manuscript scribe couldn't read his/her original, and so leaves a gap
>> roughly the length of the equivalent word. I tend to mark these up as
>> follows (as suggested by Guidelines P5 11.6.1):
>>
>> <space extent="5"unit="chars"/>
>>
>> Is it possible in the XSLT to insert the following [*-character gap
>> here], where * is the value of extent (since we do not observe line
>> breaks, I don't want an actual set of variable spaces appearing, but
>> rather an editorial insertion describing the space)? I understand I need
>> something like this,
>>
>> <xsl:template match="space">
>> [*-character gap here]
>> </xsl:template>
>>
>> But I'm not sure how to extract the variable from 'extent'.
>>
>> Thanks so much!
>>
>> Sebastiaan
>>
>>
>> ---
>> Dr Sebastiaan Verweij || Hardie Postdoctoral Fellow, Lincoln College
>> Research Associate,The Oxford Edition of the Sermons of John Donne
>> a: English Faculty, St Cross Building, Manor Road, Oxford OX1 3UL
>> t: 0044 (0)1865 271931 || skype: seb.macv
>>
>
|