In this paper we describe a mechanism for invoking external applications from XML documents and returning the results back into the documents such that it becomes possible to create dynamic XML documents with content fetched from external resources such as remote databases or legacy applications. One possible application is to support dynamic electronic catalogs in XML where the catalog content is automatically and dynamically updated to contain the most recent data external to the document by accessing resources like legacy applications or databases each time it is parsed.The mechanism introduced involves a way of specifying applications to be invoked from an XML document through a new processing instruction, called EXECUTE. The proposed approach necessitates a "variable" mechanism to be able to pass input parameters to the invoked applications and to use the returned results. A variable mechanism is not readily available in XML therefore we have modified the code of an XML parser such that it became possible to redefine the values of XML entities and thus to use them as variables. XML-RPC from UserLand is used for remote method invocation.When it comes to integrating the returned results into the original document, as long as a single value is returned, it can be readily inserted into an XML document. However a piece of XML document may also be the result of the external application. In this case if a validating parser is being used, as in our case, then the DTD specified should be that of the final document.The paper concludes by discussing the future work.
ACM SIGecom Exchanges – Association for Computing Machinery
Published: Jun 1, 2000