Changes to Metadata

From DrawShield Documentation
Revision as of 18:55, 3 October 2023 by Karlw (talk | contribs) (Created page with "==Stages in Drawing Shields== In creating heraldic images DrawShield goes through several stages: # Parse the blazon to create an Abstract Syntax Tree (AST) # Draw an SVG representation of the blazon, based on the AST # (optionally) convert the SVG to a different image format The AST is an XML based data structure conforming to a custom schema called BlazonML. ==The MetaData== Metadata ("data about data") in DrawShield comes from several sources: * Debugging inform...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Stages in Drawing Shields

In creating heraldic images DrawShield goes through several stages:

  1. Parse the blazon to create an Abstract Syntax Tree (AST)
  2. Draw an SVG representation of the blazon, based on the AST
  3. (optionally) convert the SVG to a different image format

The AST is an XML based data structure conforming to a custom schema called BlazonML.

The MetaData

Metadata ("data about data") in DrawShield comes from several sources:

  • Debugging information to aid in problem solving
  • Parsing errors (where the blazon is not understood, or has errors)
  • Drawing errors (if the program understands the blazon, but is unable to draw what is requested)
  • Artist credits to acknowledge the source of the images used in creating the final heraldic image

Original MetaData Handling

Originally, as the DrawShield program works through the various processing stages metadata is added to the AST, for example as <message> elements with an attribute to show the category of metadata.

As the AST is held in XML format we can include all of this in the same SVG that we create for the heraldic image, since that is also XML data (technically, the SVG <metadata> element can contain %ANY% other elements, so we just include the whole of the AST, including all of our own metadata)

Problems with the Original Approach