RE: implicit declaration?

Basically, you can omit bindings for primary input/output ports:
 
The rules for determining what is a primary input port are as follows:
- the step declaration declares an input port as primary="true"; or
- the step declaration specifies a single input port (and that input
port is not explicitly declared as primary="false")
 
(Similar rules apply to output ports.)
 
Steps can declare/have at most one primary (document) input port and at
most one primary output port.
 
If you don't specify a binding for a primary input port, the XProc
processor needs to know what is the "implicit readable input port". If
the implicit readable input port is known for given step, and you don't
provide a binding for the step's primary input port, the XProc processor
manufactures a default binding for you. (Determining the default
readable input port if fairly easy if you have two consecutive steps
where the first one has a primary output port and the second step has a
primary input port, but things can get more interesting when the runtime
ordering of steps (determined by the connections between them) is more
complicated.)
 
 
Regards,
Vojtech


________________________________

	From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org]
On Behalf Of James Garriss
	Sent: Wednesday, September 24, 2008 2:11 PM
	To: XProc Dev
	Subject: Re: implicit declaration?
	
	
	Ok, so I'm using wrong terminology; I can work on that.  Thanks
for the clarification.
	
	Perhaps now I can phrase my question better:  When I look at the
declaration of a step, how do I know if various inputs and outputs are
allowed to have an absent binding and/or an empty binding?
	
	James Garriss
	http://garriss.blogspot.com
	
	
	
	
________________________________

	From: Norman Walsh <ndw@nwalsh.com>
	Date: Tue, 23 Sep 2008 16:41:01 -0400
	To: XProc Dev <xproc-dev@w3.org>
	Subject: Re: implicit declaration?
	Resent-From: XProc Dev <xproc-dev@w3.org>
	Resent-Date: Tue, 23 Sep 2008 20:41:54 +0000
	
	James Garriss <james@garriss.org> writes:
	
	>     <p:identity>
	>         <p:input port="source"/>
	>     </p:identity>
	>
	> is semantically equal to this:
	>
	>     <p:identity/>
	>
	> Specifically, I can declare the input port explicitly or
implicitly.  As I
	> read through the WD, what is it that tells me that a port can
be declared
	> implicitly or must be declared explicitly?  Is it whether it's
a primary
	> port?
	
	No, you're confusing declaration with use. The declaration for
the identity
	step is:
	
	   <p:declare-step type="p:identity">
	      <p:input port="source" sequence="true"/>
	      <p:output port="result" sequence="true"/>
	   </p:declare-step>
	
	That declaration is given in the spec and is builtin to Calabash
	(well, that's not technically true. If you blow apart the jar
file,
	you'll find it in pipeline-library.xml in /etc).
	
	With the exception of p:declare-step elements, all the steps
that you
	put in your pipeline documents are *uses* of the steps, not
	declarations.
	
	The fact that an *empty* p:input binding is the same as an
*absent*
	p:input binding is just a natural consequence of the defaulting
for
	bindings.
	
	Does that help?
	
	                                        Be seeing you,
	                                          norm
	
	-- 
	Norman Walsh <ndw@nwalsh.com> | The main difference between
living
	http://nwalsh.com/            | people and fictitious characters
is
	                              | that the writer takes great
pains to
	                              | give the characters coherence
and inner
	                              | unity, whereas living people may
go to
	                              | extremes of incoherence because
their
	                              | physical existence holds them
	                              | together.--Hugo Von Hofmannsthal
	

Received on Wednesday, 24 September 2008 12:28:18 UTC