Last active
August 29, 2015 14:05
-
-
Save rdeltour/b3cb582ad4cb187dce87 to your computer and use it in GitHub Desktop.
XSLT secondary port order
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <doc>3</doc> | |
| <doc>2</doc> | |
| <doc>1</doc> | |
| <doc>5</doc> | |
| <doc>4</doc> | |
| <doc>6</doc> | |
| <doc>7</doc> | |
| <doc>8</doc> | |
| <doc>9</doc> | |
| <doc>10</doc> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <doc>1</doc> | |
| <doc>2</doc> | |
| <doc>3</doc> | |
| <doc>4</doc> | |
| <doc>5</doc> | |
| <doc>6</doc> | |
| <doc>7</doc> | |
| <doc>8</doc> | |
| <doc>9</doc> | |
| <doc>10</doc> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="1.0"> | |
| <p:output port="result" sequence="true"> | |
| <p:pipe port="secondary" step="iterator"/> | |
| </p:output> | |
| <p:xslt name="iterator" template-name="do"> | |
| <p:input port="source"> | |
| <p:empty/> | |
| </p:input> | |
| <p:input port="stylesheet"> | |
| <p:inline> | |
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> | |
| <xsl:template name="do"> | |
| <xsl:for-each select="1 to 10"> | |
| <xsl:result-document href="{concat('doc-',position())}"> | |
| <doc> | |
| <xsl:value-of select="position()"/> | |
| </doc> | |
| </xsl:result-document> | |
| </xsl:for-each> | |
| </xsl:template> | |
| </xsl:stylesheet> | |
| </p:inline> | |
| </p:input> | |
| <p:input port="parameters"> | |
| <p:empty/> | |
| </p:input> | |
| </p:xslt> | |
| <p:sink/> | |
| </p:declare-step> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment