Placing text/plain on a port via p:identity

I am working on an XProc pipeline to process iXML test cases<https://github.com/invisibleXML/ixml/tree/master/tests/>
. The pipeline functions correctly when test strings are externally referenced via @href, using <p:load>. However, I encounter an error when attempting to process inline (literal) strings directly within the pipeline. Specifically, the processor (XMLCalabash) returns the following error:
"Input with content type 'application/xml' not allowed on port 'source'."

Below is a representative excerpt of the relevant portion of the pipeline:

<p:for-each>
  <p:with-input select="/tc:test-set/tc:test-case" />
  <p:choose>
    <p:when test="/tc:test-case/tc:test-string-ref/@href">
      <p:load href="{$test-set-base-uri}/{/tc:test-case/tc:test-string-ref/@href}" />
    </p:when>
    <p:when test="/tc:test-case/tc:test-string">
      <p:identity>
        <p:with-input port="source">
          <p:inline>{/tc:test-case/tc:test-string}</p:inline>
        </p:with-input>
      </p:identity>
    </p:when>
  </p:choose>
  <p:invisible-xml message="Running ixml">
    <p:with-input port="grammar" href="{$test-set-base-uri}/{$ixml-grammar-ref/@href}" />
  </p:invisible-xml>
</p:for-each>

I believe I need some way to indicate that the content loaded via identity is text/plain, but I am not sure how.

John Dziurlaj

Received on Saturday, 12 July 2025 13:45:23 UTC