hi,
below is the script and related intermediate xml result which invokes
the endpoint "
http://www.cnn.com/" and from the meta information in
resulting xml
specifically from tag given below
<link href="
http://rss.cnn.com/rss/cnn_latest.rss"
title="CNN - Recent Stories [RSS]" type="application/rss+xml"
rel="alternate"/> i am trying to match type of this link tag with
"application/rss+xml".
but when i am running this script nothing is the output.. it gives me
blank output in the browser and also while running it with emmlclient
on the console.
one more thing is.. when i m invoking just directinvoke tag without
filter then in the browser with view source i m not getting full xml
result, but with the emmlclient i m getting the full xml response. so
can that be the source of error?
MY SCRIPT
<mashup xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.openemml.org/2009-04-15/
EMMLSchema ../schemas/EMMLSpec.xsd"
xmlns="
http://www.openemml.org/2009-04-15/EMMLSchema"
name="FeedAutoDiscovery">
<output name="result" type="document"/>
<variables>
<variable name="temp" type="document"/>
<variable name="var1" type="string" default="application/rss+xml"/>
<variable name="temp2" type="document"/>
</variables>
<directinvoke endpoint="
http://www.cnn.com/" onerror="continue"
outputvariable="temp"/>
<display message="the temp2 variable=" expr="$temp/html/head[link
[@type=$var1]]"/>
<filter inputvariable="$temp" filterexpr="/html/head[link[@type=
$var1]]" outputvariable="result"/>
</mashup>
INTERMEDIATE XML RESPONSE
xml after invoking the endpoint "
http://www.cnn.com/"
<html xmlns="
http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta content="HTML Tidy, see
www.w3.org" name="generator"/>
<title>CNN.com - Breaking News, U.S., World, Weather,
Entertainment & Video News</title>
<meta content="1800;url=?refresh=1" http-equiv="refresh"/>
<meta
content="CNN.com delivers the latest breaking news and
information on the latest top stories, weather, business,
entertainment, politics, and more. For in-depth coverage, CNN.com
provides special reports, video, audio, photo galleries, and
interactive guides." name="Description"/>
<meta
content="CNN, CNN news, CNN.com, CNN TV, news, news online,
breaking news, U.S. news, world news, weather, business, CNN Money,
sports, politics, law, technology, entertainment, education, travel,
health, special reports, autos, developing story, news video, CNN
Intl" name="Keywords"/>
<link href="
http://rss.cnn.com/rss/cnn_topstories.rss"
title="CNN - Top Stories [RSS]" type="application/rss+xml"
rel="alternate"/>
<link href="
http://rss.cnn.com/rss/cnn_latest.rss"
title="CNN - Recent Stories [RSS]" type="application/rss+xml"
rel="alternate"/>
<meta content="text/html; charset=iso-8859-1" http-equiv="content-
type"/>
<link href="
http://i.cdn.turner.com/cnn/.element/css/2.0/
common.css"
type="text/css" rel="stylesheet"/>
<link href="
http://i.cdn.turner.com/cnn/.element/css/2.0/main.css"
type="text/css" rel="stylesheet"/>
<script type="text/javascript"> if(window.top!=window.self)
{
if(document.cookie.indexOf('rfrshchck=')!=-1)
{
window.top.location=window.self.location;
}
document.cookie='rfrshchck=1';
}
</script>
<script type="text/javascript" src="
http://i.cdn.turner.com/
cnn/.element/js/2.0/scripts/prototype.js"/>
<script type="text/javascript" src="
http://i.cdn.turner.com/
cnn/.element/js/2.0/scripts/scriptaculous.js?load=effects"/>
<script type="text/javascript" src="
http://i.cdn.turner.com/
cnn/.element/js/2.0/csiManager.js"/>
<script type="text/javascript" src="
http://i.cdn.turner.com/
cnn/.element/js/2.0/StorageManager.js"/>
<script type="text/javascript" src="
http://i.cdn.turner.com/
cnn/.element/js/2.0/local.js"/>
<script type="text/javascript" src="
http://i.cdn.turner.com/
cnn/.element/js/2.0/main.js"/>
<link href="
http://i.cdn.turner.com/cnn/apple-touch-icon.png"
rel="apple-touch-icon"/>
<link title="CNN.com" href="/tools/search/cnncom.xml"
type="application/opensearchdescription+xml" rel="search"/>
<link title="CNN.com Video" href="/tools/search/cnncomvideo.xml"
type="application/opensearchdescription+xml" rel="search"/>
<script language="javascript" type="text/
javascript">pagetypeTS='homepage';
var overrideVideoAd = '/cnn_adspaces/2.0/homepage/
video.postroll_emb.ad';
</script>
.
.
.