[xsl] regular expression question
Subject: [xsl] regular expression question
From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx>
Date: Sun, 14 Nov 2004 15:53:18 -0500
|
I'm not really that familiar with regular expressions (beyond the
basics), nor with the specifics of their implementation in XSLT 2.0.
How easy is it to have regexp code that can take this:
<para>Acccording to Doe <citation><biblioref
linkend="doe99"/></citation> ...</para>
.... and to see that while standard processing code would yield this:
<p>According to Doe (Doe, 1999) ...</p>
.... the author name is preceding the citation, such that the output
should be:
<p>According to Doe (1999) ...</p>
?
Put differently, would there be a good way to look at the text
immediately preceding a citation (probably in the entire sentence
preceding it) to see if the author is noted there?
I should add that historically (in bibtex for example), the author
would manually code the citation to indicate how it should be rendered.
I'm just wondering if that's really necessary, and perhaps simply
awkward (for example, in a GUI app, it means requiring some sort of
interface for the author to indicate how it ought to be rendered, while
using the approach I'm suggesting above would be much simpler).
Bruce