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.
Created new XSL transformation servlets for generating Javascript includes and HTML to demonstrate RSS output. Both classes extend the abstract ParseServlet class with different XSL stylesheet references, output method and HTTP Content-Type headers.
Added further JavaDoc comments to the SourceType class to clarify the use of the overloaded constructor for "lesser" output types, particularly Javascript, where XML output is not applicable. In these cases, the HTML and XML type arrays are filled with default values, application/x-javascript.
Added new servlet configuration to Ant filters file for deployment at next re-start.
Actions: Ask a question about this post, seek clarification or offer a correction.
Changed the getFirstParameter method in ServletUtilities to return the first named parameter of several that is not the empty string. Former behaviour was to return null if the first was empty.
Corrected handling of single item feeds in the draft RSS Cascading Style Sheet.
Actions: Ask a question about this post, seek clarification or offer a correction.
Re-drafted the presentation of the RSS Cascading Style Sheet, RSS.css, with compatibility adjustments for Firefox 0.8 (Mozilla) and Internet Explorer 5.5. At present, style rules with escapes for namespace colons (\:) do not work in Firefox and the CSS3 namespace syntax does not work either. The only browser that largely supports the styles is Opera 7.23, so other user agents are excluded.
/*
Channel styled as floating metadata
side bar for more advanced user
agents, where the first-child
selector and colon escape is
recognised.
*/
channel {
display: none;
}
/*
Override for supporting user agents.
*/
rdf\:RDF channel:first-child{
display: block;
width: 32%;
float: right;
background: #EEF;
color: #333;
border: solid 1px #CCC;
padding: 0.5em;
margin-left: 1em;
}
Added selectors to the draft DC style sheet, DC.css for all standard Dublin Core elements and qualifiers.
Changed the CSS references in the XHTMLtoRSS and XHTMLtoDemo XSL stylesheets to just /styles/RSS.css for simpler cross-site deployment.
Actions: Ask a question about this post, seek clarification or offer a correction.
Adjusted the FAQ DTD to permit span elements in pre elements, as with standard HTML, for styling the output.
Actions: Ask a question about this post, seek clarification or offer a correction.
Created a new XHTMLtoDemo XSL stylesheet to demonstrate Code Style RSS transformations in HTML format. This version is adapted from the XHTMLtoJS stylesheet, with additional parameters to dynamically assign the output markup elements and class attributes. The default output is in definition list format, as with the Javascript version, now retro-fitted with equivalent parameters.
Changed the DCElements XSL template to import the AlphabetCase variable template directly, rather than through top level "client" templates. Updated XHTMLtoRDF, XHTMLtoRSS and XHTMLtoJS stylesheets accordingly and added dcterms:requires elements to record these include dependencies.
Removed redundant variables from the XHTMLtoJS stylesheet (carried over from the XHTMLtoRSS version), cut out redundant namespace declarations and set the output type to text. Amended the test case document index page for the Javascript include servlet to ensure the test query parameter is present in all cases.
Actions: Ask a question about this post, seek clarification or offer a correction.
Implemented a draft Javascript include transformation in the private JAXP servlet for development testing. Created a new XHTMLtoJS XSL transformation to generate a news feed equivalent to ParseRSS in Javascript. First draft generates definition list markup by default.
Prepared a new set of test case documents for the Javascript output based on those for ParseRSS to check "e; entity and literal quote handling in particular.
Added a setOmitXmlDeclaration method to the ParseHandler class only to find that Apache Xalan version 2.4.0 will not override the value set in the XSL stylesheet output element. Added test cases to ParseHandlerTest to confirm the setting is applied correctly. Not critical, downloaded a recent version of Xalan to test further.
Adjusted the Thread delay in the ResultCacheTest and ResultValueTest classes to 10ms to give the cache entries enough time to expire and be purged.
Actions: Ask a question about this post, seek clarification or offer a correction.
Added a getParameter method to the JAXP ParseHandler class for unit testing the ParseRSS servlet's setParameters method.
Actions: Ask a question about this post, seek clarification or offer a correction.
Added a new FAQ answer on the WARP connector service example included in the default Tomcat server configuration.
Actions: Ask a question about this post, seek clarification or offer a correction.
Created new draft Cascading Style Sheet for formatting RSS 1.0 and Dublin Core metadata elements in XML for an enhanced version of the XHTMLtoRSS transformation. The RSS style sheet imports the Dublin Core style sheet for modular re-use with RDF.
Made error logging a standard feature of the abstract ParseServlet class for HTTP 500 and 400 errors. Added a test case for the new uri stylesheet parameter in the ParseRSS servlet.
Added a setEncoding method to the TidyDriver class for more specific handling of input from third party Web sites.
Adjusted the Code Style XHTML "Lax" version DTD to remove the bgcolor attribute from the general %corruptattrs; entity and added it to tr element directly. Also added an implied TEXTTOP attribute to the %ImgAlign; entity and initial case method attribute values for the form element.
Actions: Ask a question about this post, seek clarification or offer a correction.
Changed the command line handling of the TidyFile class and TidyDriver module to take a configuration file to help file a bug report for JTidy. When Unicode quote entities are used inside attributes, JTidy converts them to literal quotes in clean mode, resulting in invalid markup.
Actions: Ask a question about this post, seek clarification or offer a correction.
Added ResultValue constructors to take a source modified date to pass back for request logging. May be useful for cache management purposes too.
Actions: Ask a question about this post, seek clarification or offer a correction.
Adjusted all ResultValue methods according to test case results and added a delete method to remove the cache file or mark it for deletion on exit if it is in use. The cache file reference is reset immediately pending destruction of the ResultValue instance and the ResultCache entry it is associated with.
Updated the delete, empty, save and load methods of ResultCache to deal with physical cache storage before modifying the cache Hashtable. Also added a size() method. Added new JUnit test cases for empty and purge methods.
Overloaded the isReadableFile method of IOUtilities with a File argument to complement the file path String version.
Actions: Ask a question about this post, seek clarification or offer a correction.
Added static getLocator, getPrefix and getSuffix methods to the draft XSL ResultCache class and private static final Strings for the cache file prefix and suffix.
Updated the special purpose HTML head element include files to the new ICRA scheme PICS rating.
Actions: Ask a question about this post, seek clarification or offer a correction.
Updated the PICS rating in the general header include file to the ICRA scheme.
Actions: Ask a question about this post, seek clarification or offer a correction.
Implemented a draft XSL transformation class hierarchy based on Neko HTML for testing on Internet. This version compiled but did not run successfully, so set aside for time being.
Actions: Ask a question about this post, seek clarification or offer a correction.
Test case Internet HTML documents identified a range of shortcomings with the current release of JTidy. In particular, XHTML attribute values, e.g. (top|middle|bottom|left|right), are not converted to lower case. Added default alt attribute to TidyDriver configuration and a setFpi method with default "-//Code Style//XHTML 1.0 Lax//EN" Document Type Declaration.
Started preparing an xhtml1-transitional-lax.dtd version of the W3C DTD to permit various corruptions in JTidy output from Internet tag soup, primarily to process metadata. Lax version concessions include many proprietary features in common use:
%corrupt; entity for non-standard elements, added to the general %Flow; entity for:
layer
ilayer
nolayer
embed
noembed
%corruptattrs; entity to apply non-standard attributes to heading elements and images!
nowrap
border
bgcolor
body: Implied topmargin, leftmargin, rightmargin, bottommargin, marginheight and marginwidth.
br: Implied align attribute!
hr: Implied color attribute.
iframe: Implied border, bordercolor, hspace and vspace attributes and additional no value for frameborder attribute.
img: Implied color!
input: Implied attributes for image types including height, width, vspace, hspace and border.
script: Implied name (a Frontpage feature).
td and th: Implied background and bordercolor.
table: Implied height, bordercolor, background, bordercolordark and bordercolorlight attributes.
form: Implied action attribute (e.g. Javascript navigation).
textarea: Implied cols and rows!
area: Implied alt text.
%ImgAlign; (and added ABSBOTTOM, ABSMIDDLE and CENTER values)
%TextAlign;
%LAlign;
%TAlign;
%cellhalign; (and added MIDDLE value)
%CAlign;
%cellvalign; (and added CENTER value)
br: clear.
hr: align.
iframe: scrolling.
Adapted the setParameters template method of the ParseRSS servlet to pass the document URI and channel URI to the XSL stylesheet. Also changed the name of the parameter for the service-url part of the channel identifier and adjusted to accept the full URL from the servlet.
Actions: Ask a question about this post, seek clarification or offer a correction.
Changed the makeUrl methods in ServletUtitlities to throw MalformedURLException rather than return null with problem cases. Corrected handling of HTTP POST requests in SourceBrokerFactory to allow uppercase protocol and catch MalformedURLExceptions from ServletUtilities' makeUrl method. Updated all test cases to the new scheme and added tests for the new cases in SourceBrokerFactory.
Created an UntrustedHttpBroker class as a SourceBroker interface to the new UntrustedHttpContentRequest, with test suites for all methods.
Added a getBufferedInputStream method to the abstract IORequest class that calls the getInputStream template method in all subclasses. Used the BufferedInputStream method in the new UntrustedHttpBroker class to pass input via TidyDriver.
Created an initial JUnit test suite for the TidyDriver class including a parse test on 9 files in concurrent threads. Added the test file directory to the Ant build parameters.
Removed the sans serif Univers font from the Serif font sampler, which had been copied inadvertently from the Sans serif font sampler page.
Actions: Ask a question about this post, seek clarification or offer a correction.
Created a configurable TidyDriver class to wrap an instance of JTidy, which can be run as an independent Thread. Also created a TidyFile client for basic testing and started testing Web pages at large via a private implementation of ParseRSS.
Overloaded the isWritableDirectory method of IOUtilities with a File argument, to supplement the String version.
Actions: Ask a question about this post, seek clarification or offer a correction.
Changed all methods in the static DriverUtilities class to throw SQLException if the database vendor is not known, rather than return null, and all case matching to switch statements. Updated the private FontStats class to catch the new DriverUtilities exception scheme.
Added an executeUpdate method to the DatabaseUtilities class with basic statement validation. Changed the toHTMLTable in DBResults to take a class attribute instead of a literal background color for greater flexibility.
Actions: Ask a question about this post, seek clarification or offer a correction.
Created a first draft UntrustedHttpContentRequest based on TrustedHttpContentRequest for testing.
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.