org.cdlib.xtf.saxonExt.sql
Class SQLQuery

Object
  extended by NodeImpl
      extended by ElementImpl
          extended by ElementWithAttributes
              extended by StyleElement
                  extended by ExtensionInstruction
                      extended by SQLQuery
All Implemented Interfaces:
Source, SourceLocator, LocationProvider, SaxonLocator, Container, FingerprintedNode, Item, NodeInfo, ValueRepresentation, InstructionInfo, Locator

public class SQLQuery
extends ExtensionInstruction

An sql:query element in the stylesheet. For example:

   <sql:query column="{$column}" table="{$table}" where="{$where}"
                 xsl:extension-element-prefixes="sql"/ >

 
(result with HTML-table-output)
   <sql:query column="{$column}" table="{$table}" where="{$where}"
                 row-tag="TR" column-tag="TD"
                 separatorType="tag"
                 xsl:extension-element-prefixes="sql"/ >
 

Author:
claudio.thomas@unix-ag.org (based on Michael Kay's SQLInsert.java)

Nested Class Summary
private static class SQLQuery.QueryInstruction
           
 
Field Summary
(package private)  String colTag
          name of element to hold the rows
(package private)  Expression column
          selected column(s) to query
(package private)  Expression connection
           
(package private)  boolean disable
          name of element to hold the columns
(package private)  String rowTag
           
protected  int sequence
           
(package private)  Expression table
          the table(s) to query in
(package private)  Expression where
          conditions of query (can be omitted)
 
Fields inherited from class StyleElement
defaultCollationName, defaultXPathNamespace, extensionNamespaces, REPORT_ALWAYS, REPORT_IF_INSTANTIATED, REPORT_UNLESS_FALLBACK_AVAILABLE, REPORT_UNLESS_FORWARDS_COMPATIBLE, reportingCircumstances, staticContext, validationError, version
 
Fields inherited from class ElementWithAttributes
attributeList, namespaceList
 
Fields inherited from class ElementImpl
nameCode, root
 
Fields inherited from class NodeImpl
index, NODE_LETTER, parent
 
Fields inherited from interface NodeInfo
ALL_NAMESPACES, EMPTY_NAMESPACE_LIST, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES
 
Fields inherited from interface ValueRepresentation
EMPTY_VALUE_ARRAY
 
Constructor Summary
SQLQuery()
           
 
Method Summary
 void addChild(NodeImpl arg0, int arg1)
           
 void compact(int arg0)
           
 Expression compile(Executable exec)
           
 AxisIterator enumerateChildren(NodeTest arg0)
           
 NodeInfo getFirstChild()
           
 NodeInfo getLastChild()
           
protected  NodeImpl getNthChild(int arg0)
           
protected  long getSequenceNumber()
           
 String getStringValue()
           
 CharSequence getStringValueCS()
           
 boolean hasChildNodes()
           
 void prepareAttributes()
           
 void useChildrenArray(NodeImpl[] arg0)
           
 void validate()
           
 
Methods inherited from class ExtensionInstruction
isInstruction, mayContainFallback
 
Methods inherited from class StyleElement
allocateLocationId, allocatePatternSlots, allocateSlots, allocateSlots, backwardsCompatibleModeIsEnabled, bindVariable, checkEmpty, checkSortComesFirst, checkTopLevel, checkUnknownAttribute, checkWithinTemplate, compileError, compileError, compileError, compileSequenceConstructor, compileWarning, definesExcludedNamespace, definesExtensionElement, fallbackProcessing, fixupReferences, forwardsCompatibleModeIsEnabled, getAttributeSets, getAttributeValue, getCommonChildItemType, getConstructType, getContainingSlotManager, getContainingStylesheet, getDefaultCollationName, getDefaultXPathNamespace, getExecutable, getHostLanguage, getLastChildInstruction, getLineNumber, getLineNumber, getLocationProvider, getNamespaceResolver, getObjectFingerprint, getObjectNameCode, getPrecedence, getPreparedStylesheet, getPrincipalStylesheet, getProperties, getProperty, getReturnedItemType, getSchemaType, getStaticContext, getStylesheetFunction, getSystemId, getTargetNamePool, getTypeAnnotation, getVersion, getWithParamInstructions, isExcludedNamespace, isExplaining, isExtensionNamespace, isPermittedChild, issueWarning, issueWarning, isTopLevel, makeAttributeValueTemplate, makeExpression, makeNameCode, makeNamespaceContext, makePattern, makeSequenceType, makeSortKeys, makeTraceInstruction, markTailCalls, mayContainSequenceConstructor, postValidate, processAllAttributes, processAttributes, processDefaultCollationAttribute, processDefaultXPathNamespaceAttribute, processExcludedNamespaces, processExtensionElementAttribute, processVersionAttribute, replaceSubExpression, reportAbsence, setLineNumber, setObjectNameCode, setValidationError, substituteFor, typeCheck, typeCheck, undeclaredNamespaceError, validateChildren, validateSubtree
 
Methods inherited from class ElementWithAttributes
copy, getAttributeList, getAttributeValue, getDeclaredNamespaces, getInScopeNamespaceCodes, getPrefixForURI, getURICodeForPrefix, getURIForPrefix, initialise, iteratePrefixes, sendNamespaceDeclarations, setNamespaceDeclarations
 
Methods inherited from class ElementImpl
generateId, getBaseURI, getDocumentRoot, getNameCode, getNodeKind, getRoot, getSystemId, setNameCode, setSystemId
 
Methods inherited from class NodeImpl
atomize, compareOrder, equals, getColumnNumber, getConfiguration, getDisplayName, getDocumentNumber, getFingerprint, getLocalPart, getNamePool, getNextInDocument, getNextSibling, getParent, getPrefix, getPreviousInDocument, getPreviousSibling, getPublicId, getTypeAnnotation, getTypedValue, getURI, hashCode, isSameNodeInfo, iterateAxis, iterateAxis
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface InstructionInfo
getSystemId
 

Field Detail

connection

Expression connection

column

Expression column
selected column(s) to query


table

Expression table
the table(s) to query in


where

Expression where
conditions of query (can be omitted)


rowTag

String rowTag

colTag

String colTag
name of element to hold the rows


disable

boolean disable
name of element to hold the columns


sequence

protected int sequence
Constructor Detail

SQLQuery

public SQLQuery()
Method Detail

prepareAttributes

public void prepareAttributes()
                       throws XPathException
Specified by:
prepareAttributes in class StyleElement
Throws:
XPathException

validate

public void validate()
              throws XPathException
Overrides:
validate in class ExtensionInstruction
Throws:
XPathException

compile

public Expression compile(Executable exec)
                   throws XPathException
Specified by:
compile in class StyleElement
Throws:
XPathException

getSequenceNumber

protected final long getSequenceNumber()
Overrides:
getSequenceNumber in class NodeImpl

hasChildNodes

public final boolean hasChildNodes()
Specified by:
hasChildNodes in interface NodeInfo
Overrides:
hasChildNodes in class NodeImpl

enumerateChildren

public final AxisIterator enumerateChildren(NodeTest arg0)

getFirstChild

public final NodeInfo getFirstChild()
Overrides:
getFirstChild in class NodeImpl

getLastChild

public final NodeInfo getLastChild()
Overrides:
getLastChild in class NodeImpl

getNthChild

protected final NodeImpl getNthChild(int arg0)

getStringValue

public String getStringValue()

getStringValueCS

public CharSequence getStringValueCS()
Specified by:
getStringValueCS in interface Item
Specified by:
getStringValueCS in interface ValueRepresentation
Overrides:
getStringValueCS in class NodeImpl

useChildrenArray

public void useChildrenArray(NodeImpl[] arg0)

addChild

public void addChild(NodeImpl arg0,
                     int arg1)

compact

public void compact(int arg0)