120 likes | 328 Views
XML-based Agent Platform. Michael Sintek 12 Nov 1999. Overview. XML-based agents as framework for XML/RDF/++-based Knowledge Management FIPA-like agents communicate with XML messages (instead of LISP-like ones) communication via HTTP involved XML technologies:
E N D
XML-based Agent Platform Michael Sintek 12 Nov 1999
Overview • XML-based agents as framework for XML/RDF/++-based Knowledge Management • FIPA-like agents communicate with XML messages (instead of LISP-like ones) • communication via HTTP • involved XML technologies: • XSLT for message transformation and information extraction • RDF for meta-information • RDF Schema for ontologies • XML/RDF-based query and transformation languages for distributed inferences
XML Messages <message type=“message-type” sender=“sender-url” receiver=“receiver-url” additional-information > contents </message> • message types: inform, request, agree, cancel, confirm, disconfirm, subscribe, ... (speech acts, FIPA) • additional information: reply-with, in-reply-to, language, ontology, reply-by, protocol, ... • contents: XML “forest”
Architecture HTML Form Agent 1 Browser Agent n Servlet Java Applet Servlet-enabled HTTP Server Browser Java Application CGI 1 CGI n C/C++ etc. Application (standard) HTTP Server HTTP
Consequences • all foreign software components which are designed as CGI programs are immediately usable as agents (no explicit wrappers needed) • access to agents simple for all software components that have access to a HTTP library (Java, C, C++, ...)
Train Example: Agents bahn.hafas.de HTML Form Coor-dinator Extract HTML
Train Example: Communication <message type="request" sender="alien" receiver="http://serv-302.dfki.uni-kl.de:8080/xkm/agent/bahn"> <time>10:00</time> <from>Kaiserslautern</from> <to>Duesseldorf</to> ... </message> <message type="request" sender="http://serv-302.dfki.uni-kl.de:8080/xkm/agent/bahn" send-method="POST" receiver="http://bahn.hafas.de/bin/query.exe/l"> <time>10:00</time> ... </message> <HTML sender="http://bahn.hafas.de/bin/query.exe/l" receiver="http://serv-302.dfki.uni-kl.de:8080/xkm/agent/bahn"> <HEAD><TITLE>ReiseService - Verbindungen - Uebersicht</TITLE></HEAD> <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0"> ... </HTML>
Communication cont’d <HTML sender="http://serv-302.dfki.uni-kl.de:8080/xkm/agent/bahn” receiver="#bahnExtract"> ... </HTML> <message type="inform" sender="http://serv-302.dfki.uni-kl.de:8080/xkm/agent/bahnExtract” receiver="http://serv-302.dfki.uni-kl.de:8080/xkm/agent/bahn"> <verbindung> <ab>9:38</ab> <an>13:13</an> </verbindung> <verbindung> <ab>10:30</ab> <an>14:30</an> </verbindung> ... </message> <message type="inform" sender="http://serv-302.dfki.uni-kl.de:8080/xkm/agent/bahn” receiver="#bahnHtml"> .... </message>
Communication cont’d <html type="inform" sender="http://serv-302.dfki.uni-kl.de:8080/xkm/agent/bahnHtml” receiver="http://serv-302.dfki.uni-kl.de:8080/xkm/agent/bahn"> <body bgcolor="#FFFFEE"> <table border="2"> <tr> <td>9:38</td> <td>13:13</td> </tr> <tr> <td>10:30</td> <td>14:30</td> </tr> ... </table> </body> </html> <html type="inform" sender="http://serv-302.dfki.uni-kl.de:8080/xkm/agent/bahn” receiver="alien"> <body bgcolor="#FFFFEE"> ... </body> </html>
Using XSLT for Simple Agents:Information Extraction <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> <xsl:template match="/"> <message type="inform"> <xsl:apply-templates select="//B[text()='ab']/BR/FONT/B"/> </message> </xsl:template> <xsl:template match="B"> <verbindung> <ab><xsl:value-of select="text()"/></ab> <an><xsl:value-of select="BR/text()"/></an> </verbindung> </xsl:template> </xsl:stylesheet>
XSLT for HTML Generation <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> <xsl:template match="/"> <html type="inform"> <body bgcolor="#FFFFEE"> <table border="2"> <xsl:apply-templates/> </table> </body> </html> </xsl:template> <xsl:template match="verbindung"> <tr> <td><xsl:value-of select="ab"/></td> <td><xsl:value-of select="an"/></td> </tr> </xsl:template> </xsl:stylesheet>