Semantic HTML Generator
The XHTML Semantic Generator was created as the dissertation project of my Computing degree. The project aim was to create a piece of software that accomplished a particular aim, and credit was given for originality and the quality of the system and it's results.
The specific goal of this system was to provide a resource for web developers, filling a gap in current web development software. Specifically, it would demonstrate how to improve websites by displaying alternative methods of coding and structuring markup. Instead of providing examples as is currently the practive with online tools, this system would provide feedback by analysing the markup of a site from a user supplied URL, and give a response in the form of improved and annotated code, if needed.
The system was designed to fulfill these aims in three succinct stages, each performing a different task to achieve the overall goal of the system.
The first, and most complex of the stages involved parsing the HTML/XHTML markup of the supplied URL and identifying all inline styling used in the code.
The detected inline styles would then be converted to CSS based styles. This was achieved by creating a knowledge base of stylesheet rules and matching these to inline style equivalents. One failing of the system at this stage was the lack of equivalents for some inline style attributes, meaning some parts of the markup could not be converted.
The system would then provide feedback to the user in the form of a generated stylesheet and markup sans inline styles. A size comparisionwas also used to give a quantitive advantage of using the methods described to markup the code.
The second stage of the system utilised the same HTML parser to identify media objects within the markup. Due to the tight timescale of the project, this was limited to image objects, although expansion would not be difficult in the future. Identified image objects would be analysed for alternative(ALT) and title attributes and if lacking, would be presented to the user to add the additional information.
The system would then add the information to the original markup and display it to the user, allowing them to use the code themselves.
The third stage of the system was intended to aid developers in creating simple CSS based layouts by providing a simple interface and a number of options before generating markup. This would allow users to identify how the stylesheets worked and what was changed in each layout example.
The project the system was part of gained a mark of 74%, (first class), and has been discussed on a number of standards-focused websites. It is still available to view at experiment.beseku.com/generator/.