Revision: 79 Author: matt Date: 2006-08-13 02:18:36 +0000 (Sun, 13 Aug 2006)
Log Message: ----------- XSLT demo stylesheets Added Paths: ----------- trunk/demo/xslt/stylesheets/01.xsl trunk/demo/xslt/stylesheets/02_include.xsl trunk/demo/xslt/stylesheets/02_include_inc.xsl trunk/demo/xslt/stylesheets/03_document_1arg.xsl trunk/demo/xslt/stylesheets/04_document_2args.xsl trunk/demo/xslt/stylesheets/05_params.xsl trunk/demo/xslt/stylesheets/identity.xsl Added: trunk/demo/xslt/stylesheets/01.xsl =================================================================== --- trunk/demo/xslt/stylesheets/01.xsl 2006-08-13 02:16:28 UTC (rev 78) +++ trunk/demo/xslt/stylesheets/01.xsl 2006-08-13 02:18:36 UTC (rev 79) @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + +<xsl:template match="root"> +<root>Child text added</root> +</xsl:template> + +</xsl:stylesheet> + Added: trunk/demo/xslt/stylesheets/02_include.xsl =================================================================== --- trunk/demo/xslt/stylesheets/02_include.xsl 2006-08-13 02:16:28 UTC (rev 78) +++ trunk/demo/xslt/stylesheets/02_include.xsl 2006-08-13 02:18:36 UTC (rev 79) @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + +<xsl:template match="root"> +<root>Child text added</root> +</xsl:template> + +<xsl:include href="02_include_inc.xsl"/> + +</xsl:stylesheet> + Added: trunk/demo/xslt/stylesheets/02_include_inc.xsl =================================================================== --- trunk/demo/xslt/stylesheets/02_include_inc.xsl 2006-08-13 02:16:28 UTC (rev 78) +++ trunk/demo/xslt/stylesheets/02_include_inc.xsl 2006-08-13 02:18:36 UTC (rev 79) @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + +<xsl:template match="root"> +<root>Included overrides default</root> +</xsl:template> + +</xsl:stylesheet> + Added: trunk/demo/xslt/stylesheets/03_document_1arg.xsl =================================================================== --- trunk/demo/xslt/stylesheets/03_document_1arg.xsl 2006-08-13 02:16:28 UTC (rev 78) +++ trunk/demo/xslt/stylesheets/03_document_1arg.xsl 2006-08-13 02:18:36 UTC (rev 79) @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + +<xsl:template match="root"> +<root> + <xsl:copy-of select="document('03_document.xml')"/> +</root> +</xsl:template> + +</xsl:stylesheet> + Added: trunk/demo/xslt/stylesheets/04_document_2args.xsl =================================================================== --- trunk/demo/xslt/stylesheets/04_document_2args.xsl 2006-08-13 02:16:28 UTC (rev 78) +++ trunk/demo/xslt/stylesheets/04_document_2args.xsl 2006-08-13 02:18:36 UTC (rev 79) @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + +<xsl:template match="root"> +<root> + <xsl:copy-of select="document('04_document.xml', /)"/> +</root> +</xsl:template> + +</xsl:stylesheet> + Added: trunk/demo/xslt/stylesheets/05_params.xsl =================================================================== --- trunk/demo/xslt/stylesheets/05_params.xsl 2006-08-13 02:16:28 UTC (rev 78) +++ trunk/demo/xslt/stylesheets/05_params.xsl 2006-08-13 02:18:36 UTC (rev 79) @@ -0,0 +1,13 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + +<xsl:param name="p1">no value</xsl:param> +<xsl:param name="p2">no value</xsl:param> +<xsl:template match="root"> +<root> + <xsl:value-of select="concat( $p1, ' ', $p2 )"/> +</root> +</xsl:template> + +</xsl:stylesheet> + Added: trunk/demo/xslt/stylesheets/identity.xsl =================================================================== --- trunk/demo/xslt/stylesheets/identity.xsl 2006-08-13 02:16:28 UTC (rev 78) +++ trunk/demo/xslt/stylesheets/identity.xsl 2006-08-13 02:18:36 UTC (rev 79) @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + +<xsl:output method="html"/> + +<xsl:template match="*|@*"> + <xsl:copy> + <xsl:apply-templates select="@*"/> + <xsl:apply-templates/> + </xsl:copy> +</xsl:template> + +</xsl:stylesheet> +