Home| Printable Version
As the rules constructed using RuleMaker are manipulating XML data, some basic knowledge of XML is useful in order to be able to understand them fully. This section aims to discuss the key terminology, and therefore can be skipped if you are familiar with XML. Image showing example contacts XML document
XML - XML is a format for representing information in a structured way. It bears similarities to HTML, but adds context to the information through the use of relevant element names, and so it becomes understandable by both computers and humans. The image above shows an example XML document for describing a list of contacts, detailing the names of each one. Hyfinity's Morphyc Architecture is based entirely around XML information. XML Node - An XML document can be easily represented as a tree structure. Each entry in the tree is an XML Node in the document. There are many different types of node, including element nodes (e.g. 'contact', 'forename', 'surname' etc) and attribute nodes (e.g. 'id'). XPath - This is a location path language used to select nodes in an XML document. The syntax is similar to a file system path, except that instead of navigating folders you are navigating nodes in an XML document. The language also defines a number of functions so that you can be very specific about which nodes of the document should be selected. Node set - This is simply a collection of Nodes from an XML document. Evaluating an XPath against an XML document usually results in a node set containing all the nodes in the document that were selected by the XPath expression. This could be zero, one or more nodes. For example, evaluating the XPath "/contacts/contact" against the example contacts document would result in a node set containing three entries. One for each of the 'contact' nodes in the document. It is also possible to constrain the matching entries, for example "/contacts/contact[@id = '2']" will return a node set with only one entry, the second 'contact' tag for Donna Lee Namespaces - It is possible for one XML document to combine information from multiple sources. In this case you need a way to identify which information is from where. Namespaces solve this problem by allowing each element in the document to be associated with a particular URI. You can then identify the required elements by using a combination of the element names and their namespace URIs.
For a more detailed introduction to XML terminology there are a number of websites available, for example the XML tutorials on http://www.w3schools.com.
Forward Chaining Checking Document Content