W3C home > Mailing lists > Public > xproc-dev@w3.org > December 2010

RE: c namespace in output

From: <matt.garrish@bell.net>
Date: Tue, 7 Dec 2010 15:14:37 +0000
Message-ID: <SNT121-W61BD9C239D2D6D7A31F4C5FA2C0@phx.gbl>
To: <xproc-dev@w3.org>

No, no inline documents. The document comes in on the input port and out on output. I can strip the pipeline down to a simple one-step exec and unwrap and it still exhibits the problem for me:
<p:pipeline version="1.0" xmlns:p="http://www.w3.org/ns/xproc" xmlns:c=http://www.w3.org/ns/xproc-step>
<p:exec name="exec" command="c:/library/_bin/Applications/format.exe"
<p:with-option name="args" select="'-fs -re=c:/library/XMLGen/re/xform_daisy202.xml'"/>
<p:unwrap match="c:result"/>

I took at look at exclude-inline-prefixes, but didn't seem to apply to this scenario (at least as far as I can tell). If I remove the unwrap step, the c prefix is only declared on the wrapper c:result element, so it's only getting added to the document root as part of the unwrap.
Appreciate any insight you can give me on what I might be doing wrong here, though.

From: vojtech.toman@emc.com
To: xproc-dev@w3.org
Date: Tue, 7 Dec 2010 05:33:26 -0500
Subject: RE: c namespace in output

Typically, the “unwanted” namespace declarations appear in the result because they are in-scope in the p:inline bindings that you specify in the pipeline. For example, if you do something like this:
<p:pipeline xmlns:foo=”bar”>
    <p:input port=”source”>
then the result of p:identity will be <doc xmlns:foo=”bar”/>
To prevent certain prefixes from appearing in inline bindings, you can use the exclude-inline-prefixes attribute on p:inline or on the container p:pipeline/p:declare-step. This will filter out all prefixes specified in exclude-inline-prefixes, provided that they are not used in the document. Thus:
<p:pipeline xmlns:foo=”bar”>
    <p:input port=”source”>
      <p:inline exclude-inline-prefixes=”bar”><doc></p:inline>
produces: <doc/>
(You can also exclude all unused prefixes by using exclude-inline-prefixes=”#all”.)
But without seeing your actual pipeline I cannot tell if exclude-inline-prefixes would help in your case, or if it is a bug in Calabash.

Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group

From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] On Behalf Of Matt Garrish
Sent: Monday, December 06, 2010 7:32 PM
To: xproc-dev@w3.org
Subject: c namespace in output
Hi everyone,
When I do a p:exec followed by a p:unwrap I noticed I get a namespace declaration for the c namespace on the root xml element, which obviously has no use in the output document. For an xhtml document, for example, I get:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://www.w3.org/ns/xproc-step">
After much pondering I realized I can remove the namespace declaration by adding:
<p:namespace-rename from="http://www.w3.org/ns/xproc-step" to=""/>
at the end of the pipeline, but just wondering if this is the “accepted” way to do this, or if I’ve just sinned against all things pipeline? :)
(Using Calabash 0.9.28 on WinXP.)
Received on Tuesday, 7 December 2010 15:24:45 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:07 UTC