Note that there are some explanatory texts on larger screens.

plurals
  1. POCompositing xsl stylesheets
    primarykey
    data
    text
    <p>Looking for a little guidance, here. I'm looking to composite an xsl pipeline into a single stylesheet.</p> <p>Let me offer a little background. It is possible to take an xml file, and pass it through a sequence of transformations, to achieve some result, thus:</p> <pre><code>a.xml -&gt; AB.xsl -&gt; BC.xsl -&gt; CD.xsl = d.xml </code></pre> <p>It's perfectly straigtforward to do this server-side, of course, but I want to it client-side. I know that I can't rely on the browser to do it (<a href="https://stackoverflow.com/questions/11956531/make-an-xslt-result-document-be-processed-by-a-parent-xslt-document-recursive">because of this</a>) so instead I want to come up with a combined transform, like this:</p> <pre><code>a.xml -&gt; (AB.xsl -&gt; BC.xsl -&gt; CD.xsl) = d.xml a.xml -&gt; AD.xsl = d.xml </code></pre> <p>I know about the technique of writing an xsl where the intermediate results are put into variables , and then extracted with node-set() (best description I've found is <a href="http://www.gerixsoft.com/blog/xslt/pipeline" rel="nofollow noreferrer">here</a>), but I want to avoid that because I get the impression that support for node-set is a bit patchy (and I may be supporting some very iffy clients!)</p> <p>But it seems to me that if (as <a href="http://en.wikipedia.org/wiki/XSLT" rel="nofollow noreferrer">wikipedia claims</a>) xslt is Turing-complete, then it should be possible to combine two or more transforms into one single transform, even if the result is a bit more complicated than just pipelining the individual transforms. Some fiddling about suggests that, at least for simple cases, it's possible to simply transform one xsl using the other and then merge them together to get a halfway-reasonable result (though I'm quite certain that there are loads of gotchas lying in wait!) But, I've not been able to find anything addressing this anywhere (which amazes me, because even if it's not possible or it turns out to be seriously inefficient, I'd have thought that it would have justified at least a paper or two).</p> <p>So, has anybody heard of anything like this, and can point me in the right direction? Even a proof of xslt's Turing completeness might get me going in the right direction. I'd just like to avoid re-inventing the wheel if I can.</p> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload