HiiHahWIKI - making some notes for... -
xsltサンプル:apply-template
をテンプレートにして作成
開始行:
*xsltサンプル:apply-template [#rcfc93d1]
apply-templateのサンプルです。
以下に、apply-templateしていないものとしているものを載せ...
ちなみに、xsltにかける対象はこのサイトの[[rss:http://www....
■apply-templateしてないxsltサンプル
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:rss="http://purl.org/rss/1.0/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<xsl:template match="/">
<html>
<p>xsltサンプル</p>
<lu>
<xsl:for-each select="/rdf:RDF/rss:item">
<li><xsl:value-of select="rss:title/text()"...
</xsl:for-each>
</lu>
</html>
</xsl:template>
</xsl:stylesheet>
■apply-templateしているxsltサンプル
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:rss="http://purl.org/rss/1.0/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<xsl:template match="/">
<html>
<p>xsltサンプル</p>
<lu>
<xsl:apply-templates select="/rdf:RDF/rss:item" />
</lu>
</html>
</xsl:template>
<xsl:template match="/rdf:RDF/rss:item">
<li><xsl:value-of select="rss:title/text()"...
</xsl:template>
</xsl:stylesheet>
終了行:
*xsltサンプル:apply-template [#rcfc93d1]
apply-templateのサンプルです。
以下に、apply-templateしていないものとしているものを載せ...
ちなみに、xsltにかける対象はこのサイトの[[rss:http://www....
■apply-templateしてないxsltサンプル
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:rss="http://purl.org/rss/1.0/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<xsl:template match="/">
<html>
<p>xsltサンプル</p>
<lu>
<xsl:for-each select="/rdf:RDF/rss:item">
<li><xsl:value-of select="rss:title/text()"...
</xsl:for-each>
</lu>
</html>
</xsl:template>
</xsl:stylesheet>
■apply-templateしているxsltサンプル
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:rss="http://purl.org/rss/1.0/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<xsl:template match="/">
<html>
<p>xsltサンプル</p>
<lu>
<xsl:apply-templates select="/rdf:RDF/rss:item" />
</lu>
</html>
</xsl:template>
<xsl:template match="/rdf:RDF/rss:item">
<li><xsl:value-of select="rss:title/text()"...
</xsl:template>
</xsl:stylesheet>
ページ名: