[PATCH 5/7] Split last_name and first_name for buddies in UDDF export

Miika Turkia miika.turkia at gmail.com
Tue Dec 9 21:43:52 PST 2014


Hi Martin,

thanks for the patches. Mostly they look good to me but I am still reading
them through. This one is quite problematic...

If the buddy is e.g. only the first name, neither of the first_name nor
last_name is filled. Also, if the last name contains a space, this won't
work (e.g. Milhouse Van Houten). And, unfortunately it is possible to give
the last name before first...but we might just not care about this last
case.

miika

On Wed, Dec 10, 2014 at 1:24 AM, Martin Long <martin at longhome.co.uk> wrote:

> ---
>  xslt/uddf-export.xslt | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/xslt/uddf-export.xslt b/xslt/uddf-export.xslt
> index ff9f364..e558ca5 100644
> --- a/xslt/uddf-export.xslt
> +++ b/xslt/uddf-export.xslt
> @@ -73,8 +73,11 @@
>              </xsl:attribute>
>              <personal>
>                <first_name>
> -                <xsl:value-of select="."/>
> +                <xsl:value-of select="substring-before(., ' ')"/>
>                </first_name>
> +              <last_name>
> +                <xsl:value-of select="substring-after(., ' ')"/>
> +              </last_name>
>              </personal>
>            </buddy>
>          </xsl:for-each>
> --
> 1.9.1
>
> _______________________________________________
> subsurface mailing list
> subsurface at subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20141210/fa3b55de/attachment.html>


More information about the subsurface mailing list