This is the way that the Extract action works in Wires when you select a repeating node. I have a feeling that it is possible to do what you want with EMML, but it may not be possible in Wires. To clarify, could you give us a sample of what you want your final output to look like?
Sara, technical writer/jackbe
Cnn feed input:
...
<item>
<title>Jaycee's journal: 'I want to be free'</title>
<guid isPermaLink="false">http://www.cnn.com/2010/CRIME/02/11/jaycee.dugard.journal/index.html?eref=rss_topstories</guid>
<link>http://rss.cnn.com/~r/rss/cnn_topstories/~3/KnZBDjuzIO4/index.html</link>
<description>Jaycee Dugard kept a journal during 18 years of captivity, at times writing about how she yearned for freedom, court documents filed Thursday reveal.<div class="feedflare">
<a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=KnZBDjuzIO4:b6zJU89oMzs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/rss/cnn_topstories?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=KnZBDjuzIO4:b6zJU89oMzs:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/rss/cnn_topstories?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=KnZBDjuzIO4:b6zJU89oMzs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/rss/cnn_topstories?i=KnZBDjuzIO4:b6zJU89oMzs:V_sGLiPBpWU" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=KnZBDjuzIO4:b6zJU89oMzs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/rss/cnn_topstories?d=qj6IDK7rITs" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=KnZBDjuzIO4:b6zJU89oMzs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/rss/cnn_topstories?i=KnZBDjuzIO4:b6zJU89oMzs:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/rss/cnn_topstories/~4/KnZBDjuzIO4" height="1" width="1"/></description>
<pubDate>Thu, 11 Feb 2010 22:24:40 EST</pubDate>
<feedburner:origLink>http://www.cnn.com/2010/CRIME/02/11/jaycee.dugard.journal/index.html?eref=rss_topstories</feedburner:origLink></item>
...
I was trying to generate an RSS feed that extracts the title tag from the cnn rss feed with just the title tags
i.e.
<item>
<title>Bill Clinton hospitalized with chest 'discomfort,' gets stents</title>
</item>
...
I know its possible to do with EMML but I wanted to test out to see what you can do with wires.
You can, using Extract, just select a single <item> by setting an occurrence in the block properties. Wires does not currently let you select only the <title> node within that item.
You also have the issue that selecting all items creates a node set, not a document, so that selected set of items must be wrapped in a root node in order to have the mashup result be a document. Mashup results cannot be node sets.
So I think the short answer is not in Wires in this version of Presto.
Sara, technical writer/jackbe
Hi,
I think you'll find that you aren't able to extract the text value for the title node in Wires with the actions that you have available out of the box and to create a new RSS feed you will need to build a RSS document as your output.
To do what you want you really need to code something directly in emml using Studio. I wanted to do something similar in my first serious mashup and resorted to coding an emml script to do it.
To help you get started, here's a simple emml script I've written that hopefully does what you want. I hope this helps you. I've included comments to explain what each step does. I have a more complex set of emml scripts that build a complete RSS feed from a number of sources which I'm happy to post if you want.
Cheers, Innes
<mashup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jackbe.com/2008-03-01/EMMLSchema/ ../src/schemas/EMMLSpec.xsd"
xmlns="http://www.jackbe.com/2008-03-01/EMMLSchema" xmlns:macro="http://www.jackbe.com/2008-03-01/EMMLMacro"
name="SampleRSSExtract">
<operation name="getRSSFeed">
<output name="newRSSFeed" type="document" />
<!-- define some variables to use in the mashup -->
<variables>
<variable name="rawRSSFeed" type="document" />
<variable name="rssTitles" type="document" />
<variable name="newRSSItems" type="document" />
</variables>
<!-- get the raw RSS data that we want to process -->
<directinvoke endpoint="http://rss.cnn.com/rss/cnn_topstories.rss"
outputvariable="rawRSSFeed" />
<!-- extract all the title nodes from the returned RSS output -->
<assign fromexpr="$rawRSSFeed/*:rss/*:channel/*:item/*:title"
outputvariable="rssTitles" />
<!--
for each title node, extract the actual text value and build a new RSS
item node with that value appending it to a holding document
-->
<foreach variable="titleItem" items="$rssTitles">
<appendresult outputvariable="newRSSItems">
<item>
<title>{$titleItem/text()}</title>
</item>
</appendresult>
</foreach>
<!--
create an RSS feed document with all of our rebuilt items containing
the title extracted from the original feed
-->
<constructor outputvariable="newRSSFeed">
<rss version="2.0">
<channel>
{$newRSSItems//*:item}
</channel>
</rss>
</constructor>
</operation>
</mashup>




I'm trying to use wires to extract "Title" from CNN top stories RSS feed (located http://rss.cnn.com/rss/cnn_topstories.rss) and create a new RSS feed with just the title. Here's what im doing: I get the rss feed, use the extract action to get to the title in the rss feed, and here's where i'm having problems, extact creates a long string which cannot be parsed into an RSS feed. Is there another action that I should be using to do this? Is this possible to do in wires?