RSS2CDF
をテンプレートにして作成
[
トップ
|
一覧
|
単語検索
|
最終更新
|
バックアップ
|
ヘルプ
]
開始行:
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rss="http://purl.org/rss/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
exclude-result-prefixes="rdf rss dc">
<xsl:output
method="xml"
encoding="UTF-8" />
<xsl:template match="/">
<xsl:apply-templates select="/rdf:RDF/rss:channel" />
</xsl:template>
<xsl:template match="rss:channel">
<CHANNEL HREF="{rss:link}">
<TITLE><xsl:value-of select="rss:title" /></TITLE>
<ABSTRACT><xsl:value-of select="rss:description" /></...
<xsl:apply-templates select="//rss:item" />
</CHANNEL >
</xsl:template>
<xsl:template match="rss:item">
<ITEM HREF="{rss:link}" LASTMOD="{dc:date}">
<TITLE><xsl:value-of select="rss:title" /></TITLE>
<ABSTRACT><xsl:value-of select="rss:description" /></...
</ITEM>
</xsl:template>
</xsl:stylesheet>
-[[RDF Site Summary (RSS) 1.0:http://web.resource.org/rss...
-[[How to Create Channel Definition Format (CDF) Files:ht...
----
<?php
$url = $_GET["rss"];
$rss = get_data($url);
$cdf = convert_rss2cdf($rss);
header("Content-Type: application/x-netcdf; charset=UTF-...
echo $cdf;
function get_data($url) {
$ch = curl_init($url);
ob_start();
curl_exec($ch);
curl_close($ch);
$data = ob_get_contents();
ob_end_clean();
return $data;
}
function convert_rss2cdf($rss) {
$xsl = "rss2cdf.xsl";
$xslt = xslt_create();
$cdf = xslt_process($xslt, "arg:/_rss", $xsl, NULL, arr...
xslt_free($xslt);
return $cdf;
}
?>
----
<xsl:apply-templates select="//rss:item" />
<xsl:for-each select="rss:items/rdf:Seq/rdf:li">
<xsl:variable name="resource" select="@rdf:resource" />
<xsl:apply-templates select="//rss:item[@rdf:about=$res...
</xsl:for-each>
>Note that items appearing in the document but not as mem...
終了行:
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rss="http://purl.org/rss/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
exclude-result-prefixes="rdf rss dc">
<xsl:output
method="xml"
encoding="UTF-8" />
<xsl:template match="/">
<xsl:apply-templates select="/rdf:RDF/rss:channel" />
</xsl:template>
<xsl:template match="rss:channel">
<CHANNEL HREF="{rss:link}">
<TITLE><xsl:value-of select="rss:title" /></TITLE>
<ABSTRACT><xsl:value-of select="rss:description" /></...
<xsl:apply-templates select="//rss:item" />
</CHANNEL >
</xsl:template>
<xsl:template match="rss:item">
<ITEM HREF="{rss:link}" LASTMOD="{dc:date}">
<TITLE><xsl:value-of select="rss:title" /></TITLE>
<ABSTRACT><xsl:value-of select="rss:description" /></...
</ITEM>
</xsl:template>
</xsl:stylesheet>
-[[RDF Site Summary (RSS) 1.0:http://web.resource.org/rss...
-[[How to Create Channel Definition Format (CDF) Files:ht...
----
<?php
$url = $_GET["rss"];
$rss = get_data($url);
$cdf = convert_rss2cdf($rss);
header("Content-Type: application/x-netcdf; charset=UTF-...
echo $cdf;
function get_data($url) {
$ch = curl_init($url);
ob_start();
curl_exec($ch);
curl_close($ch);
$data = ob_get_contents();
ob_end_clean();
return $data;
}
function convert_rss2cdf($rss) {
$xsl = "rss2cdf.xsl";
$xslt = xslt_create();
$cdf = xslt_process($xslt, "arg:/_rss", $xsl, NULL, arr...
xslt_free($xslt);
return $cdf;
}
?>
----
<xsl:apply-templates select="//rss:item" />
<xsl:for-each select="rss:items/rdf:Seq/rdf:li">
<xsl:variable name="resource" select="@rdf:resource" />
<xsl:apply-templates select="//rss:item[@rdf:about=$res...
</xsl:for-each>
>Note that items appearing in the document but not as mem...
ページ名: