private void parseImplicitTld ( JspCompilationContext ctxt , String path ) throws JasperException { InputStream is = null ; TreeNode tld = null ; try { URL uri = ctxt . getResource ( path ) ; if ( uri == null ) { // no implicit.tld return ; } is = uri . openStream ( ) ; /* SJSAS 6384538 tld = new ParserUtils().parseXMLDocument(IMPLICIT_TLD, is); */ // START SJSAS 6384538 tld = new ParserUtils ( ) . parseXMLDocument ( IMPLICIT_TLD , is , ctxt . getOptions ( ) . isValidationEnabled ( ) ) ; // END SJSAS 6384538 } catch ( Exception ex ) { throw new JasperException ( ex ) ; } finally { if ( is != null ) { try { is . close ( ) ; } catch ( Throwable t ) { } } } this . jspversion = tld . findAttribute ( "version" ) ; Iterator list = tld . findChildren ( ) ; while ( list . hasNext ( ) ) { TreeNode element = ( TreeNode ) list . next ( ) ; String tname = element . getName ( ) ; if ( "tlibversion" . equals ( tname ) || "tlib-version" . equals ( tname ) ) { this . tlibversion = element . getBody ( ) ; } else if ( "jspversion" . equals ( tname ) || "jsp-version" . equals ( tname ) ) { this . jspversion = element . getBody ( ) ; } else if ( ! "shortname" . equals ( tname ) && ! "short-name" . equals ( tname ) ) { err . jspError ( "jsp.error.implicitTld.additionalElements" , path , tname ) ; } } // JSP version in implicit.tld must be 2.0 or greater Double jspVersionDouble = Double . valueOf ( this . jspversion ) ; if ( Double . compare ( jspVersionDouble , Constants . JSP_VERSION_2_0 ) < 0 ) { err . jspError ( "jsp.error.implicitTld.jspVersion" , path , this . jspversion ) ; } }
Parses the JSP version and tlib - version from the implicit . tld at the given path .