Hello, good morning xslt-support@

I am struggling to resolve how to do something; I want to use the correct
method to load a new xml document as a replacement to the existing xml in
an instance in the XForm model.

For the submission element, if the attribute 'resource' is used then it
works.
If a child element '<resource value="...">' is used instead, then it does
not work and the error message returned is, "Unsupported mediatype
'text/html' for instance #myinstance"

Therefore, as it stands the following submission works:

<xf:submission id="mysubmission" method="get" serialization="none"
mode="synchronized" replace="instance" instance="myinstance"
resource="/rest/db/data/myxmldoc.xml" />

This submission variation does not (error as described above):

<xf:submission id="mysubmission" method="get" serialization="none"
mode="synchronized" replace="instance" instance="myinstance">

    <resource value="/rest/db/data/myxmldoc.xml" />
</xf:submission>

I need to use the latter submission (with the resource element) later on,
as I need to dynamically alter the resource value at submission time.

The backend server is eXist-db.   If I call the xml instance via the
browser directly from the REST server as a test, the headers show that the
content type is "application/xml", so this content would appear to be fine
and therefore I cannot work out why there is an unsupported mediatype error.

Please, what is the correct/better way to achieve the above, or is there a
problem somewhere in XSLTForms that I am creating regarding the
content-type on the request/return following triggering the submission
using the resource element?

Thank you for some advice and pointers.
Regards
BC Habs
Hallifax
UK
------------------------------------------------------------------------------
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to