XProc/Simple Pipe

From Wikibooks, open books for an open world
Jump to: navigation, search


You want to create a pipeline that runs a simple XSLT tranform.

Source Code[edit]

<p:pipeline xmlns:p="http://www.w3.org/ns/xproc">
        <!-- Simple XML Source (inline) -->
        <p:input port="source">
                <xml>Inline XML conversion with inline XSLT using XProc</xml>
        <!-- XSLT Transform (inline) -->
        <p:input port="stylesheet">
                <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    <xsl:output method="xml" indent="yes" encoding="UTF-8" />
                        <xsl:output method="xhtml"
                        transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0
                        Transitional// EN" indent="yes" />
                    <xsl:template match="/xml">
                                <title>XSLT to XHTML via XProc</title>
                                    <xsl:value-of select="." />