チュートリアル「簡単な日記を作る」でつまづいてます
チュートリアル「簡単な日記を作る」でつまづいてます
このたびCMSdesignerをみつけて試しています。
プログラムはおろかPHPの知識もないのでエラーがでるとさっぱり
わかりません。
チュートリアルの「簡単な日記帳を作る」でつまづいてしまっております。。。
http://www自分のwebサイト/nikki.php?eid=00001
を表示するところで以下のエラーがでます。
Warning: domxml_xslt_stylesheet_file() [function.domxml-xslt-stylesheet-file]: AttValue: " or ' expected in /home/always302/public_html/cmsdesigner/include/xmlutil.php.inc on line 217
Warning: domxml_xslt_stylesheet_file() [function.domxml-xslt-stylesheet-file]: attributes construct error in /home/always302/public_html/cmsdesigner/include/xmlutil.php.inc on line 217
Warning: domxml_xslt_stylesheet_file() [function.domxml-xslt-stylesheet-file]: Couldn't find end of Start Tag stylesheet line 3 in /home/always302/public_html/cmsdesigner/include/xmlutil.php.inc on line 217
Warning: domxml_xslt_stylesheet_file() [function.domxml-xslt-stylesheet-file]: Extra content at the end of the document in /home/always302/public_html/cmsdesigner/include/xmlutil.php.inc on line 217
Fatal error: Call to a member function on a non-object in /home/always302/public_html/cmsdesigner/include/xmlutil.php.inc on line 228
と記述がでてきて何もわかりません。
もし手助けいただけるならお願いします。。
本当に初心者ですみません
プログラムはおろかPHPの知識もないのでエラーがでるとさっぱり
わかりません。
チュートリアルの「簡単な日記帳を作る」でつまづいてしまっております。。。
http://www自分のwebサイト/nikki.php?eid=00001
を表示するところで以下のエラーがでます。
Warning: domxml_xslt_stylesheet_file() [function.domxml-xslt-stylesheet-file]: AttValue: " or ' expected in /home/always302/public_html/cmsdesigner/include/xmlutil.php.inc on line 217
Warning: domxml_xslt_stylesheet_file() [function.domxml-xslt-stylesheet-file]: attributes construct error in /home/always302/public_html/cmsdesigner/include/xmlutil.php.inc on line 217
Warning: domxml_xslt_stylesheet_file() [function.domxml-xslt-stylesheet-file]: Couldn't find end of Start Tag stylesheet line 3 in /home/always302/public_html/cmsdesigner/include/xmlutil.php.inc on line 217
Warning: domxml_xslt_stylesheet_file() [function.domxml-xslt-stylesheet-file]: Extra content at the end of the document in /home/always302/public_html/cmsdesigner/include/xmlutil.php.inc on line 217
Fatal error: Call to a member function on a non-object in /home/always302/public_html/cmsdesigner/include/xmlutil.php.inc on line 228
と記述がでてきて何もわかりません。
もし手助けいただけるならお願いします。。
本当に初心者ですみません
と、チュートリアルがどうなってるか覚えてないですが、簡単に書いてみます。
diaryというディレクトリを前提に。
スキーマ (diary.schema.xml
デザイン定義 (diary.entry.design.xsl
埋め込みページ (diary.php
サイトコンフィグファイル (site.config.xml
こんな感じで作るとうまく動きます。
デザイン定義ファイルなどは必ず文字コードを "UTF-8" にしてください。
diaryというディレクトリを前提に。
スキーマ (diary.schema.xml
コード: 全て選択
<?xml version="1.0" encoding="UTF-8"?>
<schema name="diary" caption="日記" >
<data name="title" type="text" output="html2" caption="タイトル" />
<data name="description" type="textarea" output="html2" caption="本文" />
</schema>
コード: 全て選択
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="EUC-JP" omit-xml-declaration="yes" />
<xsl:template match="/entry">
<div>
<h3>
<!-- スキーマで設定したtitleを表示 -->
<xsl:value-of select="title" />
</h3>
<div>
<!-- スキーマで設定したdescriptionを表示 -->
<xsl:value-of select="description" />
</div>
</div>
</xsl:template>
</xsl:stylesheet>
コード: 全て選択
<?php require_once( "cmsdesigner/include/view.php.inc" ); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="ja" xml:lang="ja" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-language" content="ja" />
<meta http-equiv="content-type" content="text/html;charset=euc-jp" />
</head>
<body>
<!-- 埋め込みタグ エントリ1件表示-->
<cmsd:entry name="diary" design="entry" />
</body>
</html>
<?php cmsd_end_template(); ?>
コード: 全て選択
<?xml version="1.0" encoding="UTF-8"?>
<site>
<entries>
<entry name="diary" schema="diary" caption="日記"/>
</entries>
</site>
デザイン定義ファイルなどは必ず文字コードを "UTF-8" にしてください。
返信ありがとうございます
記述とおり試しましたが、まだ以下のようなエラーがでます。。
どうしてでしょう??
http://www.web-acs.jp/nikki.php?eid=00002
nikki.php
<?php require_once( "cmsdesigner/include/view.php.inc" ); // encoding="euc-jp" ?>
<html>
<head>
<meta http-equiv="content-Type" content="text/html;charset=euc-jp" />
<title>テストページです</title>
</head>
<body>
テストページ<br>
<table border="1">
<tr>
<td>
メニュー部分
</td>
<td>
<cmsd:entry name="public_diary" design="default" />
</td>
</tr>
</table>
</body>
</html>
<?php cmsd_end_template(); ?>
↑秀丸を使って上記のようにコードを記述しています。
エンコードEUC-JPは日本語(EUC)を選択しているのですが違うのでしょうか?
どうしてでしょう??
http://www.web-acs.jp/nikki.php?eid=00002
nikki.php
<?php require_once( "cmsdesigner/include/view.php.inc" ); // encoding="euc-jp" ?>
<html>
<head>
<meta http-equiv="content-Type" content="text/html;charset=euc-jp" />
<title>テストページです</title>
</head>
<body>
テストページ<br>
<table border="1">
<tr>
<td>
メニュー部分
</td>
<td>
<cmsd:entry name="public_diary" design="default" />
</td>
</tr>
</table>
</body>
</html>
<?php cmsd_end_template(); ?>
↑秀丸を使って上記のようにコードを記述しています。
エンコードEUC-JPは日本語(EUC)を選択しているのですが違うのでしょうか?
Re: 返信ありがとうございます
acsさん、ご質問ありがとうございます。また、tsuさん、適切な対応いつも
ありがとうございます。
エラーメッセージが分かりにくく、ご迷惑をおかけしております。
おそらく、diary.entry.design.xsl の内容に何か問題が起きているものと
思われます。
一度、diary.entry.design.xslファイルの内容をそのままここへ引用して
頂けないでしょうか。
ありがとうございます。
エラーメッセージが分かりにくく、ご迷惑をおかけしております。
おそらく、diary.entry.design.xsl の内容に何か問題が起きているものと
思われます。
一度、diary.entry.design.xslファイルの内容をそのままここへ引用して
頂けないでしょうか。
すみません
dairy.defalt.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="html"encoding="EUC-JP"omit-xml-declaration="yes" />
<xsl:template match="/entry">
<xsl:value-of select="title" />
<xsl:value-of select="body" />
</xsl:template>
</xsl:stylesheet>
tsuさんいつもありがとうございます。
webmaster様、ご迷惑をおかけしますが、よろしくお願いします。
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"version="1.0">
<xsl:output method="html"encoding="EUC-JP"omit-xml-declaration="yes" />
<xsl:template match="/entry">
<xsl:value-of select="title" />
<xsl:value-of select="body" />
</xsl:template>
</xsl:stylesheet>
tsuさんいつもありがとうございます。
webmaster様、ご迷惑をおかけしますが、よろしくお願いします。
正しくはdairy.defalt.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="html"encoding="EUC-JP"omit-xml-declaration="yes" /> <xsl:template match="/entry"> <xsl:value-of select="title" /> <xsl:value-of select="body" /> </xsl:template> </xsl:stylesheet>
コード: 全て選択
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="EUC-JP" omit-xml-declaration="yes" />
<xsl:template match="/entry">
<xsl:value-of select="title" />
<xsl:value-of select="body" />
</xsl:template>
</xsl:stylesheet>
属性を繋げて書いてあるためのエラーだったようです。
上記で試してみて下さい。
ありがとうございます
エラーが回避されました☆
助かりました。ありがとうございます。
次のステップへとすすんでみます。
今後ともよろしくお願いします。
助かりました。ありがとうございます。
次のステップへとすすんでみます。
今後ともよろしくお願いします。