アプリ版:「スタンプのみでお礼する」機能のリリースについて

始めまして。勉強中の者です。
以下の結果
http://api.tabelog.com/Ver1/RestaurantSearch/?La …

を見やすくHTMLで表示されるにはどのような仕組みにすれば良いのでしょうか?
PHP5の環境です。どのようにすれば、通常のウェブページのように表示されるのでしょうか?
いまいち仕組みが分かりません。ご教授願います。

A 回答 (2件)

突っ込まれる前に回答がヤバイので自己突っ込み



最初横で作ろうとして後から縦に変えた時に消し忘れました
colgroup全部削除です。(XSLT)
    • good
    • 0

回答じゃなくてすまん。


PHP5指定なのでPHPカテで出した方が回答付きやすいかもしれない

#俺はPHPは書けないので今まで回答せず静観していた。XSLTは書いてたんだけどねぇ・・・(以下)
#なお、できることなら新たな質問を立ち上げるときには【この回答にはポイントを付けずに】締め切って欲しい
===========

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="xml" version="1.0" encoding="UTF-8" standalone="yes" omit-xml-declaration="yes"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
indent="yes"
media-type="text/html" />

<xsl:template match="/">
<html>
<head>
<title>食べログAPIサンプル</title>
<style>
table{
margin:0 auto;
border-style:solid;
}

tbody{
margin:0 auto;
}

th,td {
border-style:solid;
text-align:center;
}
</style>
</head>
<body>
<xsl:apply-templates select="RestaurantInfo" />
</body>
</html>
</xsl:template>

<xsl:template match="Item">
<table>
<xsl:attribute name="id">RestaurantInfo<xsl:value-of select="position()" /></xsl:attribute>
<caption><xsl:value-of select="RestaurantName" /></caption>
<colgroup>
<col class="TabelogUrl" />
</colgroup>
<colgroup>
<col class="TotalScore" />
</colgroup>
<colgroup>
<col class="TasteScore" />
</colgroup>
<colgroup>
<col class="ServiceScore" />
</colgroup>
<colgroup>
<col class="MoodScore" />
</colgroup>
<colgroup>
<col class="Situation" />
</colgroup>
<colgroup>
<col class="DinnerPrice" />
</colgroup>
<colgroup>
<col class="LunchPrice" />
</colgroup>
<colgroup>
<col class="Address" />
</colgroup>
<colgroup>
<col class="Tel" />
</colgroup>
<colgroup>
<col class="BusinessHours" />
</colgroup>
<colgroup>
<col class="Holiday" />
</colgroup>
<tbody>
<tr><th>食べログURL</th><td><a><xsl:attribute name="href"><xsl:value-of select="TabelogUrl" /></xsl:attribute><xsl:value-of select="TabelogUrl" /></a></td></tr>
<tr><th>総合評価</th><td><xsl:value-of select="TotalScore" /></td></tr>
<tr><th>料理・味</th><td><xsl:value-of select="TasteScore" /></td></tr>
<tr><th>サービス</th><td><xsl:value-of select="ServiceScore" /></td></tr>
<tr><th>雰囲気</th><td><xsl:value-of select="MoodScore" /></td></tr>
<tr><th>おすすめシチュエーション</th><td><xsl:value-of select="Situation" /></td></tr>
<tr><th>ディナーの値段</th><td><xsl:value-of select="DinnerPrice" /></td></tr>
<tr><th>最寄り駅</th><td><xsl:value-of select="LunchPrice" /></td></tr>
<tr><th>住所</th><td><xsl:value-of select="Address" /></td></tr>
<tr><th>連絡先電話番号</th><td><xsl:value-of select="Tel" /></td></tr>
<tr><th>営業時間</th><td><xsl:value-of select="BusinessHours" /></td></tr>
<tr><th>定休日</th><td><xsl:value-of select="Holiday" /></td></tr>
<!--多分LongtitudeとLatitudeはGoogle Mapsに渡すパラメータだが,コーディング経験ないので省略-->
</tbody>
</table>
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!