Hello,
With the support of Tamino 4.1.x the docid was not longer sufficient to get access to a document because documents can by a sub-tree of document identified by a node id. Therefore, the internal parameter “:docid” becomes more complex, it is a vector of doctype, inoid, nodeid and collection.
I propose not to use internal parameters to get access to an X-Application. Instead, I would use a JSP page that handles this access. For example:
If you have an XQuery to load a document and you want to edit this document via a generated “modify” page of X-Application, use the following approach.
Build a JSP page modifyMyDopcument.jsp. Use a tag xapp:directcommand to load the document and set the modify state.
<xapp:module>
<directcommand type="read" document="...Document" schema="myDocSchema" collection="myCollection" arg="${myQuery$}" />
<directcommand type="modify" document="...Document" />
</xapp:module>
<%
pageContext.forward("modify.jsp");
%>
</pre><BR><BR>The attribute 'document' depends on the attribute 'document' of your 'modify.jsp' page. Use the same value as the attribute 'document' of xapp:form tag has.<BR><BR>The values of the attributes 'schema' and 'collection' depend your application. Have a look into the generated page 'search.jsp' which values are used for 'schema' and 'collection' within the tag 'xapp:action type='xquery'.<BR><BR>The invocation of your page could look as follows:<BR><BR><pre class="ip-ubbcode-code-pre">
http://localhost:8080/myApplication/modifyMyDocument.jsp?myQuery=for $x in ... return $x
Bye,
Christian.
#API-Management#webMethods#Tamino