- From: Romain Deltour <rdeltour@gmail.com>
- Date: Tue, 7 Dec 2010 19:19:06 +0100
- To: XProc Dev <xproc-dev@w3.org>
- Message-Id: <F79FF6CA-21EA-426A-9B23-943A70C913C1@gmail.com>
Hi Matt, The (non-normative) section on namespace fix-up says: "When a element is removed via p:unwrap, an in-scope namespaces that are declared on the element must be copied to any child element except when the child element declares the same prefix or declares a new default namespace.". So I guess Calabash behavior is correct here and you have to rely on p:namespace-rename to remove it. That said, it would probably be easier / more readable if @exclude-inline-prefix was somehow extended to cover this use case... or perhaps with the introduction of a similar attribute on the p:unwrap element. XProc experts, any thoughts ? BR, Romain. Le 7 déc. 10 à 16:14, <matt.garrish@bell.net> <matt.garrish@bell.net> a écrit : > 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" > source-is-xml="true" > result-is-xml="true" > wrap-result-lines="false"> > <p:with-option name="args" select="'-fs -re=c:/library/XMLGen/re/ > xform_daisy202.xml'"/> > </p:exec> > <p:unwrap match="c:result"/> > </p:pipeline> > > > 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. > > Matt > > 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 > > 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 18:19:40 UTC