Candidate

1.0 (2016-10-08)

Background

Mallard is designed to be simple, while still providing many powerful features, many of which cannot be found in heavier XML formats. Though it has shown itself to be easy to learn, there is still considerable resistance to using XML in various settings.

Mallard has a clear separation between info, block, and inline elements, and is strict about which context elements appear in, even with extensions. This makes it easier to represent the entire Mallard infoset in another syntax with little loss of functionality.

The Ducktype syntax specified here is guided by the following goals:

  • Simple things should be simple. Paragraphs should be implicit, and commonly used elements like lists should be easy to type.

  • The language should have minimal syntactic constructs. Many lightweight formats use different special characters for each feature. This makes it difficult to remember which characters have to be escaped, difficult to add new features, and difficult to extend the syntax for special-purpose uses like code comments.

  • The language should be fully semantic, even with the inline elements.

  • The language should not arbitrarily restrict nesting. Some leightweight formats don't allow extra block content in places like list items or tables, and some don't allow inline content in code blocks or screens.

  • The syntax should accomodate all info elements. Info elements in Mallard are critical for the automatic linking features, and many people rely on features like revision and status tracking.

  • It should be possible to use extension content with the lightweight syntax. Many of Mallard's most interesting features come in the form of extensions or embedding other XML vocabularies. Mallard carefully defines extension behavior, and the syntax should reflect that.

© 2015-2016 Shaun McCance
cc-by-sa 3.0 (us)

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.

As a special exception, the copyright holders give you permission to copy, modify, and distribute the example code contained in this document under the terms of your choosing, without restriction.

Powered by
Mallard