Subject: Re: [xsl] A problem with concat() From: Bridger Dyson-Smith <bdysonsmith@xxxxxxxxx> Date: Mon, 18 Apr 2011 15:18:42 -0400 |
On Mon, Apr 18, 2011 at 2:50 PM, G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote: > Have you considered using the following? > > string-join( sequence, separator ) > > as in (note the parens): > > <xsl:value-of select="string-join( (mods:namePart[@type='family'], > mods:namePart[@type='given'], > mods:namePart[@type='date']), ', ' > )"/> Hi Ken, thanks for the response. I tried string-join, but the results are the same -- the output looks like this: <dc:creator>Thompson James Edward 1880-1976</dc:creator> > I haven't pulled down your code (because of my time constraints), but a > couple of comments of the conventions in your example that jumped out at me: > > 1) select="x" is the same as select="./x" > 2) test="@type='personal'" is the same as test=".[@type='personal']" > > What you typed isn't wrong, but it isn't typical. I think what I've > suggested to you is more conventional syntax. > > I hope this helps. Just a couple of quick notes. I really appreciate the suggestions - I'm trying to learn from different books, many of which suggest a number of ways to abbreviate different things (I mean, the books all similarly describe the different possible abbreviations). I think of this as me stumbling along with long division and watching the experts (people like you) blow by me using short division. It's something I need to work on. Thanks again! Cheers, Bridger
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] A problem with concat(), G. Ken Holman | Thread | Re: [xsl] A problem with concat(), Brandon Ibach |
Re: [xsl] A problem with concat(), Brandon Ibach | Date | Re: [xsl] A problem with concat(), Bridger Dyson-Smith |
Month |