Author(s): José Manuel Gómez Pérez.
This library offers facilities to enable users to setup preferences on the values an eventual XML document may take. XML documents are specified by XDR documents (eXternal Data Representation standard), in a way conceptually similar to that of objects and classes in object oriented programming. These facilities allow to take as input an XDR Schema defining the class of documents of interest, and establish a dialogue with the user via an HTML form that allows the user to setup preferences to select sub-classes of documents (those which satisfy the preferences). The preferences are the output of the process and may be in the form of XPath expressions, for example, as can be seen in the example attached in the "examples" directory.
xdr_handle):- use_module(library(xdr_handle)).
xdr_handle)
Usage: xdr_tree(+XDR_url, -XDR_tree, -XDR_id)
XDR_url into a tree structured Prolog term XDR_tree. It also returns an identifier of the XDR_tree XDR_id corresponding to the sequence of nodes in the tree (this is intended to be a hook to use in CGI applications).
+XDR_url specifies a URL.
(pillow_types:url_term/1)
-XDR_tree specifies an XDR document.
(xdr_types:xdr/1)
-XDR_id is an integer.
(basic_props:int/1)
Usage: xdr_tree(XDR_tree)
XDR_tree.
XDR_tree specifies an XDR document.
(xdr_types:xdr/1)
Usage: xdr_node(XDR_node)
XDR_node is a XDR tree node.
Usage: xdr2html(+XDRTree, -HTMLOutput, -UnfoldedTree, -Dic)
XDRTree and produces the corresponding HTML code HTMLOutput, an equivalente unfolded plain tree UnfoldedTree and a control dictionary Dic to hold a reference the evenutal fom objects.
+XDRTree specifies an XDR document.
(xdr_types:xdr/1)
-HTMLOutput is a term representing HTML code.
(pillow_types:html_term/1)
-UnfoldedTree specifies an XDR document.
(xdr_types:xdr/1)
-Dic is a dictionary of values of the attributes of a form. It is a list of form_assignment
(pillow_types:form_dict/1)
Usage: xdr2html(+XDRTree, -HTMLOutput)
XDRTree and produces the corresponding HTML code HTMLOutput. This html code is intended to be part of a form used as a means by which an eventual user can give value to an instance of the XDR, i.e. an XML element.
+XDRTree specifies an XDR document.
(xdr_types:xdr/1)
-HTMLOutput is a term representing HTML code.
(pillow_types:html_term/1)
Usage: unfold_tree(+XDRTree, -UFT)
UFT from a standard XDR tree XDRTree, i.e. an XDR tree where all references to XDR elements have been substituted with the elements themselves. Especially useful for eventual generation of equivalent XPATH expressions, (see example).
+XDRTree specifies an XDR document.
(xdr_types:xdr/1)
-UFT specifies an XDR document.
(xdr_types:xdr/1)
Usage: unfold_tree_dic(+XDRTree, -UFT, -Dic)
UFT and a form dictionary Dic from a standard XDR tree XDRTree. Especially useful for HTML form data exchange (see example).
+XDRTree specifies an XDR document.
(xdr_types:xdr/1)
-UFT specifies an XDR document.
(xdr_types:xdr/1)
-Dic is a dictionary of values of the attributes of a form. It is a list of form_assignment
(pillow_types:form_dict/1)
Usage: xdr_xpath(+XDRTree, -XPath)
XPath from an XDR tree XDRTree. If the given XDR tree has no definite value the xpath expression produced will be empty
+XDRTree specifies an XDR document.
(xdr_types:xdr/1)
-XPath is an atom.
(basic_props:atm/1)
Go to the first, previous, next, last section, table of contents.