- 685 名前:nobodyさん mailto:sage [2010/02/01(月) 06:32:45 ID:???]
- >>684のスレの768が書いてるけど、XSLTって手も確かにあるね。
ざっと書くと、以下 test.xsl の内容 <xsl:stylesheet version="1.0" xmlns:xsl="www.w3.org/1999/XSL/Transform" xmlns="www.w3.org/1999/xhtml"> <xsl:output encoding="utf-8" method="html" version="1.0" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" media-type="text/html" /> <xsl:template match="/"> <html> <head> <title><xsl:value-of select="/root/@title" /></title> </head> <body> <div style="margin-right: auto; margin-left: auto; width: 100%;"> <xsl:apply-templates select="/root/header" /> <div style="width: 100%; "> <xsl:apply-templates select="/root/content" /> <xsl:apply-templates select="/root/category" /> </div> <xsl:apply-templates select="/root/footer" /> </div> </body> </html> </xsl:template> <xsl:template match="header"> <div><xsl:copy-of select="node()" /></div></xsl:template> <xsl:template match="content"> <div style="float: left; width: 69%;"><xsl:copy-of select="node()" /></div></xsl:template> <xsl:template match="category"> <div style="float: right; width: 29%"><xsl:copy-of select="node()" /></div> </xsl:template> <xsl:template match="footer"><xsl:copy-of select="node()" /></xsl:template> </xsl:stylesheet>
|

|