rss_converter_instagram.com.xsl: don't put location coordinates in screen name
authorAntonio Ospite <ao2@ao2.it>
Tue, 3 Apr 2018 16:12:22 +0000 (18:12 +0200)
committerAntonio Ospite <ao2@ao2.it>
Tue, 3 Apr 2018 16:12:22 +0000 (18:12 +0200)
Remove location coordinates from the location screen name as the latter
also shows up in item titles, but still emit the coordinates in the
channel description.

src/rss_converter_instagram.com.xsl

index bd67951..2d54f3d 100644 (file)
@@ -47,9 +47,7 @@
     <xsl:variable name="screen-name">
         <xsl:choose>
             <xsl:when test="$location-name != ''">
     <xsl:variable name="screen-name">
         <xsl:choose>
             <xsl:when test="$location-name != ''">
-                <xsl:variable name="location-latitude" select="//LocationsPage/location/lat"/>
-                <xsl:variable name="location-longitude" select="//LocationsPage/location/lng"/>
-                <xsl:value-of select="concat($location-name, ' (', $location-latitude, ', ', $location-longitude, ')')"/>
+                <xsl:value-of select="$location-name"/>
             </xsl:when>
             <xsl:when test="$full-name != ''">
                 <xsl:value-of select="$full-name"/>
             </xsl:when>
             <xsl:when test="$full-name != ''">
                 <xsl:value-of select="$full-name"/>
                 <description>
                     <xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>
                     <xsl:value-of select="normalize-space(concat($screen-name, '. ', //user/biography))"/>
                 <description>
                     <xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>
                     <xsl:value-of select="normalize-space(concat($screen-name, '. ', //user/biography))"/>
+                    <xsl:if test="$location-name != ''">
+                        <xsl:variable name="location-latitude" select="//LocationsPage/graphql/location/lat"/>
+                        <xsl:variable name="location-longitude" select="//LocationsPage/graphql/location/lng"/>
+                        <xsl:value-of select="concat(' (', $location-latitude, ', ', $location-longitude, ')')"/>
+                    </xsl:if>
                     <xsl:variable name="external-url" select="//user/external_url"/>
                     <xsl:if test="$external-url != ''">
                         <xsl:text> </xsl:text><a href="{$external-url}"><xsl:value-of select="$external-url"/></a>
                     <xsl:variable name="external-url" select="//user/external_url"/>
                     <xsl:if test="$external-url != ''">
                         <xsl:text> </xsl:text><a href="{$external-url}"><xsl:value-of select="$external-url"/></a>