RE: c namespace in output

Hi,

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:identity>
    <p:input port="source">
      <p:inline><doc></p:inline>
    </p:input>
  </p:identity>
  ...
</p:pipeline>

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:identity>
    <p:input port="source">
      <p:inline exclude-inline-prefixes="bar"><doc></p:inline>
    </p:input>
  </p:identity>
  ...
</p:pipeline>

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.

Regards,
Vojtech


--
Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group
vojtech.toman@emc.com
http://developer.emc.com/xmltech

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.)

Thanks,

Matt

Received on Tuesday, 7 December 2010 10:35:16 UTC