Dynamic evaluation of XPath

Suppose I have an XPath expression stored as an XML attribute in an input document and I wish to evaluate it in XProc (not XSLT). If I don’t have access to saxon:evaluate()<https://www.saxonica.com/html/documentation10/functions/saxon/evaluate.html> how to I go about this?

<p:choose>
               <p:when test="saxon:evaluate($assert)">
                              <p:identity>
                                             <p:with-input>
                                                            <tm:result>pass</tm:result>
                                             </p:with-input>
                              </p:identity>
               </p:when>
               <p:otherwise>
                              <p:identity>
                                             <p:with-input>
                                                            <tm:result>fail</tm:result>
                                             </p:with-input>
                              </p:identity>
               </p:otherwise>
</p:choose>

Thanks!

John Dziurłaj /d͡ʑurwaj/

Received on Wednesday, 22 January 2025 12:46:28 UTC