Edit D:\app\Administrator\product\11.2.0\dbhome_1\RDBMS\xml\xsl\kusstorg.xsl
<?xml version="1.0"?> <!-- Copyright (c) 2004, 2009, Oracle and/or its affiliates. All rights reserved. --> <!-- NAME kusstorg.xsl DESCRIPTION This is a utility stylesheet for generating SXML syntax for physical attributes: - segment_attributes_clause - physical_attributes_clause - storage_clause MODIFIED MM/DD/YY rapayne 05/22/09 - bug 8391296: Fix support for CELL_FLASH_BUFFER and FLASH_CACHE rapayne 05/10/09 - bug 8355496: add framework for index deferred storage support. adalee 04/16/09 - add FLASH_CACHE and CELL_FLASH_CACHE lbarton 02/11/08 - reference/system partitioning lbarton 03/19/08 - deferred segment creation slynn 10/12/06 - smartfile->securefileversion htseng 07/31/06 - add lobretention/maxsize support lbarton 11/09/05 - bug 4724986: fix handling of xmlns sdavidso 11/02/05 - fix inconsistent stylesheet format lbarton 09/12/05 - Move no blocksize error to StorageClause lbarton 08/10/05 - lbarton_mddiff lbarton 11/04/04 - Initial version --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://xmlns.oracle.com/ku"> <!-- Top level imports --> <xsl:import href="kuscomm.xsl"/> <!-- Templates --> <xsl:template name="SegmentAttributes"> <xsl:param name="ParentNode" select="''"/> <xsl:param name="Partitioned" select="''"/> <xsl:param name="ObjType">TABLE</xsl:param> <xsl:param name="PartitionType" select="''"/> <xsl:param name="PROPERTY2" select="''"/> <xsl:param name="DefaultBlocksize" select="''"/> <!-- ******************************************************************* Template: SegmentAttributes Parameters: ParentNode - Parent node of TS_NAME, BLOCKSIZE, PCT_FREE, etc. Partitioned - 0 = non-partitioned, non-0 = partitioned Used to locate/interpret the storage and logging information. For non-partitioned objects storage information (INIEXTS, etc.) is stored under STORAGE (a peer of PCT_FREE, etc.); for partitioned objects the information (DEFINIEXTS, etc.) is at the same level as DEFPCTFREE, etc. The location and encoding of logging information is different for partitioned/non-partitioned objects. See "LoggingClause", below. ObjType - One of "TABLE" (default) "INDEX" (used for both indexes and IOTs) "ROLLBACK" "TABLESPACE" "PARTITION" "PIOT_PARTITION" PartitionType - RANGE, HASH, LIST, '' PROPERTY2 - PROPERTY2 node (bit 0x04 = deferred segment creation) DefaultBlocksize - For StorageClause ******************************************************************** --> <xsl:if test="not ($SEGMENT_ATTRIBUTES=0)"> <xsl:element name="SEGMENT_ATTRIBUTES"> <xsl:if test="$PartitionType!='HASH'"> <xsl:call-template name="PhysicalAttributes"> <xsl:with-param name="ParentNode" select="$ParentNode"/> <xsl:with-param name="Partitioned" select="$Partitioned"/> <xsl:with-param name="ObjType" select="$ObjType"/> <xsl:with-param name="PROPERTY2" select="$PROPERTY2"/> <xsl:with-param name="DefaultBlocksize" select="$DefaultBlocksize"/> </xsl:call-template> </xsl:if> <xsl:call-template name="Tablespace"> <xsl:with-param name="ParentNode" select="$ParentNode"/> </xsl:call-template> <!--xsl:if test="$ObjType!='PARTITION' and $ObjType!='PIOT_PARTITION'"--> <xsl:if test="$PartitionType!='HASH'"> <xsl:call-template name="LoggingClause"> <xsl:with-param name="Partitioned" select="$Partitioned"/> <xsl:with-param name="FlagsNode" select="$ParentNode/FLAGS"/> <xsl:with-param name="DefloggingNode" select="$ParentNode/DEFLOGGING"/> <xsl:with-param name="PartitionType" select="$PartitionType"/> </xsl:call-template> </xsl:if> </xsl:element> </xsl:if> </xsl:template> <xsl:template name="PhysicalAttributes"> <xsl:param name="ParentNode" select="''"/> <xsl:param name="Partitioned" select="''"/> <xsl:param name="ObjType">TABLE</xsl:param> <xsl:param name="DefaultBlocksize" select="''"/> <xsl:param name="PROPERTY2" select="''"/> <!-- ******************************************************************* Template: PhysicalAttributes Parameters: ParentNode - Parent node of TS_NAME, BLOCKSIZE, PCT_FREE, etc. Partitioned - 0 = non-partitioned, non-0 = partitioned ObjType - One of "TABLE" (default) "INDEX" (used for both indexes and IOTs) "ROLLBACK" "TABLESPACE" "PARTITION" "PIOT_PARTITION" DefaultBlocksize - For StorageClause PROPERTY2 - PROPERTY2 node (bit 0x04 = deferred segment creation) ******************************************************************** --> <xsl:if test="$PROPERTY2 and ($PROPERTY2 mod 8)>=4"> <xsl:element name="SEGMENT_CREATION_DEFERRED"/> </xsl:if> <xsl:element name="PCTFREE"> <xsl:value-of select="$ParentNode/PCT_FREE"/> <xsl:value-of select="$ParentNode/DEFPCTFREE"/> </xsl:element> <xsl:if test="($ObjType!='INDEX') and ($ObjType!='PIOT_PARTITION')"> <xsl:element name="PCTUSED"> <xsl:value-of select="$ParentNode/PCT_USED"/> <xsl:value-of select="$ParentNode/DEFPCTUSED"/> </xsl:element> </xsl:if> <xsl:element name="INITRANS"> <xsl:value-of select="$ParentNode/INITRANS"/> <xsl:value-of select="$ParentNode/DEFINITRANS"/> </xsl:element> <!-- STORAGE --> <xsl:choose> <!-- non-partitioned --> <xsl:when test="$Partitioned=0"> <xsl:choose> <!-- omit storage clause if segment creation deferred --> <xsl:when test="($PROPERTY2 and ($PROPERTY2 mod 8)>=4)"/> <!-- omit storage clause for indpart if segment create deferred --> <xsl:when test="string-length($ParentNode/BLOCKSIZE)!=0 and $ObjType = 'INDEX' and $ParentNode/DEFERRED_STG"> <xsl:call-template name="DoIndexDeferredStg"> <xsl:with-param name="DeferredStg" select="$ParentNode/DEFERRED_STG"/> <xsl:with-param name="BlockSize" select="$ParentNode/BLOCKSIZE | $ParentNode/DEFBLOCKSIZE"/> </xsl:call-template> </xsl:when> <xsl:when test="string-length($ParentNode/BLOCKSIZE)!=0"> <xsl:call-template name="StorageClause"> <xsl:with-param name="StorageNode" select="$ParentNode/STORAGE"/> <xsl:with-param name="BlkSize" select="$ParentNode/BLOCKSIZE"/> </xsl:call-template> </xsl:when> <xsl:when test="string-length($DefaultBlocksize)!=0"> <xsl:call-template name="StorageClause"> <xsl:with-param name="StorageNode" select="$ParentNode/STORAGE"/> <xsl:with-param name="BlkSize" select="$DefaultBlocksize"/> </xsl:call-template> </xsl:when> </xsl:choose> </xsl:when> <!-- partitioned --> <xsl:otherwise> <xsl:choose> <xsl:when test="string-length($ParentNode/BLOCKSIZE)!=0 or string-length($ParentNode/DEFBLOCKSIZE)!=0"> <xsl:call-template name="StorageClause"> <xsl:with-param name="StorageNode" select="$ParentNode"/> <xsl:with-param name="BlkSize" select="$ParentNode/BLOCKSIZE | $ParentNode/DEFBLOCKSIZE"/> </xsl:call-template> </xsl:when> <xsl:when test="string-length($DefaultBlocksize)!=0"> <xsl:call-template name="StorageClause"> <xsl:with-param name="StorageNode" select="$ParentNode"/> <xsl:with-param name="BlkSize" select="$DefaultBlocksize"/> </xsl:call-template> </xsl:when> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="DoIndexDeferredStg"> <xsl:param name="DeferredStg" select="''"/> <xsl:param name="Blocksize">8192</xsl:param> <!-- ******************************************************************* Template: DoIndexDeferredStg - generate storage params when seg creation deferred Current node: INDEX_T/PARTITION_LIST/PARTITION_LIST_ITEM Parameters: DeferredStg - DEFERRED_STORAGE node Blocksize - need to build storage clause <STORAGE> <INITIAL>2097152</INITIAL> <NEXT>1048576</NEXT> <MINEXTENTS>1</MINEXTENTS> <MAXEXTENTS>2147483645</MAXEXTENTS> <PCTINCREASE>0</PCTINCREASE> <FREELISTS>1</FREELISTS> <FREELIST_GROUPS>1</FREELIST_GROUPS> <BUFFER_POOL>DEFAULT</BUFFER_POOL> </STORAGE ******************************************************************** --> <xsl:choose> <xsl:when test="4>($DeferredStg/FLAGS_STG mod 8)"> <xsl:element name="COMPRESS">N</xsl:element> </xsl:when> <xsl:when test="($DeferredStg/CMPFLAG_STG mod 4)>=2"> <xsl:choose> <xsl:when test="$VERSION>=1100000000"> <xsl:element name="COMPRESS">ALL</xsl:element> </xsl:when> <xsl:otherwise> <xsl:element name="COMPRESS">DIRECT_LOAD</xsl:element> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:when test="($DeferredStg/CMPFLAG_STG mod 2)>=1"> <xsl:element name="COMPRESS">DIRECT_LOAD</xsl:element> </xsl:when> <xsl:otherwise> <xsl:element name="COMPRESS">N</xsl:element> </xsl:otherwise> </xsl:choose> <xsl:element name="LOGGING"> <xsl:choose> <xsl:when test="($DeferredStg/FLAGS_STG mod 64)>=32">N</xsl:when> <xsl:otherwise>Y</xsl:otherwise> </xsl:choose> </xsl:element> <xsl:variable name="hasINITIAL" select="$DeferredStg and $DeferredStg/INITIAL_STG"/> <xsl:variable name="hasNEXT" select="$DeferredStg and $DeferredStg/NEXT_STG"/> <xsl:variable name="hasMINEXT" select="$DeferredStg and $DeferredStg/MINEXT_STG"/> <xsl:variable name="hasMAXEXT" select="$DeferredStg and $DeferredStg/MAXEXT_STG"/> <xsl:variable name="hasPCTINC" select="$DeferredStg and $DeferredStg/PCTINC_STG"/> <xsl:variable name="hasFREELISTS" select="$DeferredStg and $DeferredStg/FRLINS_STG"/> <xsl:variable name="hasFREELIST_GROUPS" select="$DeferredStg and $DeferredStg/MAXINS_STG"/> <xsl:variable name="hasBUFFER_POOL" select="$DeferredStg and $DeferredStg/BFP_STG"/> <xsl:element name="STORAGE"> <xsl:call-template name="DoDeferredStgParam"> <xsl:with-param name="ParamName">INITIAL</xsl:with-param> <xsl:with-param name="ParamVal" select="$DeferredStg/INITIAL_STG"/> <xsl:with-param name="testval" select="$hasINITIAL"/> <xsl:with-param name="mult" select="$Blocksize"/> </xsl:call-template> <xsl:call-template name="DoDeferredStgParam"> <xsl:with-param name="ParamName">NEXT</xsl:with-param> <xsl:with-param name="ParamVal" select="$DeferredStg/NEXT_STG"/> <xsl:with-param name="testval" select="$hasNEXT"/> <xsl:with-param name="mult" select="$Blocksize"/> </xsl:call-template> <xsl:call-template name="DoDeferredStgParam"> <xsl:with-param name="ParamName">MINEXTENTS</xsl:with-param> <xsl:with-param name="ParamVal" select="$DeferredStg/MINEXT_STG"/> <xsl:with-param name="testval" select="$hasMINEXT"/> </xsl:call-template> <xsl:call-template name="DoDeferredStgParam"> <xsl:with-param name="ParamName">MAXEXTENTS</xsl:with-param> <xsl:with-param name="ParamVal" select="$DeferredStg/MAXEXT_STG"/> <xsl:with-param name="testval" select="$hasMAXEXT"/> </xsl:call-template> <xsl:call-template name="DoDeferredStgParam"> <xsl:with-param name="ParamName">PCTINCREASE</xsl:with-param> <xsl:with-param name="ParamVal" select="$DeferredStg/PCTINC_STG"/> <xsl:with-param name="testval" select="$hasPCTINC"/> </xsl:call-template> <xsl:call-template name="DoDeferredStgParam"> <xsl:with-param name="ParamName">FREELISTS</xsl:with-param> <xsl:with-param name="ParamVal" select="$DeferredStg/FRLINS_STG"/> <xsl:with-param name="testval" select="$hasFREELISTS"/> </xsl:call-template> <xsl:call-template name="DoDeferredStgParam"> <xsl:with-param name="ParamName">FREELIST GROUPS</xsl:with-param> <xsl:with-param name="ParamVal" select="$DeferredStg/MAXINS_STG"/> <xsl:with-param name="testval" select="$hasFREELIST_GROUPS"/> </xsl:call-template> <xsl:if test="$hasBUFFER_POOL"> <xsl:apply-templates select="$DeferredStg/BFP_STG"/> </xsl:if> </xsl:element> </xsl:template> <xsl:template name="DoIniNext"> <xsl:param name="Size">0</xsl:param> <xsl:param name="BlkSize">0</xsl:param> <!-- ******************************************************************* Template: DoIniNext emit the numeric value for INITIAL, NEXT, etc. Parameters: Size: size value in blocks BlkSize: value of BLOCKSIZE ******************************************************************** --> <xsl:value-of select="$Size*$BlkSize"/> </xsl:template> <xsl:template name="DoDeferredStgParam"> <xsl:param name="ParamName" select="''"/> <xsl:param name="ParamVal" select="''"/> <xsl:param name="testval" select="''"/> <xsl:param name="mult">1</xsl:param> <!-- ******************************************************************* Template: DoDeferredStgParam - Utility template to emit a single STORAGE param Parameters: ParamName - name, e.g., INITIAL ParamVal - value if any testval - true if ParamVal is valid mult - factor to multiply ParamVal (e.g., INITIAL is stored as a number of blocks, so mult would be the blocksize) ******************************************************************** --> <xsl:if test="$testval"> <xsl:element name="{$ParamName}"> <xsl:call-template name="DoIniNext"> <xsl:with-param name="Size" select="$ParamVal"/> <xsl:with-param name="BlkSize" select="$mult"/> </xsl:call-template> </xsl:element> </xsl:if> </xsl:template> <xsl:template name="StorageClause"> <xsl:param name="StorageNode" select="''"/> <xsl:param name="ObjType">TABLE</xsl:param> <xsl:param name="BlkSize">0</xsl:param> <!-- ******************************************************************* Template: StorageClause Parameters: StorageNode - STORAGE node ObjType - One of "TABLE" (default) "INDEX" (used for both indexes and IOTs) "ROLLBACK" "TABLESPACE" "PARTITION" "PIOT_PARTITION" BlkSize - tablespace blocksize ******************************************************************** --> <xsl:if test="not ($STORAGE=0)"> <xsl:element name="STORAGE"> <xsl:if test="$StorageNode/DEFINIEXTS or $StorageNode/INIEXTS or $StorageNode/DFLINIT"> <xsl:if test="$BlkSize=0"> <xsl:text> **** kusstorg.xsl/StorageClause ERROR: No BLOCKSIZE VALUE *** </xsl:text> </xsl:if> <xsl:element name="INITIAL"> <xsl:choose> <xsl:when test="$StorageNode/INIEXTS"> <xsl:value-of select="($StorageNode/INIEXTS)*$BlkSize"/> </xsl:when> <xsl:when test="$StorageNode/DEFINIEXTS"> <xsl:value-of select="($StorageNode/DEFINIEXTS)*$BlkSize"/> </xsl:when> <xsl:when test="$StorageNode/DFLINIT"> <xsl:value-of select="($StorageNode/DFLINIT)*$BlkSize"/> </xsl:when> </xsl:choose> </xsl:element> </xsl:if> <xsl:if test="$StorageNode/DEFEXTSIZE or $StorageNode/EXTSIZE or $StorageNode/DFLINCR"> <xsl:if test="$BlkSize=0"> <xsl:text> **** kusstorg.xsl/StorageClause ERROR: No BLOCKSIZE VALUE *** </xsl:text> </xsl:if> <xsl:element name="NEXT"> <xsl:choose> <xsl:when test="$StorageNode/EXTSIZE"> <xsl:value-of select="($StorageNode/EXTSIZE)*$BlkSize"/> </xsl:when> <xsl:when test="$StorageNode/DEFEXTSIZE"> <xsl:value-of select="($StorageNode/DEFEXTSIZE)*$BlkSize"/> </xsl:when> <xsl:when test="$StorageNode/DFLINCR"> <xsl:value-of select="($StorageNode/DFLINCR)*$BlkSize"/> </xsl:when> </xsl:choose> </xsl:element> </xsl:if> <xsl:if test="$StorageNode/DEFMINEXTS or $StorageNode/MINEXTS or $StorageNode/DFLMINEXT"> <xsl:element name="MINEXTENTS"> <xsl:choose> <xsl:when test="$StorageNode/MINEXTS"> <xsl:value-of select="($StorageNode/MINEXTS)"/> </xsl:when> <xsl:when test="$StorageNode/DEFMINEXTS"> <xsl:value-of select="($StorageNode/DEFMINEXTS)"/> </xsl:when> <xsl:when test="$StorageNode/DFLMINEXT"> <xsl:value-of select="($StorageNode/DFLMINEXT)"/> </xsl:when> </xsl:choose> </xsl:element> </xsl:if> <xsl:if test="$StorageNode/DEFMAXEXTS or $StorageNode/MAXEXTS or $StorageNode/DFLMAXEXT"> <xsl:element name="MAXEXTENTS"> <xsl:choose> <xsl:when test="$StorageNode/MAXEXTS"> <xsl:value-of select="($StorageNode/MAXEXTS)"/> </xsl:when> <xsl:when test="$StorageNode/DEFMAXEXTS"> <xsl:value-of select="($StorageNode/DEFMAXEXTS)"/> </xsl:when> <xsl:when test="$StorageNode/DFLMAXEXT"> <xsl:value-of select="($StorageNode/DFLMAXEXT)"/> </xsl:when> </xsl:choose> </xsl:element> </xsl:if> <xsl:if test="not($ObjType='ROLLBACK')"> <xsl:if test="$StorageNode/DEFEXTPCT or $StorageNode/EXTPCT or $StorageNode/DFLEXTPCT"> <xsl:element name="PCTINCREASE"> <xsl:choose> <xsl:when test="$StorageNode/EXTPCT"> <xsl:value-of select="($StorageNode/EXTPCT)"/> </xsl:when> <xsl:when test="$StorageNode/DEFEXTPCT"> <xsl:value-of select="($StorageNode/DEFEXTPCT)"/> </xsl:when> <xsl:when test="$StorageNode/DFLEXTPCT"> <xsl:value-of select="($StorageNode/DFLEXTPCT)"/> </xsl:when> </xsl:choose> </xsl:element> </xsl:if> </xsl:if> <xsl:if test="($ObjType != 'ROLLBACK') or ($ObjType != 'TABLESPACE')"> <xsl:if test="2097152 > ($StorageNode/FLAGS mod 4194304)"> <xsl:if test="$StorageNode/DEFLISTS > 0 or $StorageNode/LISTS"> <xsl:element name="FREELISTS"> <xsl:value-of select="$StorageNode/LISTS"/> <xsl:value-of select="$StorageNode/DEFLISTS"/> </xsl:element> </xsl:if> <xsl:if test="$StorageNode/DEFGROUPS > 0 or $StorageNode/GROUPS"> <xsl:element name="FREELIST_GROUPS"> <xsl:value-of select="$StorageNode/GROUPS"/> <xsl:value-of select="$StorageNode/DEFGROUPS"/> </xsl:element> </xsl:if> </xsl:if> <!-- MAXSIZE clause --> <!-- 11g: BITMAPRANGES => MAXSIZE --> <xsl:if test="$StorageNode/BITMAPRANGES and ($StorageNode/FLAGS mod 8388608)>=4194304 or $StorageNode/DEFMAXSIZE"> <xsl:call-template name="DoMAXSIZE"> <xsl:with-param name="MaxSize" select="$StorageNode/BITMAPRANGES | $StorageNode/DEFMAXSIZE"/> <xsl:with-param name="BlkSize" select="$BlkSize"/> </xsl:call-template> </xsl:if> <xsl:if test="$StorageNode/CACHEHINT or $StorageNode/DEFBUFPOOL"> <xsl:apply-templates select="$StorageNode/CACHEHINT | $StorageNode/DEFBUFPOOL"/> </xsl:if> </xsl:if> </xsl:element> </xsl:if> </xsl:template> <xsl:template match="CACHEHINT | DEFBUFPOOL | BFP_STG"> <!-- ******************************************************************* Template: CACHEHINT | DEFBUFPOOL - output BUFFER_POOL value ******************************************************************** --> <!-- BUFFER_POOL is the least significant 2 bits (bit [0-1]) --> <xsl:element name="BUFFER_POOL"> <xsl:choose> <xsl:when test="(. mod 4)=1">KEEP</xsl:when> <xsl:when test="(. mod 4)=2">RECYCLE</xsl:when> <xsl:otherwise>DEFAULT</xsl:otherwise> </xsl:choose> </xsl:element> <!-- new cachehint FLASH_CACHE/ CELL_FLASH_CACHE requires 11.2 comp --> <xsl:if test="$VERSION>=1102000000"> <!-- FLASH_CACHE is the next 2 bits (bit [2-3]) --> <xsl:element name="FLASH_CACHE"> <xsl:choose> <xsl:when test="floor((. mod 16) div 4)=1">KEEP</xsl:when> <xsl:when test="floor((. mod 16) div 4)=2">NONE</xsl:when> <xsl:otherwise>DEFAULT</xsl:otherwise> </xsl:choose> </xsl:element> <!-- CELL_FLASH_CACHE is the next 2 bits (bit [4-5]) --> <xsl:element name="CELL_FLASH_CACHE"> <xsl:choose> <xsl:when test="floor((. mod 64) div 16)=1">KEEP</xsl:when> <xsl:when test="floor((. mod 64) div 16)=2">NONE</xsl:when> <xsl:otherwise>DEFAULT</xsl:otherwise> </xsl:choose> </xsl:element> </xsl:if> </xsl:template> <xsl:template name="Tablespace"> <xsl:param name="ParentNode" select="''"/> <!-- ******************************************************************* Template: Tablespace Parameters: ParentNode - Parent node of TS_NAME or DEFTS_NAME ******************************************************************** --> <xsl:if test="not ($TABLESPACE=0)"> <xsl:if test="$ParentNode/TS_NAME or $ParentNode/DEFTS_NAME"> <xsl:element name="TABLESPACE"> <xsl:value-of select="$ParentNode/TS_NAME"/> <xsl:value-of select="$ParentNode/DEFTS_NAME"/> </xsl:element> </xsl:if> </xsl:if> </xsl:template> <xsl:template name="LoggingClause"> <xsl:param name="Partitioned" select="''"/> <xsl:param name="FlagsNode" select="''"/> <xsl:param name="DefloggingNode" select="''"/> <xsl:param name="PartitionType" select="''"/> <!-- ******************************************************************* Template: LoggingClause Parameters: Partitioned - 0 = non-partitioned, non-0 = partitioned FlagsNode - FLAGS node with logging/nologging bit (tab$.flags) DefloggingNode - DEFLOGGING node (partobj$.deflogging) PartitionType - RANGE, HASH, LIST, '' ******************************************************************** --> <xsl:choose> <!-- non-partitioned, either a non-partitioned table or a leaf partition --> <xsl:when test="$Partitioned=0"> <xsl:choose> <xsl:when test="string-length($PartitionType)=0"> <xsl:element name="LOGGING"> <xsl:choose> <xsl:when test="($FlagsNode mod 64)>=32">N</xsl:when> <xsl:otherwise>Y</xsl:otherwise> </xsl:choose> </xsl:element> </xsl:when> <!-- a leaf partition: NoLogging is bit 0x04 in FLAGS=1 (in tabpart$) --> <xsl:when test="($FlagsNode mod 8)>=4"> <xsl:element name="LOGGING">N</xsl:element> </xsl:when> </xsl:choose> </xsl:when> <!-- partitioned --> <xsl:otherwise> <xsl:choose> <xsl:when test="$DefloggingNode=1"> <xsl:element name="LOGGING">Y</xsl:element> </xsl:when> <xsl:when test="$DefloggingNode=2"> <xsl:element name="LOGGING">N</xsl:element> </xsl:when> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="ParallelClause"> <xsl:param name="ParentNode" select="''"/> <!-- ******************************************************************* Template: ParallelClause Parameters: ParentNode - Parent node of DEGREE ******************************************************************** --> <!-- For compatibility support both old and new syntax --> <xsl:if test="$ParentNode/DEGREE"> <xsl:choose> <!-- old syntax: PARALLEL (DEGREE n [INSTANCES m]) For this we use a PARALLEL_DEGREE element --> <xsl:when test="32767>($ParentNode/INSTANCES)"> <xsl:element name="PARALLEL_DEGREE"> <xsl:choose> <xsl:when test="$ParentNode/DEGREE=32767"> <xsl:element name="DEGREE">DEFAULT</xsl:element> </xsl:when> <xsl:otherwise> <xsl:element name="DEGREE"> <xsl:value-of select="$ParentNode/DEGREE"/> </xsl:element> </xsl:otherwise> </xsl:choose> <xsl:choose> <xsl:when test="$ParentNode/INSTANCES=32767"> <xsl:element name="INSTANCES">DEFAULT</xsl:element> </xsl:when> <xsl:when test="32767>$ParentNode/INSTANCES"> <xsl:element name="INSTANCES"> <xsl:value-of select="$ParentNode/INSTANCES"/> </xsl:element> </xsl:when> </xsl:choose> </xsl:element> </xsl:when> <!-- new syntax PARALLEL [n] --> <xsl:otherwise> <xsl:element name="PARALLEL"> <xsl:choose> <xsl:when test="32767>($ParentNode/DEGREE)"> <xsl:value-of select="$ParentNode/DEGREE"/> </xsl:when> <xsl:otherwise>AUTOMATIC</xsl:otherwise> </xsl:choose> </xsl:element> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:template> <xsl:template name="DoMAXSIZE"> <xsl:param name="MaxSize">0</xsl:param> <xsl:param name="BlkSize">0</xsl:param> <!-- ******************************************************************* Template: DoMAXSIZE Parameters: MaxSize: Maxsimum Size BlkSize: Block Size ******************************************************************** --> <xsl:choose> <xsl:when test="$MaxSize=0"> </xsl:when> <xsl:when test="$MaxSize=4294967295 or $MaxSize=2147483645"> </xsl:when> <xsl:otherwise> <xsl:element name="MAXSIZE"> <xsl:choose> <xsl:when test="($MaxSize * $BlkSize) >= (2147483646 * 512)"> <xsl:text>UNLIMITED</xsl:text> </xsl:when> <xsl:when test="($MaxSize * $BlkSize) > 2147483647"> <xsl:value-of select="floor(($MaxSize * $BlkSize) div 1048576)"/> <xsl:text>M</xsl:text> </xsl:when> <xsl:otherwise> <xsl:value-of select="$MaxSize * $BlkSize"/> </xsl:otherwise> </xsl:choose> </xsl:element> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de