<feed xmlns="http://www.w3.org/2005/Atom" xmlns:foaf="http://xmlns.com/foaf/0.1/"><title>norman.walsh.name: Comments on /2007/06/13/xprocParameters</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2007/06/13/xprocParameters"/><id>http://norman.walsh.name/2007/06/13/xprocParameters/comments.atom</id><updated>2012-02-13T08:12:56.176979Z</updated><entry><title>Comment 1 on /2007/06/13/xprocParameters</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2007/06/13/xprocParameters#comment0001"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0001</id><published>2007-06-14T18:43:42Z</published><updated>2007-06-14T18:43:42Z</updated><author><name>Florent Georges</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>  Hi Norm</p>

<p>  I'm not really convinced by the use case of
the XSLT parameters.  As how I see the problem, XProc
parameters and XSLT parameters are not the same thing.  They
resemble each other, but only by accident (well, they solve
the same problem regarding their reespective language).</p>

<p>  I would rather say that the XSLT step can
have a number of options: the input document, the
stylesheet, the initial mode, the parameter set, etcetera.
But I don't see why it would take the pipeline's parameters
as its own.  What if you have two XSLT steps that have
incompatible parameters that share the same names?</p>

<p>  In my humble opinion, I would rather see
something like the following (I didn't follow the XProc
story as closely as I would have liked, so please be lenient
about possible stupidities):</p>

<pre>
&lt;p:pipeline name="main" xmlns:p="http://www.w3.org/2007/03/xproc"&gt;

  &lt;p:input port="source"/&gt;
  &lt;p:input port="own-params"/&gt;
  &lt;p:input port="db-params"/&gt;
  &lt;p:output port="result"/&gt;

  &lt;!--
    First, preprocess our own XML language instance to get
    Docbook instances.  User can set some params for the
    stylesheet (here, "params" is an XSLT concept).
  --&gt;
  &lt;p:xslt&gt;
    &lt;p:input port="stylesheet"&gt;
      &lt;p:document href="own-to-db.xsl"/&gt;
    &lt;/p:input&gt;
    &lt;p:input port="params" select="$own-params"/&gt;
  &lt;/p:xslt&gt;

  &lt;!--
    Process XInclude.
  --&gt;
  &lt;p:xinclude/&gt;

  &lt;!--
    Then format the resulting Docbook document.  User can
    set some params for the stylesheet (here, "params" is an
    XSLT concept).
  --&gt;
  &lt;p:xslt&gt;
    &lt;p:input port="stylesheet"&gt;
      &lt;p:document href="docbook.xsl"/&gt;
    &lt;/p:input&gt;
    &lt;p:input port="params" select="$db-params"/&gt;
  &lt;/p:xslt&gt;

&lt;/p:pipeline&gt;
</pre>

<p>  I guess I misunderstood something, but I
can't see what.</p>

<p>  Anyway, I'm looking forward to listen to you
at XML Prague in a few days.  Regards,</p>

<p>--drkm</p>
  </div></content></entry><entry><title>Comment 2 on /2007/06/13/xprocParameters</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2007/06/13/xprocParameters#comment0002"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0002</id><published>2007-06-20T16:27:57Z</published><updated>2007-06-20T16:27:57Z</updated><author><name>Norman Walsh</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>Hi Florent,
</p>
    <p>
Good to see you in Prague! I think the parameter solution we arrived at is very much along the lines you propose. I'll write up a few more thoughts about XProc parameters when I get a chance.</p>
  </div></content></entry></feed>

