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

Re: Store non-well-formed HTML fragment

From: James Fuller <james.fuller.2007@gmail.com>
Date: Mon, 3 Jun 2013 08:45:20 +0200
Message-ID: <CADsXk-b51+ngiMqQN-71hfvwSnk7+yz+W9zgeqRoWmdMqHMVAg@mail.gmail.com>
To: Vivian Steller <vivian@steller.info>
Cc: xproc-dev@w3.org
take a look at this recent thread

http://lists.w3.org/Archives/Public/xproc-dev/2013May/0005.html

hth, Jim Fuller

On Sun, Jun 2, 2013 at 1:40 PM, Vivian Steller <vivian@steller.info> wrote:
> 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:empty/>
>     </p:input>
>     <p:output port="result">
>         <p:pipe port="result" step="store"/>
>     </p:output>
>     <p:xslt name="xsl">
>         <p:input port="source">
>             <p:inline>
>                 <test/>
>             </p:inline>
>         </p:input>
>         <p:input port="parameters">
>             <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 match="/">
>                         <xsl:result-document href="test.snippet.xml"
> indent="yes" omit-xml-declaration="yes" method="xml"
> exclude-result-prefixes="#all">
>                             <div>
>                                 Test
>                             </div>
>                             <p>
>                                 Test
>                             </p>
>                         </xsl:result-document>
>                     </xsl:template>
>                 </xsl:stylesheet>
>             </p:inline>
>         </p:input>
>     </p:xslt>
>     <p:sink>
>         <p:input port="source">
>             <p:pipe port="result" step="xsl"/>
>         </p:input>
>     </p:sink>
>     <p:store name="store" href="test.html">
>         <p:input port="source">
>             <p:pipe port="secondary" step="xsl"/>
>         </p:input>
>     </p:store>
> </p:declare-step>
>
> Any help is appreciated.
> Cheers,
>
> Vivian
>
Received on Monday, 3 June 2013 06:45:51 UTC

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