XML: Foundations, Techniques, Applications; Summer 2000 Solution to Problem 8: Harold Boley July 7, 2000 a) Well-formed XML element: Yes b) Directed labeled graph (DLG): ------------------ / \ --------->| http://www.dfki.de |<--------- / \ / \ / ------------------ \ hosts / / C| C| C| \ \ hosts / A / | | field| \ A \ / / | founded| | \ \ / / name| | | \ \ / campus / v v v \ campus \ A | / ---- ---- -- \ | A | / |DFKI| |1988| |AI| \ | | | ---- ---- -- | | | v v | -------------------- -------------------------- / \ / \ | http://www.uni-kl.de | | http://www.uni-saarland.de | \ / \ / -------------------- \ / -------------------------- C | C\ ---- ---- /C | C name | founded -->|1970| |1948|<--- founded | name v ---- ---- v -------------------------- -------------------------- |Universität Kaiserslautern| |Universität des Saarlandes| -------------------------- -------------------------- c) See b): "C" on content arcs and an "A" on attribute arcs "Content arcs are targeting RDF literals" "Attribute arcs are targeting RDF resources" d) Kind of graph: Node-labeled tree: No DAG (directed acyclic graph): No Directed graph: Yes e) Prolog facts: name("http://www.dfki.de","DFKI"). founded("http://www.dfki.de","1988"). field("http://www.dfki.de","AI"). campus("http://www.dfki.de","http://www.uni-kl.de"). campus("http://www.dfki.de","http://www.uni-saarland.de"). name("http://www.uni-kl.de","Universität Kaiserslautern"). founded("http://www.uni-kl.de","1970"). hosts("http://www.uni-kl.de","http://www.dfki.de"). name("http://www.uni-saarland.de","Universität des Saarlandes"). founded("http://www.uni-saarland.de","1948"). hosts("http://www.uni-saarland.de","http://www.dfki.de"). f) Special cases of Horn facts: Ground facts (without variables as arguments): All, yes Numeric facts (all arguments are numbers): All, no Binary facts (2-argument facts): All, yes Datalog facts (without constructor terms as arguments): All, yes Modal facts (make assertions about embedded propositions): All, no