W3C home > Mailing lists > Public > xproc-dev@w3.org > June 2013

Store non-well-formed HTML fragment

From: Vivian Steller <vivian@steller.info>
Date: Sun, 2 Jun 2013 13:40:52 +0200
Message-Id: <E1476641-F015-42A1-809E-EFE0777A2213@steller.info>
To: xproc-dev@w3.org
Dear all,
is there any way to serialize non-well-formed HTML using p:store? Particularly, I'm trying to store an HTML fragment that does not have a single root node. While this works with plain XSL result-documents, XProc fails with the following error:

"XD0001 : XD0001 It is a dynamic error if a non-XML resource is produced on a step output or arrives on a step input."

This is the full pipeline:

<?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:output port="result">
        <p:pipe port="result" step="store"/>
    <p:xslt name="xsl">
        <p:input port="source">
        <p:input port="parameters">
        <p:input port="stylesheet">
                <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
                    <xsl:template match="/">
                        <xsl:result-document href="test.snippet.xml" indent="yes" omit-xml-declaration="yes" method="xml" exclude-result-prefixes="#all">
        <p:input port="source">
            <p:pipe port="result" step="xsl"/>
    <p:store name="store" href="test.html">
        <p:input port="source">
            <p:pipe port="secondary" step="xsl"/>

Any help is appreciated.


Received on Sunday, 2 June 2013 17:20:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:17:11 UTC