<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/xml.xsl" type="text/xsl"?><feed xmlns="http://www.w3.org/2005/Atom">
  <title>nulog, NULL::something : out of the headphone &gt; 2005 &gt; July &gt; 05</title>
  <link href="http://lowreal.net/logs/2005/07/05"/>
  <icon>http://lowreal.net/img/banner.png</icon>
  <link rel="self" type="application/atom+xml" href="http://lowreal.net/logs/2005/07/05.atom"/>
  <link rel="alternate" type="application/xhtml+xml" href="http://lowreal.net/logs/2005/07/05.xhtml"/>
  <updated>2005-07-05T15:11:22+09:00</updated>
  <author>
    <name>cho45(砂糖)</name>
  </author>
  <id>http://lowreal.net/2005/07/05</id>
  <entry>
    <title>ruby-xslt undefined reference to</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/07/05/1.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/07/05/1.xhtml"/>
    <updated>2005-07-05T13:51:07+09:00</updated>
    <published>2005-07-05T13:51:07+09:00</published>
    <id>http://lowreal.net/2005/07/05/1</id>
    <category term="web"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>何度やってもできない。わけわかんないです。-lxml2 -lxslt ついてますよ？ /lib に libxslt.dll.a libxml2.dll.a とかありますよ？</p>
        <p>つまり今うちの環境で動く <abbr title="XSL Transformations">XSLT</abbr> on Ruby はないわけですか。Ruby で <abbr title="Extensible Markup Language">XML</abbr> しちゃダメですか……</p>
        <p>にぎやかな孤独。</p>
        <ins datetime="2005-07-05T14:09:46+09:00">
          <p><q cite="http://ml.postgresql.jp/pipermail/pgsql-jp/2002-December/003307.html">ちなみに、こういうケースでは-lで指定せずに直接*.aファイルを一緒に指定するとうまくいくことがあります。裏技ですが。</q> とかいうのを見つけたのでやってみたら成功？した。</p>
          <p>Makefile の OBJS の最後に <code>/lib/libxml2.dll.a /lib/libxslt.dll.a</code> を追記。</p>
        </ins>
        <ins datetime="2005-07-05T14:20:36+09:00">
          <p>でもこれ tests/ 以下のやつ実行するとエラーでまくるんだけど……</p>
          <blockquote>
            <pre>
-\ruby-xslt\tests&gt;ruby test_parameters.rb
XPath error : Invalid expression
the first parameter ...
    ^
runtime error
Evaluating user parameter p1 failed
nil
test_parameters.rb:13:in `serve': cannot convert nil into String (TypeError)
        from test_parameters.rb:13

-\ruby-xslt\tests&gt;ruby test_functions.rb
Entity: line 1: parser error : Start tag expected, '&lt;' not found
Float
^
Entity: line 1: parser error : Start tag expected, '&lt;' not found
String
^
Entity: line 1: parser error : Start tag expected, '&lt;' not found
string
^
Entity: line 1: parser error : Start tag expected, '&lt;' not found
TrueClass
^
Entity: line 1: parser error : Start tag expected, '&lt;' not found
Array
^

1 is a Float and becomes 1
'string' is a String and becomes string
true() is a TrueClass and becomes true
nodes are type Array and are passed through:
        Hello, (1)


        World!(2)
'
</pre>
          </blockquote>
          <p>なんか parameters に渡すやつが XPath 式として評価されているようだからクオートしてみたらとりあえず動くけど、一度 xslt.serve したあと、parameters に新しく値をセットして xslt.serve しても xsl:param は更新されてない。正しい挙動？　違う気がするけど、いちいち xslt インスタンス作り直せってことなんだろうか？</p>
          <p>function のほうはよくわからない。function からの返り値を <abbr title="Extensible Markup Language">XML</abbr> として評価しているように見える。<ins datetime="2005-07-05T15:03:50+09:00">そのようだ。<code class="Ruby">"&lt;dummy&gt;" +arg.class.to_s + "&lt;/dummy&gt;"</code> とかいう文字列を返してやると string( returned value ) みたい (これは xsl:value-of の効果=xsl:value-of は最終結果を string 関数に渡す) になる。おそらく node-set っぽいのを返したりできるようになってる？</ins></p>
        </ins>
      </div>
    </content>
  </entry>
  <entry>
    <title>髪を切る場所が嫌いだ。</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/07/05/2.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/07/05/2.xhtml"/>
    <updated>2005-07-05T14:15:09+09:00</updated>
    <published>2005-07-05T14:15:09+09:00</published>
    <id>http://lowreal.net/2005/07/05/2</id>
    <category term="life"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>伸びてきてうざったいので切りたいけれど、床屋とか、美容院とか嫌いなんだ。ほんとに、心のそこから嫌い。髪を切ってるときに話しかけてくるとか、あるいはずっと黙っているとか、どっちの雰囲気もダメだ。</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>プログラミングの仕方</title>
    <link rel="alternate" type="text/html" href="http://lowreal.net/logs/2005/07/05/3.html"/>
    <link rel="alternate" type="application/xml+xhtml" href="http://lowreal.net/logs/2005/07/05/3.xhtml"/>
    <updated>2005-07-05T15:11:22+09:00</updated>
    <published>2005-07-05T15:11:22+09:00</published>
    <id>http://lowreal.net/2005/07/05/3</id>
    <category term="web"/>
    <category term="prog"/>
    <content type="xhtml" xml:base="http://lowreal.net/">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>プログラム書くとき最初になにをすればいいか忘れてしまった……最終的にサイトから <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> を排除したい。ということで日記のスクリプトを Ruby に移植・再編するんだけど、どうすればいいかなぁ。</p>
      </div>
    </content>
  </entry>
</feed>
