<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<?xml-stylesheet type='text/xsl' href='/style/atom-comments.xsl'?>
<feed xmlns='http://www.w3.org/2005/Atom'>
<title>norman.walsh.name: Comments on /2009/03/26/xprocWithXProc</title>
<link rel='alternate' type='text/html' href='http://norman.walsh.name/2009/03/26/xprocWithXProc'/>
<id>http://norman.walsh.name/2009/03/26/xprocWithXProc/comments.atom</id>
<updated>2009-03-27T11:48:54Z</updated>

<entry xmlns:foaf='http://xmlns.com/foaf/0.1/'>
<title>Comment 1 on /2009/03/26/xprocWithXProc</title>
<link rel='alternate' type='text/html' href='http://norman.walsh.name/2009/03/26/xprocWithXProc#comment0001'/>
<id>http://norman.walsh.name/2009/03/26/xprocWithXProc#comment0001</id>
<published>2009-03-27T07:36:38Z</published>
<updated>2009-03-27T07:36:38Z</updated>
<author>
  <name>Vojtech Toman</name>
  <foaf:mbox_sha1sum>1b7c6d2b6749e0e1d8431e48fd28019f44dde89f</foaf:mbox_sha1sum>
  <uri>http://vtoman.wordpress.com</uri>
</author>
<content type='xhtml'><div xmlns="http://www.w3.org/1999/xhtml">Thanks for putting your XML Prague presentation in one blog entry. (Is this the longest entry on your blog so far? :)

I have one question about your use of p:pipeinfo in the pipeline, and especially the use of <code>xml:id</code>:

<pre>
&lt;p:pipeinfo xml:id="steps-depends"&gt;
  &lt;cx:depends&gt;
    &lt;cx:target&gt;steps.rnc&lt;/cx:target&gt;
    &lt;cx:source&gt;../typed-pipeline-library.xml&lt;/cx:source&gt;
    &lt;cx:source&gt;../../style/library-to-rnc.xsl&lt;/cx:source&gt;
  &lt;/cx:depends&gt;
&lt;/p:pipeinfo&gt;
</pre>

You refer to the <code>p:pipeinfo</code> elements *of the pipeline itself* like this:

<pre>
&lt;cx:out-of-date&gt;
  &lt;p:input port="source" select="id('steps-depends')/cx:depends"&gt;
    &lt;p:document href="#"/&gt;
  &lt;/p:input&gt;
&lt;/cx:out-of-date&gt;
</pre>

Is this really possible? I mean, can an XProc pipeline access its source? I understand that <code>href="#"</code> resolves to the owner document, but this is the first time I see this in the XProc context.</div></content>
</entry>

<entry xmlns:foaf='http://xmlns.com/foaf/0.1/'>
<title>Comment 2 on /2009/03/26/xprocWithXProc</title>
<link rel='alternate' type='text/html' href='http://norman.walsh.name/2009/03/26/xprocWithXProc#comment0002'/>
<id>http://norman.walsh.name/2009/03/26/xprocWithXProc#comment0002</id>
<published>2009-03-27T11:48:55Z</published>
<updated>2009-03-27T11:48:55Z</updated>
<author>
  <name>Norman Walsh</name>
  <foaf:mbox_sha1sum>9f5c771a25733700b2f96af4f8e6f35c9b0ad327</foaf:mbox_sha1sum>
  <uri>http://norman.walsh.name/</uri>
</author>
<content type='xhtml'><div xmlns="http://www.w3.org/1999/xhtml"><p>Yeah, it is sort of absurdly long. Alternatively, I could have tried to cut the pipelines into snippets and highlight only the changed parts and lots of other things. In that alternate world, I fear the post wouldn't have been made for days, so I decided this was better. :-)
</p><p>
With regard to <code>&lt;p:document href=""&gt;</code> (the <code>#</code> is irrelevant I think), yes I think that should work. It's known to work in XSLT stylesheets, for example.
</p><p>
I was a little surprised, to be honest, when I tried it and <em>it just worked</em>. I think you might find the same thing is true in your implementation. If the href is relative, it has to be resolved against the base URI of the document element. In a pipeline, that's the base URI of the pipeline document, unless someone has used <code>xml:base</code>. If you resolve "" against the current base URI to get an absolute URI, the right thing just happens.
</p><p>
I believe it should work even if <code>xml:base</code> has been used, that is, same document references are immutable with respect to the base URI, but I bet that doesn't (yet) work in my implementation. I haven't tried though.</p></div></content>
</entry>

</feed>
