-
Notifications
You must be signed in to change notification settings - Fork 19
Code Organisation
The DrawShield code is organised into three sections which function as a pipeline:
The Parser - responsible for reading and understanding the blazon language, this produces a parse tree in an XML format conforming to a custom schema known as BlazonML.
The Analyser - this takes as input the parse tree XML and carries out additional processing such as adding links, resolving cross references and so on. Its output is in the same format but with additions to the XML content.
The SVG Renderer - this takes as input the XML parse tree from the analyser and produces an SVG representation of the blazon (the XML parse tree is included as meta-data within the SVG file).
The top level file, drawshield.php is responsible for processing arguments, calling each of the pipeline stages in turn, optionally calling ImageMagick to do image format conversion and outputting the final result.
There are some additional files in the top level folder.
blazonML.XSD is an annotated XML Schema file for the BlazonML markup language. It was created in Oxygen Developer but is a standard XML schema file and can be opened in any XML aware editor.
(check this).postman A set of regression tests for the Postman API application.
shieldcommon.js Some example Javascript that uses AJAX to request a shield to be drawn and inserts the resulting SVG data into an existing web page.