Package dk.brics.xact

The main interface to the XACT runtime system.


Interface Summary
ToXMLable Interface for classes that have an XML template representation.

Class Summary
Attribute Attribute node.
AttributeGap Attribute gap node.
AttrNode Base class for attribute-like nodes.
Comment Comment node.
Element Element node.
NamespaceDecl Namespace declaration node.
Node Base class for all nodes.
NodeList<T extends Node> List of nodes.
NodeVisitor Visitor for nodes.
NodeVisitorParameterized<Return,Argument> Visitor for nodes that takes an additional parameter and returns a value.
ProcessingInstruction Processing instruction node.
StringTypes Patterns for various XML strings.
TemplateGap Template gap node.
TempNode Base class for template nodes.
Text Text node.
XML XML template content node.

Exception Summary
XMLException Runtime exception caused by an invalid XML operation.
XMLPlugException Exception thrown if an XML plug operation fails.
XMLTemplateException Exception thrown if XML template parsing fails.
XMLValidationException Exception thrown if XML schema type validation fails.
XMLWellformednessException Exception thrown if XML wellformedness fails.
XMLXPathException Exception thrown if XPath evaluation fails.

Annotation Types Summary
Type Schema type annotation for XML variables.

Package dk.brics.xact Description

The main interface to the XACT runtime system.

The class XML contains the main functionality.

All instances of classes from this package are effectively immutable.

For all operations that involve XPath expressions: evaluation starts from the first node in the template, an implicit root node appears above the first node and its siblings, and gap nodes are ignored.

For method arguments of type Object or Iterable<?>, a value is treated as an XML value using ToXMLable.toXML() if it implements ToXMLable and otherwise as a string using Object.toString().

Template constants (see XML.parseTemplate(String) and XML.parseTemplateResource(String)) and all XPath evaluation use the global and thread local namespace maps (see XML.getNamespaceMap() and XML.getThreadNamespaceMap()). The program analysis assumes that these maps are fixed before all XML operations. The string representation of templates may additionally contain ordinary namespace declarations.

The program analysis additionally requires template constants, gap names, and XPath expression strings to be constants or static final field variables.

Because of the internal representation, the type of a node should not be tested using instanceof; instead use Node.isElement(), Node.isText(), Node.isAttribute(), or Node.visitBy(dk.brics.xact.NodeVisitor). Similarly, use Node.asElement(), Node.asText(), and Node.asAttribute() instead of casts.

Anders Møller <>

Copyright © 2005-2011 Aarhus University.