Skip to content
nin-jin edited this page Jan 17, 2023 · 9 revisions

Example

! doctype html
html
	meta @ charset \utf-8
	link
		@ href \web.css
		@ rel \stylesheet
	script @ src \web.js
	body
		div @ mol_view_root \$my_app
<!doctype html>
<html>

	<meta charset="utf-8" />
	<link href="web.css" rel="stylesheet" />
	<script src="web.js"></script>

	<body>
		<div mol_view_root="$my_app"></div>
	</body>

</html>

Vocabulary

Elements

Struct nodes with type names that conforms to QName. Example:

html
	head
		title
	body
		div
<html>
	<head>
		<title></title>
	</head>
	<body>
		<div />
	</body>
</html>
</html>

Attributes

Subtree inside @ struct node. Example:

link
	@ href \web.css
	@ rel \stylesheet
<link href="web.css" rel="stylesheet" />

Sub languages

Subtree inside % struct node followed by name of language. Example:

iframe
	@ data % uri
		path \/article
		query
			id \5
			author \jin
	@ data-config % json *
		author \jin
		article \5
<iframe
    data="/article?id=5&amp;author=jin"
    data-config="{&quot;author&quot;: &quot;jin&quot;, &quot;article&quot;: &quot;5&quot;}"
></iframe>

Comments

Subtree inside -- struct node. Example:

-- a
	@ href \/
	\home page
<!-- <a href="/">home page</a> -->

Processing instructions

? xml
	version \1.0
	standalone \yes
	\etcetera
<?xml version="1.0" standalone="yes" etcetera ?>

Document types

! doctype svg
	public \-//W3C//DTD SVG 1.1//EN
	system \http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd
<!DOCTYPE svg
	PUBLIC "-//W3C//DTD SVG 1.1//EN"
	"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"
>
Clone this wiki locally