AnsweredAssumed Answered

XLS Stylesheet error

Question asked by garyjones on Nov 25, 2018
Latest reply on Dec 3, 2018 by garyjones

Hi,

I'm trying to import three fields from a Google Alert RSS feed - title, link and published and ignore all the others in the filed match window. The XML looks like this -

 

<?xml version="1.0" encoding="UTF-8"?>

 

-<feed xmlns:idx="urn:atom-extension:indexing" xmlns="http://www.w3.org/2005/Atom">

<id>tag:google.com,2005:reader/user/14539173499568487421/state/com.google/alerts/18126846538087064711</id>

<title>Google Alert - music and health</title>

<link rel="self" href="https://www.google.com/alerts/feeds/14539173499568487421/18126846538087064711"/>

<updated>2018-11-23T18:04:08Z</updated>

-<entry>

<id>tag:google.com,2013:googlealerts/feed:14818596734445970821</id>

<title type="html">Classical Violinists Fill Montclair Hospital With Soothing <b>Music</b></title>

<link href="https://www.google.com/url?rct=j&sa=t&url=https://patch.com/new-jersey/montclair/classical-violinists-fill-montclair-hospital-soothing-music&ct=ga&cd=CAIyHDdhZTI4NDVhYjc2OWIwN2Q6Y28udWs6ZW46R0I&usg=AFQjCNHEw5oNrYy0u_crzw38hLAFPgfb3g"/>

<published>2018-11-23T18:04:08Z</published>

<updated>2018-11-23T18:04:08Z</updated>

<content type="html">The <b>musicians</b> – Xin Zhao (violin) and Lucy Crowin (viola) – were playing at the hospital as part of the Hackensack Meridian <b>Health</b> &quot;<b>Music</b> </content>

-<author>

<name/>

</author>

</entry>

</feed>

 

[Full file attached]

 

I've written the following XLS style sheet -

 

<?xml version="1.0" encoding="utf-8" ?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

 

<xsl:template match="/feed">

         <xsl:for-each select="entry>

                  </xsl:value-of select="ID" />

                    </xsl:value-of select="title" />

                      </xsl:value-of select="link" />

                    </xsl:value-of select="published" />

                    </xsl:value-of select="updated" />

                    </xsl:value-of select="content" />

                    </xsl:value-of select="author" />

 

  </xsl:template>

  </xsl:stylesheet>

 

However, i keep getting an error message saying at line the style sheet is unterminated. I thought I had got the path, parent, node etc clear but am now wholly confused.

 

all and any help appreciated.

 

best wishes

 

Gary

Outcomes