XSL/XSLTat PHP
XSL/XSLT - 暇つぶし2ch204:nobodyさん
03/09/26 22:18
>>203
整形式にしなきゃいけないのは変換前のほうなんだが。

本当にやりたいことは別にあるんじゃないかとも思うが、
とりあえず、親要素を???とすれば、こんな感じ。
<xsl:template match="???">
<div class="section">
<xsl:apply-templates select="date" />
<div class="subsection">
<xsl:apply-templates select="title" />
<xsl:apply-templates select="p" />
</div>
</div>
</xsl:template>
<xsl:template match="date"><h2><xsl:xsl:apply-templates /></h2></xsl:template>
<xsl:template match="title"><h3><xsl:xsl:apply-templates /></h3></xsl:template>
<xsl:template match="p"><p><xsl:xsl:apply-templates /></p></xsl:template>


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch