<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
        PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
        "web-jsptaglib_1_1.dtd">

<!-- a tab library descriptor -->

<taglib>
  <!-- after this the default space is
 "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"
   -->

  <tlibversion>1.0</tlibversion>
  <jspversion>1.1</jspversion>
  <shortname>simple</shortname>
  <info>
 A simple tab library for the tkspexp
  </info>
  
  <!-- Tags defining a connection/query/execute  collection -->

  <!-- connection tag -->
  <tag>
    <name>dbOpen</name>
    <tagclass>oracle.jsp.tags.sql.dbOpenTag</tagclass>
    <bodycontent>JSP</bodycontent>
    <!-- TODO: possibly provide this class as part of the spec -->
    <info>
    # Implements Tag and doesn't do any BodyTag specific.
    # Extends ConnBean
    # User, Password, and URL are  mandatory properties
    # ConnBean properties like stmtCacheSize, Prefetch, and BatchSize 
      can also be set and get.
    # connId is optional
    # If connId is present, then the connection is not closed during "release" 
      time and instead application should explicitly close with dbClose tag
    </info>     

    <attribute>
      <name>connId</name>
      <required>false</required>
    </attribute>
    <attribute>
      <name>user</name>
      <required>true</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>password</name>
      <required>true</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>URL</name>
      <required>true</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>

  <!-- query tag -->
  <tag>
    <name>dbQuery</name>
    <tagclass>oracle.jsp.tags.sql.dbQueryTag</tagclass>
    <teiclass>oracle.jsp.tags.sql.dbQueryTEI</teiclass>
    <bodycontent>JSP</bodycontent>
    <info>
      This tag provides an abstraction over SQL queries.

      There are 2 optional attributes, queryId and connId 
      attribute, which, when provided, must be the connId for some 
      connection tag.
      The body should, when evaluated, correspond to an SQL query.

      Notes :
        *) Implements BodyTag
        *) Extends CursorBean
        *) connId, queryId, and output are all optional
        *) if connection is null, then we get from parent using 
           (findAccessorClass). If there is no top level nested dbOpen 
           clause, then this will fail.
        *) if id is not null, then the Cursor is not closed during release, 
           and should be explicitly closed by dbCloseQuery  call.
        *) Cursor Bean properties like ResultSetType, ResultSet concurrency, 
           BatchSize, Prefetch Size and Query Timeout can also be set and 
           retrieved.
        *) output  types :
            #) HTML/html : Generates a HTML table. This is the default.
            #) XML/xml : Generates a XML string
            #) JDBC/jdbc : Generates a JDBC result set, that can be iterated 
               over with dbNextRow   call.
    </info>

    <attribute>
      <name>queryId</name>
      <required>false</required>
    </attribute>
    <attribute>
      <name>connId</name>
      <required>false</required>
    </attribute>
    <attribute>
      <name>output</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>

  <!-- connection close tag -->
  <tag>
    <name>dbClose</name>
    <tagclass>oracle.jsp.tags.sql.dbCloseTag</tagclass>
     <info>
       Close the connection

       Notes :
         Just implements Tag and doesn't do BodyTag specific.
         connId is mandatory
     </info>
     <attribute>
       <name>connId</name>
       <required>true</required>     
    </attribute>
  </tag>

  <!-- query close tag -->
  <tag>
    <name>dbCloseQuery</name>
    <tagclass>oracle.jsp.tags.sql.dbCloseQueryTag</tagclass>
     <info>
       Close the Cursor

       #) Extends TagSupport
       #) queryId is mandatory
       #) closes the cursor bean (Query) with the given query.
     </info>
     <attribute>
       <name>queryId</name>
       <required>true</required>     
    </attribute>
  </tag>

  <!-- To excute DMLs and DDLs -->
  <tag>
    <name>dbExecute</name>
    <tagclass>oracle.jsp.tags.sql.dbExecuteTag</tagclass>
    <bodycontent>JSP</bodycontent>
    <info>
      #) To execute both DMLs and DDLs
      #) Extends CursorBean
      #) Implements BodyTag
      #) If connection is null, then we get from parent using 
         (findAccessorClass). If there is no top level nested dbOpen 
         clause, then this will fail.
      #) if the  Output yes,  then HTML string "no rows affected" 
         will be printed. for DML and the statement execution status 
         will be printef for DDLs.  Default is no. 
    </info>
    <attribute>
      <name>connId</name>
      <required>false</required>
    </attribute>
    <attribute>
      <name>output</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>

  <!-- A simple iteration tag -->
  <!-- dbNextRow tag -->
  <tag>
    <name>dbNextRow</name>
    <tagclass>oracle.jsp.tags.sql.dbNextTag</tagclass>
    <bodycontent>JSP</bodycontent>
    <info>
      #) dbNextRow is only valid if the output is specified as JDBC when 
         dbQuery is executed. The Resultset object is created in the 
         TEI class (of dbQuery) and passed over to the subsequent tag.
      #) queryId is mandatory
      #) Extends BodyTagSupport.
      #) The body is executed which each row in the resultset
    </info>
    <attribute>
     <name>queryId</name>
     <required>true</required>
    </attribute>
  </tag>
</taglib>


