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

RE: c namespace in output

From: <vojtech.toman@emc.com>
Date: Tue, 7 Dec 2010 05:33:26 -0500
To: <xproc-dev@w3.org>
Message-ID: <3799D0FD120AD940B731A37E36DAF3FE32B116BAB6@MX20A.corp.emc.com>

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 10:35:16 UTC

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