XML形式を出力するPHPは下記のように、マニュアルに沿って書きました。
xml.php
コード: 全て選択
<?php require_once("cmsdesigner/include/view.php.inc"); // encoding="euc-jp" ?>
<cmsd:entrylist name="mylist" design="flash" output="xml" />
<?php cmsd_end_template(); ?>
mylist.list.flash.design.xsl
コード: 全て選択
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" encoding="EUC-JP" omit-xml-declaration="yes" indent="yes" />
<xsl:template match="/entrylist">
<xsl:for-each select="entry">
<myList title="{title}" comment="{comment}" author="{author}" update="{@date}" />
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
コード: 全て選択
<myList title="Good Day" comment="I am so happy" author="Honda" update="2007-09-09" />
<myList title="Bad Day" comment="I am not happy" author="Honda" update="2007-09-08" />
コード: 全て選択
<myList title="いい日" comment="私は幸せだ" author="本田" update="2007-09-08" />
<myList title="悪い日" comment="私は幸せじゃない" author="本田" update="2007-09-09" />
よく分かりませんが、文字コードとかの関連で正しいXMLとして認識されないのではないかと考えたのですが…どなたかご指導お願いいたします。