Out of Memory

本ブログは更新を停止しました。Aerieをよろしくお願いいたします。

目次

Blog 利用状況

ニュース

2009年3月31日
更新を停止しました。引き続きAerieを御愛顧くださいませ。
2009年2月3日
原則としてコメント受付を停止しました。コメントはAerieまでお願いいたします。
詳細は2月3日のエントリをご覧ください。
2008年7月1日
Microsoft MVP for Developer Tools - Visual C++ を再受賞しました。
2008年2月某日
MVPアワードがVisual C++に変更になりました。
2007年10月23日
blogタイトルを変更しました。
2007年7月1日
Microsoft MVP for Windows - SDKを受賞しました!
2007年6月20日
スキル「ニュース欄ハック」を覚えた!
2006年12月14日
記念すべき初エントリ
2006年12月3日
わんくま同盟に加盟しました。

カレンダー

中の人

αετο? / aetos / あえとす

シャノン? 誰それ。

顔写真

埼玉を馬鹿にする奴は俺が許さん。

基本的に知ったかぶり。興味を持った技術に手を出して、ちょっと齧りはするものの、それを応用して何か形にするまでは及ばずに飽きて放り出す人。

書庫

日記カテゴリ

OPML 生成 XSLT

RSS の URI から OPML を作る XSLT。
各エントリごとに document 関数でネットの向こうへ RSS を取りに行くので、<?xml-stylesheet?> で使うのは激しく非推奨。
一度 XSLT プロセッサに通して静的な OPML にするが吉。

生成する OPML は 2.0。
対応フィードは RSS 1.0 と RSS 2.0。Atom には対応してません。

<?xml version="1.0" encoding="UTF-16" standalone="yes" ?> 
<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:opml="http://opml.org/spec2"
 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" version="1.0" encoding="UTF-16"
  omit-xml-declaration="no" standalone="yes" indent="yes" media-type="application/opml+xml"/>
 
 <xsl:template match="/opml:opml">
  <xsl:copy>
   <xsl:attribute name="version">2.0</xsl:attribute>
   <xsl:attribute name="xml:lang">ja-JP</xsl:attribute>
   <xsl:apply-templates/>
  </xsl:copy>
 </xsl:template>
 
 <xsl:template match="//opml:outline[@type='rss']">
  <xsl:copy>
   <xsl:attribute name="type">rss</xsl:attribute>
   <xsl:attribute name="xmlUrl"><xsl:value-of select="@xmlUrl"/></xsl:attribute>
   <xsl:apply-templates select="document(@xmlUrl)"/>
  </xsl:copy>
 </xsl:template>
 
 <xsl:template match="/rss[@version='2.0']/channel">
 
  <xsl:attribute name="title"><xsl:value-of select="title"/></xsl:attribute>
  <xsl:attribute name="text"><xsl:value-of select="title"/></xsl:attribute>
  <xsl:attribute name="htmlUrl"><xsl:value-of select="link"/></xsl:attribute>
  <xsl:attribute name="description"><xsl:value-of select="description"/></xsl:attribute>
  <xsl:attribute name="version">RSS</xsl:attribute>
  <xsl:attribute name="language"><xsl:value-of select="language"/></xsl:attribute>
  
 </xsl:template>
 
 <xsl:template match="/rdf:RDF/rss:channel">
 
  <xsl:attribute name="title"><xsl:value-of select="rss:title"/></xsl:attribute>
  <xsl:attribute name="text"><xsl:value-of select="rss:title"/></xsl:attribute>
  <xsl:attribute name="htmlUrl"><xsl:value-of select="rss:link"/></xsl:attribute>
  <xsl:attribute name="description"><xsl:value-of select="rss:description"/></xsl:attribute>
  <xsl:attribute name="version">RSS1</xsl:attribute>
  <xsl:attribute name="language"><xsl:value-of select="dc:language"/></xsl:attribute>
 
 </xsl:template>
 
 <xsl:template match="//opml:*[not (name()='outline' and @type = 'rss' )]">
  <xsl:copy>
   <xsl:copy-of select="@*"/>
   <xsl:apply-templates/>
  </xsl:copy>
 </xsl:template>
 
 <xsl:template match="text() | @*"/>
</xsl:stylesheet>

入力ファイルは以下のような感じで。

type=rss の outline 要素に、xmlUrl から取ってきた情報を補充します。

type=rss でない outline 要素はそのまま書き出します。

<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<opml version="2.0" xmlns="http://opml.org/spec2" xml:lang="ja-JP">
 <head/>
 <body>
  <outline type="rss" xmlUrl=""/>
 </body>
</opml>

おまけでデバッグ用に作ったのが、type=rss の outline 要素から type と xmlUrl 以外の属性を除去する XSLT。

<?xml version="1.0" encoding="utf-16" standalone="yes" ?>
<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:opml="http://opml.org/spec2"
 xmlns="http://opml.org/spec2">
  <xsl:output method="xml" version="1.0" encoding="UTF-16"
  omit-xml-declaration="no" standalone="yes" indent="yes" media-type="application/opml+xml"/>
  <xsl:template match="//opml:outline[@type='rss']">
    <xsl:copy>
      <xsl:attribute name="type">rss</xsl:attribute>
      <xsl:attribute name="xmlUrl"><xsl:value-of select="@xmlUrl"/></xsl:attribute>
    </xsl:copy>
  </xsl:template>
  <xsl:template match="//opml:*[not (name()='outline' and @type = 'rss' )]">
    <xsl:copy>
      <xsl:copy-of select="@*"/>
      <xsl:apply-templates/>
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>

投稿日時 : 2008年6月25日 13:11

Feedback

# dievySild 2009/04/18 21:51 Pritutlal

7854 , http://virb.com/Buycheapansaid flurbiprofen tablets , wedvyo , http://virb.com/Buycheaprelafen nabumetone 500 mg , 8555 , http://virb.com/Buycheapcombipres Combipres , kjjjn , http://virb.com/Buycheapcoreg coreg cr , mk8vgvg , http://virb.com/Buycheapcoversyl Coversyl , htevko , http://virb.com/Buycheapdiovan Diovan , oioh , http://virb.com/Buycheaphyzaar hyzaar medication , lkjnh5yy , http://virb.com/BuycheapInderal Inderal , htevko , http://virb.com/Buycheaplozol buy lozol

# pokjhgf 2012/12/06 1:30 ghjkl;

バイアグラのhttp://xn--cckd1b8h6e.cc/ ]バイアグラの効果http://xn--cckd1b8h6e.cc/17 ]バイアグラの副作用http://xn--cckd1b8h6e.cc/33 ]
バイアグラの体験談http://xn--cckd1b8h6e.cc/100 ]バイアグラの価格http://xn--cckd1b8h6e.cc/106 ]バイアグラとシアリスhttp://xn--cckd1b8h6e.cc/130 ]

# NbsHVNEdCYZh 2015/01/06 5:46 sammy

fECP7C http://www.QS3PE5ZGdxC9IoVKTAPT2DBYpPkMKqfz.com

# JqkcePNuVEpuGQFe 2015/01/28 15:18 Roberto

I can't stand football http://kyoorius.com/publications/ lexotanil online shop It wasn't until Thursday afternoon when the Johns returned home and saw the girl's photographs on the news that they made a connection. After confirming with the Youngs, Mark John immediately called Idaho State Police, setting off the investigation in Idaho.

# QYvqkRgzCDa 2015/01/28 15:18 Mya

How do you spell that? http://www.beachinthecity.com/index.php/programm buy limovan online A: In general doctors aren&rsquo;t allowed to complain. We&rsquo;re trained in residency to go without eating and sleep and grind it out by putting our patient&rsquo;s needs before our own. But in this environment the balancing rewards are diminishing. I&rsquo;m worried that our profession won&rsquo;t continue to attract the brightest minds in the future. A democracy requires an educated voter and I didn&rsquo;t think people knew enough about the Affordable Care Act to have a good understanding of what direction our country is going. I hoped I could reach people with realistic fiction and show them in an entertaining way what&rsquo;s happening, like &ldquo;Uncle Tom&rsquo;s Cabin&rdquo; did with slavery, and help keep patients and doctors aligned. This is responsible social activism.

# SDvsFpmNIzgUmCg 2015/01/29 20:14 Magic

What line of work are you in? http://newcastlecomics.com/blog/ebay-store/ 30mg codeine phosphate �Hidden Lynx offers a 'hacker for hire' service and is unique because it is one of the most organized, sophisticated groups using cutting edge hacking techniques to access information from organizations in some of the most technically advanced countries,� Narang said.

# ERIdgAFYHe 2015/02/07 16:23 Barney

I work for a publishers http://www.wonderbra.ca/my-favorites/ 25 mg tenormin As Fiona herself breezily says on the show, she introduced the �truncated three-minute sessions so we could so do some real work instead of the self-indulgent blather that occupies a 50-minute session.� And also so she could hopefully make some more money in the process.

# rRuNdJcTIutlZylllw 2015/02/09 17:47 Graig

Where do you live? http://atecuccod.com/index.php/ajandektargyak cash advance 78251 "They're just proud to have that as part of their portfolio because of what it represents," says Sabatier. "It's the one thing that you can't manufacture. ... It took many, many years to earn the reputation or stature or legacy of the Globe or the L.A. Times or the Wall Street Journal or the Washington Post."

# HPfMvksZpKmf 2015/02/09 17:47 Frederic

Jonny was here http://atecuccod.com/index.php/hogyan-vasaroljon cash fast loan oregon There is an adage which states: Praise publicly, criticize privately. But while this practice may circumvent some awkward embarrassment in group situations, it does more harm than good. Private feedback undermines individual accountability among teams and it wastes important teachable moments.

# iGtHIFQNLTkWvKYWsCH 2015/02/09 17:47 Infest

How do you do? http://atecuccod.com/index.php/kapcsolat loan over 10 years FRANKFURT, July 30 (Reuters) - France's Air Liquide and Germany's Linde, the world's two biggestindustrial gases producers, saw their strategy of expandingtheir healthcare businesses pay off in the second quarter.

# hqQoDnydJpmheTJOD 2015/02/09 17:48 Tracy

I'm retired http://atecuccod.com/index.php/nyomtatas homeowner personal loan "We&rsquo;re looking to get maximum batting points and then see what we want to do from there," Horton said. "We want to take 20 wickets to win the match so we can&rsquo;t bat on for too long. It depends how the morning pans out.

# xlzaCtTNVrGWCxYQM 2015/02/10 0:00 David

Recorded Delivery http://www.johnlittle.com.sg/corporate.php betamethasone injection �Derek would have had himself here last week,� Girardi said. �That�s the bottom line. You have to trust the people that are watching him. There�s not really a lot of (pleading) going on. It�s just he has to play in some games.... We all understand that and we have to make sure he�s ready.�

# IrvOKiRThsA 2015/02/11 1:59 Lindsey

I'll text you later https://josbinder.at/index.php?nav=37 personal loan bad credit no job Environmentalist Bill McKibben, who is leading a call forusing only renewable energy, was one of the first to behandcuffed. He had earlier joined Richmond Mayor GayleMcLaughlin in a rally, one in a series across the nation overthe environmental consequences of continuing to burn oil and toprotest TransCanada Corp's proposed Keystone XLpipeline.

# mkDDFhQKALZz 2015/02/11 5:43 Julia

How do I get an outside line? http://broadcastmedia.co.uk/communications-training Buy Famvir The most unusual thing it does is that gives manufacturers the opportunity to update what he called the "software bundle" -- more commonly known as bloatware -- because Pokki can be used to recommend software.

# rYmPsidVnuWNfXRp 2015/02/11 5:43 Andrew

Get a job http://broadcastmedia.co.uk/communications-training Famciclovir Famvir So the next time a president wants to shift strategy perhaps they should consider sidling rather than pivoting. In other words, instead of declaring such a big shift in public pronouncements perhaps it is better to just do so quietly working with allies and slowly and gradually showing up. This would also be better public diplomacy vis-a-vis China by not explicitly shifting the crosshairs of such a strategy directly on them. The arrival of such forces will be noticed, it will send the same signal, but it will be more in the Teddy Roosevelt tradition of speaking softly and carrying a big stick. That certainly seems to be better policy prescription than doing the opposite.

# HVbziMoUNqYpHLp 2015/02/11 5:43 Diva

In a meeting http://www.testwall.com/products/ Tricor Mg The campaign's effect on luxury spending has been hard tomeasure, analysts say. But a survey of Chinese consumers by CLSAfound that roughly 30 percent said they would curb theirspending on jewelry and watches in the event of anyanti-corruption campaign.

# jXxMoHMvNeOloQET 2015/02/12 10:38 Anthony

The line's engaged http://www.groteverhalen.info/index.php/agenda direct cash lender only The Central Methodist Mission in downtown Johannesburg has offered shelter and job advice for thousands of Zimbabweans who fled the political violence and economic stagnation that followed the last presidential poll in 2008.

# QozdMcqhyKBh 2015/02/25 3:25 Chong

Three years http://www.horsdoeuvres.fr/contact/ glucophage 500mg The Nets and Knicks have an opportunity to capture the city�s attention for the winter, especially if the two football teams continue to fail. But there was a greater realization Monday that this will require winning beyond New York, as Brooklyn players downplayed the predictable questions about �Honey Nut Cheerios� and besting the Knicks.

# WkKFdZLDnMv 2015/02/25 3:25 Mckinley

I need to charge up my phone http://martinimandate.com/tag/boston-marathon/ can you order gabapentin online It's a responsibility that goes back to the founding of the republic. The framers, in Article I, Section 8 gave Congress the power "To promote the Progress of Science and useful Arts, by securing for limited Times to Authors and Inventors the exclusive Right to their respective Writings and Discoveries."

# yrNKtyxqjVngqTJg 2015/02/28 20:31 Dwight

I can't get a dialling tone http://www.paroissestpaul.ca/nous-joindre.html Buy Ranitidine Online There are conflicting stories concerning the Knicks� interest in the 33-year-old forward from Queensbridge. A person familiar with the club�s thinking says that the front office is more focused on adding another big man and a point guard. There were internal discussions regarding World Peace last week when rumors surfaced that he might become an amnesty casualty, but the Knicks� brain trust did not reach a conclusion about whether to pursue him.

# tWkgolUmUUBlv 2015/04/07 9:34 Douglass

A financial advisor http://www.holysoakers.com/agence/ order ivermectin Warner, who lives in suburban Chicago and is the sole owner of TY Inc., still faces the prospect of time behind bars. A conviction on a federal tax evasion charge carries a maximum five-year prison sentence.

# qeWsjpTtIjIkO 2015/04/08 11:50 Diva

Photography http://www.europanova.eu/tag/erasmus/ generic careprost Running on two priority road axes on the mainland, the network will link major ports and cities including Stranraer, Liverpool, Holyhead, Birmingham, Felixstowe, Leeds and Kingston upon Hull with connections to existing networks in Dublin and Belfast in Eire and Northern Ireland.

# zsMtJKiDWiTaAY 2015/04/08 11:50 Reggie

I quite like cooking http://www.europanova.eu/partenaires/ latisse prescription price �We want to send the clearest possible message: Now is thetime to move,� Kim said at a press conference in Washington.Emerging markets �have a two or three months� window� beforethe Fed starts scaling back its $85 billion in monthly bondpurchases.

# BqEleQpfIFjhgoXq 2015/05/03 0:24 chaba

sMCdQb http://www.FyLitCl7Pf7kjQdDUOLQOuaxTXbj5iNG.com

# continuously i used to read smaller articles that as well clear their motive, and that is also happening with this paragraph which I am reading here. 2019/04/25 19:56 continuously i used to read smaller articles that

continuously i used to read smaller articles that as well clear
their motive, and that is also happening with this paragraph which I am reading here.

タイトル
名前
Url
コメント