Re: [xsl] regexs, grouping (?) and XSLT2?

Subject: Re: [xsl] regexs, grouping (?) and XSLT2?
From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx>
Date: Sun, 8 Aug 2004 08:14:50 -0400
Mike pointed out:

<xsl:analyze-string select="." regex='"(.*?|.*?\n.*?)"'>

If you want "." to match any character including a newline, you can set "dot-all" mode using flags="s".

Great; was wondering about that.


With respect to the other issue, below is an example doc; might be
easier to understand.

So, the para output would be something like:

<p>Some citations: (Doe, 1999a, 1999b; Doe and Jones, 1999)</p>

And in the bib list:

Doe (1999a)
. (1999b)
Doe and Jones (1999)

============

<?xml version="1.0" encoding="utf-8"?>
<article xmlns="http://docbook.org/docbook-ng";>
  <info>
    <title>Test</title>
  </info>
  <section>
    <info>
      <title>Introduction</title>
    </info>
    <para>Some citations: <citation><biblioref linkend="one"/><biblioref
    linkend="two"/><biblioref linkend="three"/></citation></para>
  </section>
  <bibliography>
    <modsCollection xmlns="http://www.loc.gov/mods/v3";>
      <mods ID="one">
	<name type="personal">
	  <namePart type="given">John</namePart>
	  <namePart type="family">Doe</namePart>
	  <role>
	    <roleTerm type="text">author</roleTerm>
	  </role>
	</name>
	<titleInfo>
	  <title>Some Title</title>
	</titleInfo>
	<originInfo>
	  <dateIssued>1999</dateIssued>
	</originInfo>
      </mods>
      <mods ID="two">
	<name type="personal">
	  <namePart type="given">John</namePart>
	  <namePart type="family">Doe</namePart>
	  <role>
	    <roleTerm type="text">author</roleTerm>
	  </role>
	</name>
	<titleInfo>
	  <title>Another Title</title>
	</titleInfo>
	<originInfo>
	  <dateIssued>1999</dateIssued>
	</originInfo>
      </mods>
      <mods ID="three">
	<name type="personal">
	  <namePart type="given">John</namePart>
	  <namePart type="family">Doe</namePart>
	  <role>
	    <roleTerm type="text">author</roleTerm>
	  </role>
	</name>
	<name type="personal">
	  <namePart type="given">Jane</namePart>
	  <namePart type="family">Jones</namePart>
	  <role>
	    <roleTerm type="text">author</roleTerm>
	  </role>
	</name>
	<titleInfo>
	  <title>Some Title</title>
	</titleInfo>
	<originInfo>
	  <dateIssued>1999</dateIssued>
	</originInfo>
      </mods>
    </modsCollection>
  </bibliography>
</article>

Current Thread