to <email>.
Can't do this globally. Some of the links are odd (i.e,. the link
is not their e-mail address but is their name, eg
<ulink url="mailto:nik@freebsd.org">Nik Clayton</ulink>
which would turn to
<email>Nik Clayton</email>
which isn't very useful. Ignore these ones, and do the others.
(i.e., the ones that look like
<ulink url="mailto:nik@freebsd.org">nik@freebsd.org</ulink>
)
This Emacs regexp does the job.
Search for: <ulink\s-+url="mailto[^>]+>\([^<]+\)</ulink>
Replace with: <email>\1</email>
Step 2. A lot of the <email>...</email> sets will have '<' and '>' embedded
in them (as entities). These can be removed, since the stylesheet
will add them;
Search for: <email><\([^&]+\)></email>
Replace with: <email>\1</email>
Step 3. The trick now is to turn
<ulink url="mailto:nik@freebsd.org">Nik Clayton</ulink>
into
Nik Clayton <email>nik@freebsd.org</email>
This step could (possibly) have been done first, and then steps
1 and 2 could be done globally. I haven't done this because of
concerns about the ordering of names within languages. This
transformation is fairly simple in English, I've no idea what
it's like in Japanese.
Search for: <ulink\s-+url="mailto:\([^"]+\)">\([^<]+\)</ulink>
Replace with: \2 <email>\1</email>
Step 4. Remove leading and trailing spaces that may have slipped in
Search for: <email>\s-+
Replace with: <email>
Search for: \s-+</email>
Replace with: </email>