> -----Original Message-----
> From: Perlman, Kenneth 
> Sent: Friday, December 14, 2001 2:31 PM
> To:   '[EMAIL PROTECTED]''
> Subject:      Porting XSL script from NT to UNIX Location of error
> unknown)XSLT Error (java.lang.OutOf MemoryError):
> 
> A set 9 xsl scripts were developed in UNIX NT environment. These
> scripts were installed on a UNIX Sun Platform. The first seven scripts
> produced the same results in both environments. The eighth script
> terminated abnormally with the
> following message:
> 
> (Location of error unknown)XSLT Error (java.lang.OutOf MemoryError):
> null
> 
> This error message indicate that OS  could not allocate memory to the
> process.
> This XSL script was executed by xalan.
> 
> The system monitors did not indicate inordinately high memory usage by
> the process.
> 
> The following is the source of the xsl script:
> 
> **************************************************************************
> *****
> <?xml version = "1.0" encoding = "UTF-8"?>
> <xsl:transform xmlns:xsl = "<http://www.w3.org/1999/XSL/Transform>"
> version = "1.0">
> <xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />
> <xsl:strip-space elements="*"/>
> 
> <!--  Transformation of pguide.xml export from PDR Concise FileMaker
> Pro application
>       Date: Oct 25, 2001
>       Programmer: Chris McCabe
>       
>       DTD: concise.dtd
> -->
> 
>       <!-- Copy all nodes over -->
>       <xsl:template match="@*|node()">
>               <xsl:copy>
>                       <xsl:apply-templates select="@*|node()"/>
>               </xsl:copy>
>       </xsl:template>
> 
>       <!-- During copy, change root node FMPDSORESULT to PDRConcise, as
> per
> the Concise DTD -->
>       <xsl:template match = "FMPDSORESULT">
>               <xsl:element name = "PDRConcise">
>                       <xsl:apply-templates select = "ROW"/>
>               </xsl:element>
>       </xsl:template>
>       
>       <!-- Transform incoming elements to DTD specified attributes where
> appropriate -->
>       <xsl:template match = "ROW">
>               <xsl:element name = "Monograph">
> <!-- Eliminated ExportVersionNumber from the DTD KAP
>                       <xsl:attribute name = "ExportVersionNumber">
>                               <xsl:value-of select =
> "ExportVersionNumber"/>
>                       </xsl:attribute>
> -->
> <!--  Duplicate piece of code         
>                       <xsl:attribute name = "Activity">
>                               <xsl:value-of select = "Activity"/>
>                       </xsl:attribute>
> -->                   
>                       <xsl:attribute name = "Status">
>                       <xsl:choose>
>                                           
>                               <xsl:when test="Status[.='1st
> Rev']">FirstRev</xsl:when>
>                                             
>                               <xsl:when test="Status[.='2nd
> Rev']">SecondRev</xsl:when>
>                                
>                               <xsl:when test="Status[.='Final
> Ok']">FinalOk</xsl:when>
>                                
>                               <xsl:otherwise>Draft</xsl:otherwise>
>                                             
>                       </xsl:choose>
>                               
>                       </xsl:attribute>
>                       
>                       <xsl:attribute name = "MonoID">M<xsl:value-of select
> =
> "FileID"/></xsl:attribute>
>                       
>                       <xsl:attribute name = "LastModifiedDate">
>                               <xsl:value-of select = "ModDate"/>
>                       </xsl:attribute>
>                       
>                       <xsl:attribute name = "CreatedDate">
>                               <xsl:value-of select = "ModDate"/>
>                       </xsl:attribute>
>               
> <!--                  MPGExport was eliminated from the DTD KAP
>                       <xsl:attribute name = "MPGExport">0</xsl:attribute>
> -->                                           
>                       <xsl:attribute name = "LastEditor">
>                               <xsl:value-of select = "FileOwner"/>
>                       </xsl:attribute>
>                       
>                       <xsl:attribute name = "AlertsReferences">
>                               <xsl:value-of select = "AlertCntNo"/>
>                       </xsl:attribute>
>                       
>                       <xsl:attribute name = "SplitsReferences">
>                               <xsl:value-of select = "SplitCntYes"/>
>                       </xsl:attribute>
>                       
>                       <xsl:attribute name = "Export">
>                       <xsl:choose>
>                                                                   
>                               <xsl:when
> test="DONOTEXPORT[.='x']">1</xsl:when>                              
>                               <xsl:otherwise>0</xsl:otherwise>
>                                                                     
>                       </xsl:choose>
>                       </xsl:attribute>
> 
>                       <xsl:attribute name = "GenericOnly">
>                       <xsl:choose>
>       
> 
>                               <xsl:when
> test="GenericOnlyFlag[.='yes']">1</xsl:when>                        
>                               <xsl:otherwise>0</xsl:otherwise>
>       
> 
>                       </xsl:choose>
>                       </xsl:attribute>
>                       
>                       <xsl:attribute name = "PDRDrug">
>                       <xsl:choose>
>       
> 
>                               <xsl:when
> test="PDRorNon[.='yes']">1</xsl:when> 
>                               <xsl:when
> test="PDRorNon[.='Yes']">1</xsl:when> 
>                               <xsl:when
> test="PDRorNon[.='No']">0</xsl:when>  
>                               <xsl:otherwise>0</xsl:otherwise>
>       
> 
>                       </xsl:choose>
>                       </xsl:attribute>                
>                       
>                       <xsl:attribute name = "Activity">
>                       <xsl:choose>
>       
> 
>                               <xsl:when
> test="Activity[.='']">Inactive</xsl:when>     
>                               <xsl:when
> test="Activity[.='In-active']">Inactive</xsl:when>    
>                               <xsl:otherwise>Active</xsl:otherwise>
>       
> 
>                       </xsl:choose>
>                       </xsl:attribute>
> <!-- Duplicate piece of code: KAP                     
>                       <xsl:attribute name = "DrugInactiveDate">
>                               <xsl:value-of select = "ActiveDate"/>
>                       </xsl:attribute>
> -->
>                       <xsl:attribute name = "DrugInactiveDate">
>                               <xsl:value-of select = "ActiveDate"/>
>                       </xsl:attribute>                
>                       
>                       <FileID>
>                               <xsl:value-of select="FileID"/>
>                       </FileID>
>                       
>                       <MonographName>
>                               <xsl:value-of select="MonoNameCal" />
>                       </MonographName>
> 
>                       <BlackBoxWarning><xsl:value-of
> select="BlackBoxWarning"/></BlackBoxWarning>
>                                               
>                       <xsl:apply-templates/>
> 
>               </xsl:element>  
>               
>       </xsl:template>
>       
>       <!-- Filter out fields we don't need...no particular order specified
> -->
>       <xsl:template match = "Indications | HowSupplied | SubClass |
> GenericName | BrandName | FileID | ExportVersionNumber | Activity |
> Status | LastModified | FileOwner"/>
>       <xsl:template match = "BlackBoxWarning | AlertCnYes | SplitCnYes |
> DoNotExport | MPGDoNotExport |GenericOnlyFlag" />
>       <xsl:template match = "MonoNameCal | PediatricDose  | TherSubClass |
> Manufacturer | PDRorNon | ActiveDate | global | Global2 | Bold |
> Italic"/>
>       <xsl:template match = "Dosage | Count_Test | Readme |
> Manufacture_Cal
> | Count_Test | BrandNameCal"/>
>       <xsl:template match = "WordCount | Sub | Sup | GNameSalt |
> Description | Titlestart | ImportPassword"/>
>       <xsl:template match = "DateSentOut | ReadMe | forexport | forexport2
> | Checkbox1 | checkbox2 "/> <xsl:template match = "exportdate | entername
> | TimeMod | ExportTime
> | SaveVersion | pdrfolio "/>
>       <xsl:template match = "ManufacturerPrimary | npdfolio | optofolio |
> FolioCombo | PageCountTest | IndiGlobal | IndiPatternCnt "/>
>       <xsl:template match = "IndiWFileID | GenericPattern1 |
> GenericPattern1_Copy | GenericGlobal | GenericComboMain "/>
>       <xsl:template match = "GenericSpliter | ModDate | GenericP1 |
> GGenericP2 | ComboStamp | ComboToggle | ComboHeader "/>
>       <xsl:template match = "BrandNamePrimary | GenericP2 | ComboHeader2 |
> Client | FinalExportToggle | ClientExportDate | ClientExportTime  "/>
>       <xsl:template match = "ExportTest1 | FileIDClientCal |
> TestForMissing
> | lientPlusNo | ComboName  | ClientPattern "/>
>       <xsl:template match = "DONOTEXPORT | BrandNamePrimaryCheck |
> MonoNameText | ExportLine | BrandComboMain | Cat2IndexText "/>
>       <xsl:template match = "TherSubSub_Original | TimeSentOut |
> GNameSaltTrim | StyleCheckbox | DosageTrim | StyleCheckbox |
> GNameSaltTrim | Cat2IndexOptioal "/>
>       <xsl:template match = "PrimaryManufacturer | OldSubClass |
> OldTheraputicClass | BookCode | SplitCnNo | PutInDate |  ClientPlusNo
> | SplitCntYes | AlertCntNo | AlertCntYes | FolioCombined"/>
>       
>       <!-- Remove any elements with the string _TRIM in their name -->
>       <xsl:template match="ROW/*[contains(name(),'_TRIM')]">
>          <!-- do something -->
>       </xsl:template >
>       
> 
>       <xsl:template match="DEAClass">
>       <DEAClassification>
>       <xsl:attribute name = "DEAClass">
>               <xsl:value-of select = "/FMPDSORESULT/ROW/DEAClass"/>
>       </xsl:attribute>        
>       </DEAClassification>
>       </xsl:template>  
> 
>       <!-- prepare MasterDrugInfo element and corresponding child elements
> as per the DTD -->
>         <xsl:template match="ThrepaeuticClass">
>               <MasterDrugInfo>
>                       <TherapeuticClassificationEntry>
>                               <xsl:element name="TherapeuticCategory">
>                                       <xsl:apply-templates
> select="@*|node()"/>
>                               </xsl:element>
>                               <TherapeuticSubCategory>
>                                       <xsl:value-of select="../SubClass"/>
> 
>                               </TherapeuticSubCategory>               
>                       </TherapeuticClassificationEntry>
>                       <PhamalogicalCategory>
>                               <xsl:value-of select="../TherSubClass"/>
>                       </PhamalogicalCategory>
>                       <HowSupplied>
>                               <xsl:value-of select="../HowSupplied"/>
>                       </HowSupplied>
>                       <AdultDosage>
>                               <xsl:value-of select="../Dosage"/>
> 
>                       </AdultDosage>
>                       <PediatricDosage>
>                               <xsl:value-of select="../PediatricDose"/>
> 
>                       </PediatricDosage>              
>                       <Indications>
>                               <xsl:value-of select="../Indications"/>
> 
>                       </Indications>                  
>               </MasterDrugInfo>
>       </xsl:template> 
> 
> 
>       <xsl:template match="Contraindications">
>             <xsl:element name="Contraindications">
>                               <xsl:apply-templates select="@*|node()"/>
>               </xsl:element>
>       </xsl:template>  
>   
>       <xsl:template match="WarningPrecautions">
>               <xsl:element name="WarningPrecautions">
>                       <xsl:apply-templates select="@*|node()"/>
>               </xsl:element>
>       </xsl:template>  
>       
>       <xsl:template match="//B|//I">
>               <xsl:element name="Emphasis">
>                       <xsl:apply-templates select="@*|node()"/>
>               </xsl:element>
>       </xsl:template>  
>       
>       <xsl:template match="SUP">
>                       <xsl:element name="Superscript">
>                               <xsl:apply-templates select="@*|node()"/>
>                       </xsl:element>
>       </xsl:template>         
> 
>       <xsl:template match="SUB">
>                       <xsl:element name="Subscript">
>                               <xsl:apply-templates select="@*|node()"/>
>                       </xsl:element>
>       </xsl:template>         
> 
>  
> </xsl:transform>
> 
> 
> **************************************************************************
> *****
> I need some help in addressing this problem
> 
> Ken Perlman
> 

Reply via email to