This page is part of a searchable archive of the Code Style site log. Technical implementation notes that shed light on when, why and how the site has evolved since 2000.
Follow the latest entries to the site log.
Updated the Code Style font survey results, and the browser reference table with a number of new releases: OmniWeb 563.46 and Camino 0.9 alpha 2 for Mac, Firefox 1.0.5 for Mac and Windows, and Opera 8.01 for Windows.
Actions: Ask a question about this post, seek clarification or offer a correction.
NullPointerException, 30th July 2005
Noticed NullPointerException being reported with the Dublin Core RDF test cases, which are set to return a text/plain rendering of the XML/RDF output. Eventually traced this back to the version of Apache Xalan in the Sun Java 1.5, JAXP 1.3 release. Xalan appears to throw this exception when the XSL output method for an XML template is set to text and there are non-XSL namespace elements in the output.
Corrected the Xalan processing problem by returning a fixed XSL output type from the ResultType classes, RdfResultType, RssResultType, XhtmlResultType and JavascriptResultType. These types now modify only the HTTP Content-Type in response to the type request parameter and client Accept header. In retrospect, it was incorrect and unnecessary to change the XSL output method in this case, which appears to have been silently ignored by the earlier version of Xalan.
Took the opportunity to update the JavascriptResultType with the application/javascript content type, see the IETF Scripting Media Types draft.
Added Apache Log4J loggers to several XSL result proxy component classes to help trace the Xalan NullPointerException issue, namely: AbstractParseServlet, ResultMarshaller, ResultProxy and SAXTransformer. Set the logging level to DEBUG in most cases, with some WARN statements to monitor caught exceptions.
Actions: Ask a question about this post, seek clarification or offer a correction.
SAXParseException, 25th July 2005
Modified the SAX StrictErrorHandler to throw a ReportingParseException. ReportingParseException is a subclass of SAXException that is constructed with a SAXParseException and gives a detailed validation error message. Also created a set of test documents to check the message details.
Actions: Ask a question about this post, seek clarification or offer a correction.
Added an override to the CSStdLayoutCommon.css style sheet for the overflow: auto rule for pre-formatted text. Clients that do not support the overflow property, like Internet Explorer 6, make the page too wide and break the floated layout of the page. This workaround hides the override with a CSS level 2 child selector.
/*
Longer preformatted lines take more
width.
*/
#Content pre.Wide,
#Content dl dd pre.Wide {
margin-right: 0;
}
/*
Override for user agents that support
overflow.
*/
body > #Content pre.Wide {
margin-right: 31%;
overflow: auto;
}
body > #Content dl dd pre.Wide {
margin-right: 32%;
overflow: auto;
}
Actions: Ask a question about this post, seek clarification or offer a correction.
Added new answers to the Java language, programming, servlets, HTML and site manager sections, as follows.
Actions: Ask a question about this post, seek clarification or offer a correction.
Discovered that Java 1.5 with JAXP 1.3 has stricter XML validation while upgrading the Metacentric service to a new host. The new Apache Xerces parser supports the W3C Namespaces in XML 1.1 recommendation, in which attributes of type ID must not contain any colons. This caused SAX validation problems with some Code Style form fields that had colons in their label/id pairs. Removed colons from all affected pages.
The new compiling XSL transformer also inserts HTML format meta http-equiv elements for UTF-8 encoding into the document flow for XSL templates with the output method html. Empty elements are also forced to HTML format, even when generated in XHTML form. Had to modify the Code Style XhtmlType class to return the xml output type for XSL transformations and amend test cases accordingly.
Actions: Ask a question about this post, seek clarification or offer a correction.
ClientAbortException, 20th July 2005
Discovered Tomcat 5.5.4 throws a ClientAbortException when clients terminate HTTP connections before it has a chance to flush its output buffers. This is logged at the WARN level, so is quite conspicuous, but should not be regarded as a problem apparently. The exception is thrown on a worker thread which is issued from a thread pool, but Jason Brittain says the application is designed to handle this efficiently.
Actions: Ask a question about this post, seek clarification or offer a correction.
ResultCache, 19th July 2005
Extracted various concrete methods from ResultCache to create a new AbstractResultCache base class, to simplify the creation of types with different storage mechanisms. Also removed the file-specific getStoreModified() method from the CacheValue interface to make the overall scheme more flexible.
Also refactored AbstractParseServlet to introduce new template methods getResolver and getCache so that implementations can load an alternative SAX EntityResolver or Cache type. Created an AbstractParseServletBase with a shared implementation of the new template methods for the standard parse servlets.
Actions: Ask a question about this post, seek clarification or offer a correction.
Added new answers to a range of FAQ pages and split the Java language answers out into a new page. Some questions needed re-classification.
Actions: Ask a question about this post, seek clarification or offer a correction.
Find technical implementation notes on all aspects of the Code Style site.
For a summary overview, see the annotated site log contents.