W3C home > Mailing lists > Public > xproc-dev@w3.org > January 2016

Re: newbie question on p:validate-with-xml-schema

From: Conal Tuohy <conal.tuohy@gmail.com>
Date: Tue, 12 Jan 2016 12:14:26 +1000
Message-ID: <CAErBQuQN3GWhLHwXcAsd_m0W4X_JAioLbZy3bNqtNGiP-gu0fQ@mail.gmail.com>
To: David Levy <dml.public@sbcglobal.net>
Cc: XProc Dev <xproc-dev@w3.org>
Hi David

The XML declaration is purely a serialization feature. Along with other
serialization options, it can be controlled using the serialization
attributes which can be attached to various XProc elements.

If the XML document in question is the output of your entire pipeline, you
should be able to use the p:serialization element to specify how you want
your pipeline's result port to serialize:

<p:serialization port="result" omit-xml-declaration="false"/>


Similarly, if your pipeline is itself responsible for storing the XML, e.g.
using p:store, you can control its serialization directly:

<p:store href="my-result.xml" omit-xml-declaration="false"/>

On 12 January 2016 at 03:23, David Levy <dml.public@sbcglobal.net> wrote:

> Hello,
> I have just begun experimenting with Xproc with reasonable success after a
> first day.
> I did have one question and I hope I'm not embarrassing myself. When I
> submit an XML document to p:validate-with-xml-schema, the output omits the
> XML prolog:
>         <?xml version="1.0" encoding="utf-8"?>
> causing some (easily-solved) issues in downstream processing. Or I can just
> pass the input to p:validate-with-xml-schema to downstream steps and ignore
> its output.
> But I wonder. Is this intended behavior? Is there an easy way to have
> p:validate-with-xml-schema include the prolog in its output?
> With thanks,
> David Levy

Conal Tuohy
Received on Tuesday, 12 January 2016 02:15:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 12 January 2016 02:15:19 UTC