-
-
Save mkraetke/7c71ef2bbfdb55094f56651633caf3f8 to your computer and use it in GitHub Desktop.
XProc pipeline with p:insert and language tagging.
This file contains 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" | |
xmlns:c="http://www.w3.org/ns/xproc-step" | |
version="1.0"> | |
<p:input port="source"> | |
<p:inline> | |
<doc xml:lang="de-DE"> | |
<p>Ein deutscher Textschnipsel.</p> | |
</doc> | |
</p:inline> | |
</p:input> | |
<p:output port="result"/> | |
<p:insert match="/doc" position="first-child"> | |
<p:input port="insertion" select="/doc/p"> | |
<p:inline> | |
<doc xml:lang="en-EN"> | |
<p>An English text snippet.</p> | |
</doc> | |
</p:inline> | |
</p:input> | |
</p:insert> | |
</p:declare-step> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment