|
Subject: [xsl] Dynamic pipelining in XSLT 2.0 w/ Saxon extensions From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 18 Jun 2007 17:19:54 -0400 |
<xsl:variable name="processes">
<m:path>stylesheets/</m:path>
<m:step>one.xsl</m:step>
<m:step>two.xsl</m:step>
<m:step>three.xsl</m:step>
<m:done/>
</xsl:variable><?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://saxon.sf.net/" xmlns:m="http://mulberrytech.com/local/xslt" version="2.0" extension-element-prefixes="saxon" exclude-result-prefixes="m">
<xsl:variable name="processes">
<m:path>./</m:path>
<m:step>one.xsl</m:step>
<m:step>two.xsl</m:step>
<m:step>three.xsl</m:step>
<m:done/>
</xsl:variable> <xsl:template match="/">
<xsl:apply-templates select="$processes/m:step[1]">
<xsl:with-param name="in" select="/"/>
</xsl:apply-templates>
</xsl:template> <xsl:template match="m:done">
<xsl:param name="in"/>
<xsl:copy-of select="$in"/>
</xsl:template> <xsl:template match="/" mode="annotate">
<xsl:param name="stylesheet" select="'not given'"/>
<xsl:comment>
<!-- adding a comment to the top of the result -->
<xsl:text> process run: </xsl:text>
<xsl:value-of select="$stylesheet"/>
</xsl:comment>
<xsl:text>
</xsl:text>
<xsl:copy-of select="node()"/>
</xsl:template><?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="*">
<xsl:element name="{local-name()}-one">
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:element>
</xsl:template> <xsl:template match="comment() | processing-instruction()">
<xsl:copy-of select="."/>
</xsl:template>Comments welcome, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Preference rules for /som, Abel Braaksma | Thread | Re: [xsl] Dynamic pipelining in XSL, M. David Peterson |
| Re: [xsl] Preference rules for /som, Wendell Piez | Date | Re: [xsl] Dynamic pipelining in XSL, M. David Peterson |
| Month |