MINI MINI MANI MO

Path : /opt/oracle/product/18c/dbhomeXE/rdbms/xml/xsl/
File Upload :
Current File : //opt/oracle/product/18c/dbhomeXE/rdbms/xml/xsl/kusseq.xsl

<?xml version="1.0"?>
<!--
NAME
    kusseq.xsl
DESCRIPTION
    Convert mdapi SEQUENCE_T document to SEQUENCE document (SXML)

MODIFIED        MM/DD/YY
    bwright     03/24/15 - Bug 20771546: Support for scalable sequence
    dvekaria    27/03/14 - bug 18401399: Generate SESSION & KEEP Attributes. 
    rapayne     03/02/12 - bug 13785140: correctly handling version
                           when processing PARTITION clause.
    rapayne     08/21/11 - project 36780: Identity Column support.
    rapayne     06/15/11 - lrg 5665517: fix xmlns violation.
    sdavidso    11/02/05 - fix inconsistent stylesheet format 
    htseng      12/09/04 - Initial version
 -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <!-- Top level imports -->
 <xsl:import href="kuscomm.xsl"/>
 <xsl:param name="VERSION">9999999999</xsl:param>
 <!-- *******************************************************************
Template: SEQUENCE_T - top-level template for SEQUENCE.
  This template puts out
   - the opening SEQUENCE element (with xmlns and version attributes)
   - NAME elements

******************************************************************** -->
 <xsl:template match="SEQUENCE_T">
  <xsl:element name="SEQUENCE" namespace="http://xmlns.oracle.com/ku">
   <xsl:attribute name="version">1.0</xsl:attribute>
   <xsl:call-template name="doSequence">
    <xsl:with-param name="seqNode" select="."/>
   </xsl:call-template>
   <!-- Bug 18401399: Generate SESSION & KEEP Attributes -->
   <!-- Generate KEEP attribute if appropriate where NOKEEP is the  
        default. KEEP specifies NEXTVAL will retain its original value 
        during replay for Application Continuity. -->
   <xsl:if test="($VERSION>=1200000000) and (FLAGS mod 1024)>= 512">
    <xsl:element name="KEEP"/>
   </xsl:if>
   <xsl:if test="$VERSION>=1202000000">
    <xsl:choose>
     <xsl:when test="(FLAGS mod 32)>=16">
      <xsl:choose>
       <xsl:when test="(FLAGS mod 4096) >= 2048">
        <xsl:element name="SCALE">EXTEND</xsl:element>
       </xsl:when>
       <xsl:otherwise>
        <xsl:element name="SCALE">NOEXTEND</xsl:element>
       </xsl:otherwise>
      </xsl:choose>
     </xsl:when>
     <xsl:otherwise>
      <xsl:element name="SCALE">NOSCALE</xsl:element>
     </xsl:otherwise>
    </xsl:choose>
   </xsl:if>
   <!-- Generate SESSION scope flag if appropriate where GLOBAL is the 
        default. Used with global temporary tables that have session 
        visibility.  Keep the same order KEEP/SCALE/SESSION as elsewhere -->
   <xsl:if test="($VERSION>=1200000000) and (FLAGS mod 128)>= 64">
    <xsl:element name="SESSION"/>
   </xsl:if>
  </xsl:element>
 </xsl:template>
</xsl:stylesheet>

OHA YOOOO