xproc

xsl:result-document instruction throws error when invoking stylesheet with Calabash

丶灬走出姿态 提交于 2021-02-11 12:50:09
问题 I have an XSL stylesheet that looks like this: <xsl:template name="xsl:initial-template"> <xsl:for-each-group select="collection($doc-collection)//dr:description" group-by="format-date(dr:date, '[Mn]-[Y]')"> <xsl:result-document href="{current-grouping-key()}.html" method="html" indent="yes"> <xsl:call-template name="page"> <xsl:with-param name="desc" select="current-group()"/> </xsl:call-template> </xsl:result-document> </xsl:for-each-group> </xsl:template> (Variables and other templates

Source port with default fallback value?

◇◆丶佛笑我妖孽 提交于 2019-12-25 16:45:08
问题 I have an XProc step where I would like the input source to work like this: if a URL is provided on the command line using -isource=foo.xml , then the document at that URL is used as the source document; if no URL is provided, then the document default.xml should be used. Is it possible to obtain this behaviour in XProc? 回答1: As suggested by Florent on the XProc mailing list, using a p:document inside the p:input works just fine as a default. Specifying something else from outside simply

Passing document() parameter to an xslt in XProc pipeline

杀马特。学长 韩版系。学妹 提交于 2019-12-24 09:18:32
问题 I've set up an XProc pipeline wherein I have a <p:xslt> step. Amoung the parameters of this stylesheet, I have an parameter which is a document() node: This is the km_to_dita.xsl stylesheet: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dctm="http://www.documentum.com" xmlns:ale="http://www.amplexor.com/alcatel" exclude-result-prefixes="xs dctm ale" version="2.0"> <xsl:param name="conf

How to make p:xslt aggregate input from two sources

白昼怎懂夜的黑 提交于 2019-12-13 03:23:37
问题 After reading the XProc question below: XSLT with XProc - parameter binding in the required type Passing document() parameter to an xslt in XProc pipeline It seems impossible to pass document-node() type parameter to XSLT in XProc. So the only way to workaround is: generate temporary file and pass the URL of temporary file as parameter to XSLT. Look following example: big-command.xpl <?xml version="1.0" encoding="UTF-8"?> <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="http:/

Feeding output of <p:xslt> into <c:body> of HTTP PUT request in Xproc

你。 提交于 2019-12-11 12:44:32
问题 My goal for my Xproc pipeline below is to take in a source XML document, run 2 XSLT transforms with <p:xslt> steps, then feed the output XML after the 2nd <p:xslt> to the <c:body> of the <p:http-request> step: <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" primary="true"/> <p:output port="result" primary="true"/> <p:serialization port="result" indent="false" method="xml" encoding="utf-8" omit-xml-declaration

How to generate doctype declarations dynamically in XProc?

烂漫一生 提交于 2019-12-08 00:53:43
问题 Requirement: Is to add correct Doctype declaration on the output xml [The root element of the input xml can be chapter or section element]. For Instance, consider the chapter element public identifier is PUBLIC "-//OASIS//DTD DocBook Chap XML V4.5//EN" and system identifier is "chap.dtd". Simillary for section element public identifier is PUBLIC "-//OASIS//DTD DocBook Sec XML V4.5//EN" and system identifier is "sec.dtd". Input XML1: chapter.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE

XML streaming with XProc

孤者浪人 提交于 2019-12-06 11:05:51
问题 I'm playing with xproc, the XML pipeline language and http://xmlcalabash.com/. I'd like to find an example for streaming large xml documents. for example, given the following huge xml document: <Books> <Book> <title>Book-1</title> </Book> <Book> <title>Book-2</title> </Book> <Book> <title>Book-3</title> </Book> <!-- many many.... --> <Book> <title>Book-N</title> </Book> </Books> How should I proceed to loop (streaming) over x->N documents like <Books> <Book> <title>Book-x</title> </Book> <

How to generate doctype declarations dynamically in XProc?

两盒软妹~` 提交于 2019-12-06 08:09:55
Requirement: Is to add correct Doctype declaration on the output xml [The root element of the input xml can be chapter or section element]. For Instance, consider the chapter element public identifier is PUBLIC "-//OASIS//DTD DocBook Chap XML V4.5//EN" and system identifier is "chap.dtd". Simillary for section element public identifier is PUBLIC "-//OASIS//DTD DocBook Sec XML V4.5//EN" and system identifier is "sec.dtd". Input XML1: chapter.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook Chap XML V4.5//EN" "chap.dtd"> <chapter> <title>Chapter Template

XSLT with XProc - parameter binding in the required type

会有一股神秘感。 提交于 2019-12-01 00:30:53
I'm trying to translate my batch file calling the Saxon (version 8.9) into a XProc pipeline (Calabash). This is my batch call: java -jar saxon8.jar -o out.xml in.xml style.xsl +config=config-file.cfg The parameter config is defined in the stylesheet in this way: <xsl:param name="config" as="document-node()"/> The XProc part looks like this: <p:load name="configLoad"> <p:with-option name="href" select="'config-file.cfg'"/> </p:load> <p:xslt name="config"> <p:input port="source"> <p:document href="in.xml"/> </p:input> <p:input port="parameters"> <p:inline> <c:param name="config"> <p:pipe port=

XSLT with XProc - parameter binding in the required type

一笑奈何 提交于 2019-11-30 19:27:21
问题 I'm trying to translate my batch file calling the Saxon (version 8.9) into a XProc pipeline (Calabash). This is my batch call: java -jar saxon8.jar -o out.xml in.xml style.xsl +config=config-file.cfg The parameter config is defined in the stylesheet in this way: <xsl:param name="config" as="document-node()"/> The XProc part looks like this: <p:load name="configLoad"> <p:with-option name="href" select="'config-file.cfg'"/> </p:load> <p:xslt name="config"> <p:input port="source"> <p:document