Subject: Re: [xsl] regexp question From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx> Date: Sun, 12 Sep 2004 17:40:19 -0400 |
I would do it like this:
<xsl:template match="img[matches(@src, '.*dropcap/.\.gif')]" mode="dropcap">
<xsl:value-of select="@alt"/>
</xsl:template>
Also, is there some reasonably reliable way -- again using xslt 2.0 -- to take this ...
<meta name="byl" content="By C. J. CHIVERS and STEVEN LEE MYERS" />
.... and turn it into this:
<meta name="author" content="Chivers, C. J." /> <meta name="author" content="Myers, Steven Lee" />
It all depends on how wide the variations are in your source data. If you
want to do the above, while also changing "BOB DU CHARME" to "du Charme,
Bob", then you have got an interesting challenge on your hands. Try to
define the algorithm you want to use before you start asking how to code it
in XSLT.
- a name is all caps - within a name the last name is the surname - anything before that are the forenames - multiple names are delimited by either ", " or " and "
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] regexp question, Michael Kay | Thread | RE: [xsl] regexp question, Michael Kay |
RE: [xsl] regexp question, Michael Kay | Date | RE: [xsl] regexp question, Michael Kay |
Month |