Its a dynamic error, if @href is not a valid uri.
Test ab-p-document038.xml is expected to fail with error code err:XD0064 [Core steps, XProc]
.
<p:declare-step xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
<p:output port="result"/>
<p:identity>
<p:with-input xml:base="/%gg/" href="file.xml"/>
</p:identity>
</p:declare-step>
Additional tests for p:document.