The Code Style Web site has evolved by the gradual refinement and accumulation of articles and features. This review is part of a fully backdated site log and archive that may help shed light on when, why and how particular features were implemented. Many of these log entries refer to the Code Style Java package, which delivers the servlet services on this site.
Subscribe to the news feed for this log:
Un-packed and repackaged the JTidy JAR excluding the W3C DOM and SAX packages to avoid conflict with the JAXP package.
Added a range of new FAQ answers in the Java, CSS, HTML and Site Manager sections.
Various further changes to the Code Style XHTML "Lax" DTD, as follows.
nobr element to the %phrase; entity for inline elements.
target attribute on td and th elements.
onload attribute to non-standard layer and ilayer elements.
allowscriptaccess attribute on the non-standard embed element.
colspan attribute on img!
valign attribute on input!
linkarea attribute to a.
Added rules to the CSPersistent.css style sheet for adding colour coding to HTML markup in pre elements:
.element {
color: blue;
background: transparent;
}
.att-name {
color: #009;
background: transparent;
}
.att-value {
color: teal;
background: transparent;
}
.comment {
color: green;
background: transparent;
}
Final pre-release check on the FAQtoXHTMLXSL stylesheet with minor amendments to comments and white space.
Made a penultimate pass through the FAQtoXHTML XSL stylesheet and supporting page templates to apply a $session-id parameter to all internal document URLs. Adapted the JAXP test servlet to pass the parameter to check correct placement throughout the set.
Adapted the match on a elements in the CopyXhtmlElements template to insert the $session-id parameter in URLs with a new HostExtractor template to test whether the href value is local or external. Test checks whether the href attribute contains the local host name, contains a "./" for a relative URL or starts with a forward slash, "/".
Modified the FAQtoXHTML XSL to generate distinct titles and metadata for all pages in the set and escaped all spaces in category and topic references to %20 with the SearchAndReplace template. Added new internal templates to apply Dublin Core meta element formatting to individual items from ID references and item titles.
Changed all REQUIRED and IMPLIED enumerated attribute values in the Code Style XHTML "Lax" DTD to CDATA content to close-off indefinite second-guessing of corrupted values. Also added numerous new non-standard attributes, the Microsoft proprietary marquee element and various other adjustments for parsing Internet tag soup via JTidy.
spacer and nobr elements to the %corrupt; entity to include in %Flow; elements.
nobr element to allow block level content such as script!
target attribute on div with value of %FrameTarget; entity.
cols attribute on table.
cellspacing and cellpadding on th and td elements.
marquee element based on a sample of published documents.
name attribute for embed.
%corrupt; entity element set to the content of object, primarily for nested embed elements (Flash, etc.).
linkarea, linkid and newsid attributes to a (possibly of Visual Studio origin?).
Created a new XSL TransformerProxy class to configure and manage transformations with ResultCache. Initial implementation is based on key aspects of ParseServlet, with constructor and basic getResults method. Developed in parallel with JUnit test suite TransformerProxyTest.
Added sets of Parameters to the ResultKey class to represent XSL output attributes and XML parser features, with accessors and mutators for both. Updated the hashCode and equals methods accordingly. Updated the variable names and constructors in ResultCacheTest and ResultKeyTest to the new ResultKey scheme.
Adapted ResultKeyBuilder to the new ResultKey constructor with equivalent variables and mutators. Also updated the hasAdvancedConfiguration and newResultKey methods as necessary.
Used validation errors from the latest round of testing to further extend the Code Style XHTML "Lax" DTD. Several new examples of proprietary markup, bogus elements spacer and nobr, corruption and transposition of standard attributes to inappropriate elements.
type, width, height and size attributes on the bogus spacer element, and value TOP for the align attribute.
language attribute on the a element, based on hreflang, and a width attribute!
naturalsizeflag attribute to img (prime suspect FrontPage), plus a lowsrc attribute.
DEFAULT and BASELINE attribute values to the %ImgAlign; entity.
maxsize attribute to the input element, equivalent to maxlength, and true value for the readonly attribute.
border and wrap attributes on td and th elements.
HIDDEN value for visibility attributes in layer and ilayer elements and implied bgcolor attribute to both. Also added the %events; attributes entity to ilayer and layer.
%cellvalign; entity to the table attribute declaration and an implied name attribute.
width and ms_positioning (Front Page) attributes on the div element.
nobr element with core attributes!
fptype and menumaker attributes on the script element (Front Page).
width, bordercolor, color and border attributes on the tr element.
color attribute for li!
onresize attribute for body.
BEST value for the quality attribute of embed (Flash).
framespacing attribute to iframe!
Added a static newBroker method to SourceBrokerFactory that takes a ResultKey argument. Initial implementation only returns UntrustedHttpRequestBroker objects.
Added a freshness check to the getResult method of ResultCache and de-coupled the other cache management methods from this one.
Renamed the serviceUrl variable in the draft ResultKey class to xmlSystemId, since it may be a file source, and renamed the serviceId variable to serviceUri to double as an HTTP referrer in Web applications.
Changed the makeClone method of ResultKeyBuilder to throw an IllegalStateException rather than CloneNotSupportedException, if it is not in a basic cloneable state. Also renamed variables and JavaDoc comments to follow new ResultKey names. Amended ResultKeyBuilderTest to new exception scheme for makeClone method.
Revoked the final modifier on the doGet method of the abstract ParseServlet to override in a new subclass, and changed the visibility of xslFileName, cacheLocator and directory path separator instance variables from private to protected. Made the application home and dtdDir method variables into instance variables for use in the subclasses.
Added simple getXslOutputType and getContentType methods to SourceType to supersede the awkward String[] getResponseTypes method. Currently calls the getResponseTypes method as an adapter, which may be sufficient.
Corrected the request query component of the development testing servlet JAXP for the identifier parameter passed to the stylesheet.
Implemented "expansive" navigation in the FAQtoXHTML XSL stylesheet, so that all individual glossary and answer items' see also links refer to the relevant category pages, rather than another "solo" page. If links from topic items are not in the same topic, these also point to the relevant category page. The stylesheet now includes new functions to obtain a category from a dc:title reference and from an item ID.
Realised there was a silent bug in FAQtoXHTML with the generation of some fragment anchor links where the $identifier parameter was out of scope in various functions. The consequence was to make an href attribute value of just the fragment ID reference. Since user agents add these hash references to the end of the current URL, this worked correctly in all cases. Therefore removed the redundant $identifier parameter from these functions.
Included the AlphabetCase variables in the XHTMLtoDemo and XHTMLtoJS XSL templates for use in translate functions to make case-insensitive matches on document metadata.
Abandoned the CopyXhtmlAttributes XSL template in favour of simple xsl:copy-of elements in the CopyXhtmlElements template and master FAQtoXHTML template.
<xsl:copy-of select="@*"/>
Copying elements by the equivalent method also copies the implicit rdf, dc and dcterms xmlns attributes from the XML source, so CopyXhtmlElements makes an element-for-element transformation.
Added many more exceptional cases to the Code Style XHTML "Lax" DTD, to parse Internet tag soup passed through JTidy. Though some cases are quite alarming and indicate there are some atrocious authoring tools out there, they are not selected by the XSL stylesheets used in the ParseRSS and ParseRDF servlets and effectively cleaned-up by the transformations.
JUSTIFY value to the &TextAlign; entity.
valign, cellspacing, cellpadding attributes to the img element!
&Shape; entity for image maps.
spacer element to the &corrupt; entity for flow content based on br.
ms_positioning attribute to body and fprolloverstyle to the style element for proprietary Front Page markup.
border and align attributes on a elements!
Updated the XHTMLtoDemo XSL stylesheet to make the Dublin Core metadata match case insensitive and implemented the new Dublin Core in HTML scheme.
Wrote a simple bash script to test the draft MailApp application on the production host.
Added a further document to the Dublin Core test cases set to implement more sophisticated handling of link element metadata in the ParseRDF servlet. The key part of the processing is handled by the inclusion of the DCElements stylesheet, which now generates nested rdf:Description elements where any hreflang, title, type or charset attributes are present.
Also combined link element selection in the master XHTMLtoRDF stylesheet into a single xsl:for-each block, rather than separate cases for links with rel and rev attributes. In some instances the previous version was causing repetition of the whole set of metadata.
A recent deployment to the public site highlighted some minor shortcomings with the Code Style Java project's test arrangements that required immediate workarounds. The worst case was an errant Thread in MockEventGateTest, which never completed the testIsOpen test case. Removed this method, since the case is tested more effectively by other methods. Also changed the constructor to set a minimum delay value rather than throw an exception if the argument is too low and added a getDelay method to test.
Soft-coded the directory path in the unit test IOUtilitiesTest for appropriate handling on the production server.
Updated the XHTMLtoRSS XSL stylesheet to the new Dublin Core in HTML recommendation, including case insensitive matching on DC and DCTERMS prefixes, and link element processing, as with the XHTMLtoRDF stylesheet.
Final adjustments to the RSS.css and DC.css stylesheets before updating the ParseRSS servlet on the production server. Mainly workarounds for different levels of browser support for XML namespace selectors.
Added hreflang language handling to the DCElements XSL template, which converts values to xml:lang attributes. Corrected the recursive output on link type lists, which was stopping after the first instance of a Dublin Core element. Also corrected a conditional match on rev attributes of link elements containing DCTERMS prefixes. This stylesheet now delegates include dependency for the AlphabetCase variable template to the SchemeChooser template.
Corrected handling of MeSH scheme specification in the SchemeChooser template and implemented case insensitive matching on DCTERMS prefixes. This template now combines an xsl:variable-based test for the DCTERMS prefix with a case sensitive check for the scheme suffix.
Corrected space normalization in the Tokenizer XSL stylesheet to stop runaway recursion on multiple spaces.
Added further documents to the Dublin Core RDF test case set to check the new Dublin Core in XHTML scheme, including link elements with rev attributes, rel attributes mixed with other link types and DC and DCTERMS prefixes in lower case. Identified and corrected various issues, as above.
Added a setParameters method to the ParseRDF servlet to assign a uri parameter to the stylesheet, which is the URL of the source document. This may be overridden by a Dublin Core Identifier element in the source document if it has a URI scheme.
Implemented the new Dublin Core in HTML recommendation in the XHTMLtoRDF XSL stylesheet for meta and link elements, and delegated the include dependency for the SchemeChooser template to the DCElements template. Updated the XHTMLtoRSS template to the new include structure for the SchemeChooser template.
Updated all Code Style font survey results and added the Bigelow & Holmes Lucida font set included with the Sun Java Runtime Environment to all surveys.
Created a new database ConnectionPool class adapted from an example in Core Servlets and Java Server Pages by Marty Hall, with corrections. The original version has an incorrect case analysis in the getConnection method regarding the waitIfBusy status when there are no available connections. The three cases should be:
waitIfBusy is false (regardless of the maxConnections limit): Throw an SQLException, cannot service request.
waitIfBusy is true and the pool allocation is less than maxConnections: Make a connection in the background if there is not already one pending.
waitIfBusy is true and the pool allocation is equal to maxConnections: Wait for a connection to become available.
This may explain some surprising exception handling in the original. Needs a set of unit tests to check operation. Nonetheless, implemented the ConnectionPool class in the draft FontStats servlet to confirm basic function.
Created an initial set of XHTML test documents to check handling of new Dublin Core metadata in XHTML recommendations with the ParseRDF servlet. Firstly to check regressions against the original scheme, and to check new cases of DCTERMS prefixes in meta and link element attributes. Also includes documents to check prefix matching is case insensitive.
Added ParseJS and ParseRSSDemo servlet configuration to servlet engine pending next restart.
These backdated pages record detailed changes to the Code Style Web site since July 2000, when development first got underway. Some pages may refer to documents or features that have since changed or are no longer part of the site, but the archive is checked to ensure there are no dead links.
For a summary overview, see the annotated site log contents.