RE: Optional xsl transformation

With an XPath 2.0 XProc processor, I think you should be able to do
something like:

<p:choose>
  <p:when test="doc-available('style.xsl')">
    <p:xslt>...</p:xslt>
  </p:when>
  <p:otherwise>
    <p:identity>...</p:identity>
  </p:otherwise>
</p:choose>

In an XPath 1.0 implementation, you would probably need to resort to
p:load inside p:try to load the stylesheet or to something similar.

Regards,
Vojtech

Received on Thursday, 7 January 2010 09:49:40 UTC