Portfolio
Websites
S.W.A.T.T Vehicle Outfitters
This was the website for the former S.W.A.T.T Vehicle Outfitters vehicle customization shop.
- Real‐World Standards Compliance
-
- Tested to work across a wide range of user agents (Web Browsers) including Microsoft Internet Explorer, Mozilla Firefox, Safari, Opera, Konquer, Lynx, Pocket Internet Explorer, and mobile phone browsers (NetFront).
- Written in 100% valid XHTML 1.1 & CSS.
- Serves XHTML Pages using XHTML MIME Media Type (application/xhtml+xml)
- Pages are content negotiated and dynamically converted to HTML 4.01 Strict if HTML is preferred or XHTML is underspecified.
- Follows good URI practice as describe in "Cool URIs don't change" and Understanding URIs found in "Common HTTP Implementation Problems (CHIPS)". Most notably all URIs are thought out, file system independent and do not contain file extensions.
- Uses proper typography
- Smart or curly quotes ( “ ”, ‘ ’ ) over (neutral) quotation mark, apostrophe‐quote and misused grave accent mark ( ", ', ` )
- Hyphen ( ‐ ) and minus sign ( − ) used over common hyphen‐minus ( - )
- Use of en and em dashes ( –, — ) over commonly misused hyphen‐minus ( - )
- Use of a right single quotation mark ( ’ ) over apostrophe ( ' ) as recommend in Unicode
- Double prime ( ″ ) and prime ( ′ ) (for inch and feet respectively) over misused quote ( " ) and single quote ( ' )
- Fraction slash ( ⁄ ), division slash ( ∕ ), division symbol ( ÷ ) over more ambiguous solidus ( / )
- Multiplication sign ( × ) instead of ‘x’ or asterisk ( * )
- Website Specific
-
- Dynamic Tire Comparison Calculator
- Uses standard DOM (Core, HTML) 1.0 methods
- Written in 100% EMCAScript
- Works even if scripting is unsupported or disabled.
- Dynamic Image Gallery
- XML Based
- Dynamically created and cached images
- Dynamic Tire Comparison Calculator
S.W.A.T.T Vehicle Outfitters ― Redesign (Incomplete)
This website was the work‐in‐progress redesign for S.W.A.T.T Vehicle Outfitters website. Unfortunately S.W.A.T.T ceased operation before it could go live. This website incorporates all of the features found in the original design with a few changes and improvements listed below.
- Written in 100% valid XHTML 1.0 Strict for better compatibility with HTML 4.01
- Improved Dynamic tire comparison calculator
- Much improved dynamically created image preview
- Larger easier to read
- Directly accessable from all pages.
- Simplified Image Gallery
- All imgages created dynamically as requested
- Watermarks placed in top‐left and bottom‐right corners of full‐sized images
- On large previews images are resized, alpha-gradient placed on bottom of image, and collection title is placed on‐top of the gradient.
- On small previews images are resized, blue bar is placed on bottom of image, and collection title is placed on‐top of the bar.
- Removed descriptions
- Larger full‐sized images
- Larger image previews
- All imgages created dynamically as requested
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Projects
XHTML 1.0 Strict To HTML 4.01 Strict
XSLT
URI: http://j.porter.name/code/xhtml-1.0-strict-to-html-4.01-strict-xslt
This is an extensible stylesheet transform (XSLT) that will convert a XHTML 1.0 Strict document into an equivalent HTML 4.01 Strict document. Unlike others I’ve seen this one is very comprehensive and deals with a number of little known inconsistencies.
-
Due to differences in XHTML 1.0 and HTML 4.01, specifically with the interpretation of
nameandidattributes, your result HTML may not transform as expected. The sylesheet errs on the side of caution to ensure a valid XHTML 1.0 Strict input document returns a valid HTML 4.01 Strict output document. Semantically your XHTML 1.0 and HTML 4.01 will be equivalent, however, external resources, not defined in the XHTML 1.0 or HTML 4.01 specifications (e.g. stylesheets, scripts), that rely on the presence ofnameattributes, the position of child elements of thehead, or the ordering ofbaseelement may be affected. More information can be found in the comments of the stylesheet itself. Support for the
xml-stylesheetproccessiong instructions as defined in Associating Style Sheets with XML documents Version 1.0 [http://www.w3.org/1999/06/REC-xml-stylesheet-19990629/] is only available to XSLT Version 2.0 or compatible processers.
(X)HTML
HTTP Content Negotiation in PHP
URI: http://j.porter.name/code/php-(x)html-content-negotiation
This code will properly dertermin whether or not to serve a HTML or XHTML document using HTTP content negotiation rules. Because of the current state of HTTP user agents there are a number of configuration options (listed below) to better obtain a desiable result. This has only been tested with WordPress.
- NEGOTIATE_HTML_TRANSFORM: Determines whether any content neigation will occur. Values are True or False. Default value is True.
- TRANS_PREFERENCE: If both HTML and XHTML types are acceptable, but have the same quality this value can force one type or the other. Values are html, xhtml, & none. Default value is 'html'.
- ACCOUNT_FOR_SPECIFICITY: Less specific mataches are less important then more specific matches. This is not part of standard HTTP content neigtioan but is included for compatibliy with current practice user agent Accept header strings. As an example if a user agent sends "*/*, text/html" then both XHTML and HTML have a quality of 1, but it is much more likely that HTML is supported while XHTML is not. Values are True and False. Default value is True.
- IMPLIED_XHTML_OVERRIDE: Overrides TRANS_PREFERENCE if XHTML is specifcally supported. Helps if user agents sends a HTTP Accept header such as "text/html, application/xhtml+xml". Values are True or False. Default value is True.