<http://suika.fam.cx/www/markup/suikawiki/spec/swml-work><http://suika.fam.cx/www/markup/suikawiki/spec/swml-work><http://suika.fam.cx/www/markup/suikawiki/spec/swml-work><http://suika.fam.cx/gate/cvs/markup/suikawiki/spec/swml-work-src.en.html.u8><w@suika.fam.cx>© 2008 Wakaba. You are granted a license to use, reproduce and create derivative works of this document.
...
This section describes the status of this document at the time of its publication. Other documents might supersede this document.
This document is a working draft, produced as part of the SuikaWiki
project. It might be updated, replaced, or obsoleted by other
documents at any time. It is inappropriate to cite this document as
other than work in progress
.
Comments on this document are welcome and may be sent to the author.
There is a list of possible new features that might be introduced in a future revision of this specification.Translations of thie document might be available. The English version of the document is the only normative version.
text/x-suikawiki and
text/x.suikawiki.image Internet Media Typesdocument
element in the SuikaWiki/0.9 namespaceName attribute in
the SuikaWiki/0.9 namespaceVersion
attribute in the SuikaWiki/0.9 namespaceparameter
element in the SuikaWiki/0.9 namespacevalue element
in the SuikaWiki/0.9 namespaceclass attributeid attributeanchor element in the
SuikaWiki/0.9 namespaceanchor-internal element in the
SuikaWiki/0.9 namespaceanchor-end element in the
SuikaWiki/0.9 namespaceanchor attribute
in the SuikaWiki/0.9 namespaceanchor-external element in the
SuikaWiki/0.9 namespaceresScheme
attribute in the SuikaWiki/0.9 namespaceresParameter attribute
in the SuikaWiki/0.9 namespaceThis section is non‐normative.
This specification defines SuikaWiki Markup Language (SWML). SWML is the markup language developed and implemented for SuikaWiki hypertext system.
...
All diagrams, examples, and notes in this specification are non-normative, as are all sections explicitly marked non-normative. Everything else in this specification is normative.
The key words “MUST”, “MUST NOT”, “SHOULD”, and “MAY” in the normative parts of this document are to be interpreted as described in RFC 2119 [RFC2119].
Requirements phrased in the imperative as part of algorithms (such as “strip any leading space characters” or “return false and abort these steps”) are to be interpreted with the meaning of the key word (e.g. “MUST”) used in introducing the algorithm.
Conformance requirements phrased as algorithms or specific steps MAY be implemented in any manner, so long as the end result is equivalent. (In particular, the algorithms defined in this specification are intended to be easy to follow, and not intended to be performant.)
When it is stated that some element or attribute is ignored, or treated as some other value, or handled as if it was something else, this refers only to the processing of the node after it is in the DOM. A user agent MUST NOT mutate the DOM in such situations.
The language in this specification assumes that the user agent expands all entity references, and therefore does not include entity reference nodes in the DOM. If user agents do include entity reference nodes in the DOM, then user agents MUST handle them as if they were fully expanded when implementing this specification. Entity references to unknown entities MUST be treated as if they contained just an empty text node for the purposes of the algorithms defined in this specification.
Web Applications 1.0 specification [WA1] defines the terms inter-element whitespace, content attribute, and IDL attribute.
For historical reason, elements and attributes defined or used in this specification belong to various namespaces.
The AA namespace is
http://pc5.2ch.net/test/read.cgi/hp/1096723178/aavocab#.
The preferred prefix is aa.
The HTML namespace is
http://www.w3.org/1999/xhtml. The preferred
prefix is html.
The SuikaWiki/0.9 namespace is
urn:x-suika-fam-cx:markup:suikawiki:0:9:. The
preferred prefix is sw.
The SuikaWiki/0.10 namespace is
urn:x-suika-fam-cx:markup:suikawiki:0:10:. The
preferred prefix is sw10.
The XHTML2 namespace is
http://www.w3.org/2002/06/xhtml2/.
The XML namespace is
http://www.w3.org/XML/1998/namespace. The
preferred prefix is xml.
White space characters are U+0009 CHARACTER TABULATION and U+0020 SPACE.
Digits are characters in the range U+0030 DIGIT ZERO .. U+0039 DIGIT
NINE.
Uppercase letters are characters in the range U+0041
LATIN CAPITAL LETTER A .. U+005A LATIN CAPITAL LETTER Z.
Lowercase letters are characters in the range U+0061
LATIN SMALL LETTER A .. U+007A LATIN SMALL LETTER Z.
Language tag characters are digits,
uppercase letters, lowercase letters, and
U+002D HYPHEN-MINUS.
Scheme characters are digits,
uppercase letters, lowercase letters, U+0025
PERCENT SIGN, U+002A PLUS SIGN, U+002D HYPHEN-MINUS, U+002E FULL
STOP and U+005F LOW LINE.
A language specification is a string consist of a
@ character followed by zero or more language tag characters.
The body of a language
specification is the substring in the language
specification except for the first @ character.
It might be the empty string.
Semantically, the body of a language specification
represents a language tag, similar to the xml:lang attribute @@
ref.
...
This section is non‐normative.
Obviously, this section is incomplete; some prose definition is not yet available; some xrefs does not work yet. It should be specified why this is non-normative. ABNF definition & charset consideration need to be addressed.
A document in the SWML text serialization consists of three parts: header part, body part, and optional image.
Several construct in a document refers page. A page is a unit of data in a hypertext database. The name of a page is sometimes referred to as WikiName. A page sometimes represents or is associated with an image. How to implement these concept, including how to resolve WikiNames, is not defined in this specification.
The header part has to be empty. In previous versions of SWML, a magic line could be contained, and in fact was required in some versions, in the header part of a document.
A magic line has to contain a
string #?, followed by the format name, followed by a
/ character, followed by the format version. They identifies
the version of the markup language in which the document is written. Historically, only
two combinations of format name
and format version as shown
in the table below were defined, used, and implemented:
| Format name | Format version | Description |
|---|---|---|
SuikaWiki
| 0.9
| The SuikaWiki/0.9 markup language. |
SuikaWikiImage
| 0.9
| The SuikaWikiImage/0.9 markup language. |
A magic line can contain zero
or more parameters after the format version. A parameter consists of one or more
white space characters, followed by the name, followed by a =
character, followed by a quoted
string whose value representing zero or
more values separeted by a
, character. A parameter value consists of zero
or more characters except for the
separator character ,. Historically, following
combinations of parameter
names and values was
defined and used:
| Name | Values | Description |
|---|---|---|
default-name
| Zero or more characters except for ,
| The value represetns the default user name for WikiForm input fields. Exactly one value can be specified. The default when this parameter is implementation dependent. |
import
| Zero or more characters except for ,
| A value represents the WikiName by which definitions for entity references are imported. When this parameter is not specified, no definition is imported. |
interactive
| yes or
no
| Value yes
means that the document contains
an interactive content such as WikiForm.
Value no, the default
value used when the parameter is
not specified, means the document does
not contain such a content. It was intended to be used for the convinience
of cache control mechanisms.
|
obsolete
| yes or
no
| Value yes means
the content of the document is
obsolete, and value no,
the default value used when the parameter
is not specified, means the content is not obsolete.
The parameter name |
obsoleted
| ||
page-icon
| Zero or more characters
except for ,
| The value represents the WikiName by which the page icon is imported. The page icon can be used as favicon @@ [ref], for example. Exactly one value can be specified. The default when this parameter is implementation dependent. |
image-alt
| Zero or more characters except for ,
| The value represents the alternative text for the image embedded in the document. Exactly one value can be specified. The default when this parameter is the empty string. |
image-type
| An Internet Media Type with no parameter, white spaces, comments | The value represents the type of the image embedded in the document. Exactly one value can be specified. This parameter has to be specified when the document contains an image. |
The order in which parameters are specified is not significant. The parameter name of a parameter has to be different from the parameter name of any other parameter.
A magic line has to be terminated by zero or more white space characters followed by a newline.
The body part of a document consists of zero or more blocks.
There are several kinds of blocks: paragraphs, headings, lists, labeled lists, quotations, preformatted paragraphs, editted sections, tables, editorial notes, comment paragraphs, and empty blocks. In addition, forms and entity references can also be used as blocks.
Empty blocks, which is represented by an empty line, can be inserted between any two blocks. It is sometimes necessary to prevent a block from being interpreted as a part of the previous block.
For example, consider the following fragment:
- List item.
This line is part of the list item.
The second line is part of the list, by definition. If it is not desired, an empty block can be inserted between two lines as:
- List item.
This line is not part of the list item.
... such that the third line represents a paragraph.
A paragraph represents a unit of
the text, similar to HTML's p element. It consists of an
optional destination
anchor number, followed by a line contents, followed by a newline, followed by zero or more block children.
A paragraph cannot begin with a form or entity reference, since it is treated as a when it appears at the beginning of a line. A paragraph cannot begin with a white space character, since it is treated as a preformatted paragraph then.
A block child is one of an optional destination anchor number followed by line contents followed by a newline, a list, a labeled list, a preformatted paragraph, an edited section, a table, an editorial note, or a comment paragraph.
@@ definition for ;; and @@
A heading introduces a section. It is represented by one or more
* characters, followed by zero or more white space
characters, optionally followed by a destination anchor
number, optionally followed by line contents, followed by a newline. The number of the
* represents the depth of the section. A heading with only one *
character begins a larger section
than a heading>heading with more
than one * characters. The line contents represents the name
or caption for the section.
There are three kinds of lists: ordered lists, unordered lists, and labeled lists. Ordered lists and unordered lists are called lists in this specification.
A list consists of zero or more
items. An item in the list is represented by one or more
- or = characters, followed by zero or more
white space characters, optionally followed by a destination anchor
number, optionally followed by line contents, followed by a newline, followed by zero or more block children. The number of
- or = characters at the beginning of the
item represents the depth of the list. In a list, depth of items has to be the same value. If
there is another list in block children, it's items' depth has to be greater than the depth of the parent item. The last character that
represents the depth of an item indicates the type of the list: - indicates unordered
list while = indicates ordered list. In a list all items has to be same type.
A labeled list consists of
one or more labeled list
items. A labeled list
item is represented by a : character, followed by
zero or more white space characters, optionally followed
by a destination anchor
number, optionally followed by line contents, followed by zero or
more white space characters, followed by a :
character, followed by a destination anchor
number, followed by zero or more white space
characters, optionally followed by line contents, followed by newline, followed by zero or more block chidlren. The former line contents, if any, represents
the label. Block children
cannot contain a labeled list.
>>1 This is a reference, not a quote.
A table represents a two-dimensional
tabular data. It is similar to HTML table element, but
what can be represented is even narrower than HTML table model. A
table consists of one or more table rows. A table row consists of one or more table cells. Syntactically a table row is followed by a newline.
There are two kinds of table
cells: data cells and
colspan cells. The
first cell in a row has to be a data cell. Syntactically a cell is preceded by a ,
character followed by zero or more white space
characters, and is followed by zero or more white space
characters.
A data cell represents a
cell that contains data, like HTML td element. The cell consists of an optional destination anchor
number, optionally followed by line contents. Syntactically, the
data cell can be provided
as a quoted string, in which
case its value is
interpreted as an optional destination anchor
number, optionally followed by line contents. In fact the data cell has to be represented
as a quoted string if it
contains a , character, a leading "
character, or leading or trailing white space characters.
A colspan cell represents that the cell that would be placed there forms an integrated part of the cell just before that cell. The cell just before that cell might also be a colspan cell.
| External reference scheme | Syntax of external reference parameter | Semantics |
|---|---|---|
IW
| (identifier /
quoted-string) ":"
(identifier /
quoted-string)
| InterWiki reference (An InterWikiName followed by a parameter) |
MAIL
| RFC 2822 addr-spec but not RFC 2822
obs-addr-spec; no leading or trailing
RFC 2822 FWS; no control characters
(%x00-1f / %x7f)
| E-mail address |
URI
| RFC 3986 URI reference | URL |
URL
| RFC 3986 URI reference | URL |
Maybe these schemes should reference Web Applications 1.0's URL and mail address syntax.
InterWiki is a mechanism for the hyperlinking and the combination of an InterWikiName and a parameter identifies the destination of the link. The interpretation of an InterWiki link is implementation dependent.
External reference
schemes URI and URL ought not to be used.
| Tag name | Number of middle tags | Internal reference source anchor | External reference source anchor | Semantics |
|---|---|---|---|---|
AA
| 0 | Not allowed | Not allowed | Character art (so-called ASCII-art, aa element)
|
ABBR
| 0 or 1 | Not allowed | Not allowed | Abbreviation (HTML abbr element)
|
CITE
| 0 | Not allowed | Not allowed | Title of a work (HTML cite element)
|
CODE
| 0 | Not allowed | Not allowed | Code (HTML code element)
|
CSECTION
| 0 | Not allowed | Not allowed | Title of a section in a work (csection element)
|
DEL
| 0 | Allowed | Allowed | Removal (HTML del element)
|
DFN
| 0 or 1 | Not allowed | Not allowed | Defined term (HTML dfn element)
|
INS
| 0 | Allowed | Allowed | Insertion (HTML ins element)
|
KBD
| 0 | Not allowed | Not allowed | User input (HTML kbd element)
|
KEY
| 0 | Not allowed | Not allowed | Keyboard's key (key element)
|
Q
| 0 | Allowed | Allowed | Quotation (HTML q element)
|
QN
| 0 or 1 | Not allowed | Not allowed | Qualified name (qn element)
|
RUBY
| 1 or 2 | Not allowed | Not allowed | Ruby annotation (HTML ruby element)
|
RUBYB
| 1 | Not allowed | Not allowed | Secondary ruby annotation (rubyb element)
|
SAMP
| 0 | Not allowed | Not allowed | Sample (HTML samp element)
|
SPAN
| 0 or 1 | Not allowed | Not allowed | Span of text (HTML span element)
|
SRC
| 0 | Not allowed | Not allowed | Short annotation for citation (src element)
|
SUP
| 0 | Not allowed | Not allowed | Superscript (HTML sup element)
|
SUB
| 0 | Not allowed | Not allowed | Subscript (HTML sub element)
|
TIME
| 0 or 1 | Not allowed | Not allowed | Date or time (HTML time element)
|
VAR
| 0 | Not allowed | Not allowed | Variable (HTML var element)
|
WEAK
| 0 | Not allowed | Not allowed | Small print (weak element)
|
A future version of this specification might define more tag names.
An inline start tag whose tag name is INS or DEL
might not be placed at the beginning of a line contents construct, since it
could be interpreted as a block
start tag.
A class specification
represents class names unless otherwise specified. The class specification
syntactically consist of a ( character followed by the
body of the class
specification followed by a ) character. The body of a class
specification consists of zero or more characters excluding (,
), and \. The body of the class
specification has similar semantics and processed similarly to
HTML class attribute.
The form name specification, if any, defines the name of the form. It has to be different from any other form name defined in the document. A form name specification is syntactically class specification and the body of it is the form name. A form name cannot contain white space characters.
| Specific form name | Syntax of specific form parameters | Semantics |
|---|---|---|
comment
| Empty | Comment input form. |
embed
| ['IMG:'] identifier
| Embedding another page. The parameter specifies the
WikiName of the page embedded. If
the parameter
begins with a string IMG:, the page is embedded as an
image and the string does not form the part of the WikiName.
|
form
| N/A | Reserved. |
rcomment
| Empty | Comment input form; a new comment is inserted after the form. |
searched
| identifier
| Insert a search result for the parameter. |
The form is an extension mechanism for the SWML text serialization. ...
The generic form can be used to embed a WikiForm specification. WikiForm provides a generic framework for describing user input forms and templates used for processing form inputs.
Three form fields in a form represents input template, output template, and options. Interpretation and processing for these fields are implementation dependent.
The name form cannot be used.
Names embed, rcomment, and searched are obsolete and cannot be
used.
A document can contain an image by including a string
__IMAGE__ followed by a newline followed by Base64 RFC 2045 encoded image data, at the end of the document. Parameters image-type and image-alt provide metadata
for the image.
An entity reference is a part of document that is expected to be replaced by a fragment imported from another document. It is no longer supported.
A character is a character from the coded character set used to encode the document. Unless otherwise specified, for the purpose of this specification, control characters (characters in the range U+0000 .. U+001F and U+007F) are not a character.
A newline can be represented in
any of three common conventions: CR
(U+000D), LF (U+000A), or CR followed by LF.
A quoted string is zero or
more characters enclosed by
" characters. In a quoted string, character
\ can only be used as part of quoted pair. A quoted pair is \
followed by a character. The
value of a quoted string
is the string obtained by removing " characters enclosing
the quoted string and
removing \ characters at the beginning of the quoted pairs.
This section specifies how to convert a string of characters into a DOM [DOM] tree, assuming the string is written in the SWML text serialization. This process is referred to as parsing and an implementation that performes this process is referred to as parser.
How to convert a string of bytes into a string of characters is outside of the scope of this specification.
The parsing process is defined in terms of DOM and relies on HTML5 ... and manakai's extensions to DOM .... However, a conforming parser don't have to implement them, as long as the end result is equivalent.
The parsing process is divided into two stages: tokenization and tree construction. The tokenization stage emits a sequence of tokens, which are used as inputs for the tree construction stage. The tree construction stage constructs a DOM tree. Some steps invoked in the tokenization stage might also construct a part of the DOM tree. During the parsing, mutation events MUST NOT be invoked.
Before the actual parsing starts, a new Document object MUST
be created. It represents the DOM tree constructed as a result of the
parsing. The
innerHTML IDL attribute of the Document object MUST
be initially set to
<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body></body></html>.
The document element is what the
documentElement IDL attribute of the Document returns. The head
element is what the firstChild IDL
attribute of the document element returns at the
time immediately after the innerHTML is set. The
body element is what the lastChild IDL
attribute of the document element returns at the
time immediately after the innerHTML is set. The
image element is initially null.
When the parser
appends a character
char to node node, the
manakai_append_text method ... MUST be invoked on node with the
argument char.
When an element is created, its prefix IDL
attribute MUST be set to
null.
When an attribute is created, unless otherwise specified, its
prefix and namespaceURI IDL attributes MUST both set
to null.
When an attribute in a namespace is created, its
prefix IDL attribute MUST be set to the preferred prefix for
the namespace.
A class specification is a string consist of a
( character, followed by zero or more character that is
not one of ), ), or white
space characters, and finally followed by a )
character. The body
of a class specification is the substring of the class
specification between parentheses (exclusive). It might be the
empty string.
When a string of characters is tokenized, the string s MUST be processed as follows:
CARRIAGE RETURN, process line. Set
line to the empty string. If the (pos + 1)th
character of s is U+000A LINE FEED, increment
pos by one (1).
LINE FEED, process line. Set
line to the empty string.
The steps above emit one or more sequence of tokens, which are inputs to the tree construction stage. A token can have zero or more properties, depending on the kind of the token. There are several kinds of tokens and properties as follows:
Mode is a state of the tokenizer and is one of "initial" (the initial value used when the tokenization starts), "body", "preformatted", "preformatted block", and "image data".
Continuous line flag is another flag of the tokenizer, representing whether a new line character should be appended to the data, and takes either true or false. This flag is mainly used in the "body" mode.
When a line is processed, rules specified in the following subsections is used according to the appropriate mode. Rules below sometimes require the line be reprocessed. In such cases, rules for the appropriate mode MUST be followed with the same line.
In the "initial" mode, line MUST be processed as follows:
#?
In the "body" mode, line MUST be processed as follows:
*
*, run the following substeps:
*.)
- or =
- or =, run the following substeps:
:
:.)
:, run the following
substeps:
: character.
In this case, line does not represent a description list.
:.)
>
>, run the following substeps:
>.
> characters to data.
LINE FEED character to
data.
@@, run the
following substeps:
@@).
;;, run the
following substeps:
;;).
[
character, followed by one of INS, DEL, or
PRE, optionally followed by class
specification, followed by a [ character, followed
by zero or more white space characters
INS, DEL, or PRE, that appears
in line and classes is the body of the class
specification, if any, or null otherwise.
PRE, switch to the "preformatted block"
mode.
@@
@@.)
;;
;;.)
]
character, followed by one of INS or DEL,
followed by a ] character, followed by zero or more
white space characters
INS, DEL, or PRE, that appears
in line.
,
__IMAGE__
LINE
FEED character.
In the "preformatted" mode, line MUST be processed as follows:
]
character, followed by one of INS or DEL,
followed by a ] character, followed by zero or more
white space characters
INS or DEL, that appears in line.
LINE
FEED character.
In the "preformatted block" mode, line MUST be processed as follows:
]PRE]
followed by zero or more white space characters
PRE.
LINE
FEED character.
In the "image data" mode, line MUST be processed as follows:
image element in the SuikaWiki/0.9 namespace
and set the image element to that element. Append the
image element to the document element.
LINE FEED to the image element.
The algorithm to tokenize a table row data is as follows:
", set cell quoted to the empty
string and follow the substeps below:
", abort these substeps.
\, follow the substeps below:
,, abort these substeps.
==, emit a table colspan cell
token and go back to the step labeled LOOP.
The algorithm to tokenize a text data is as follows:
[ followed by one or
more digits followed by ], run the following
steps:
anchor-end,
namespace is the
SuikaWiki/0.9 namespace, anchor attribute is
number, and content is
[ followed by number followed by
].
[[#, followed by one
or more lowercase letters or U+002D HYPHEN-MINUS
HYPHEN-MINUS in the matched
substring.
:,
run the following substeps:
]], abort
these substeps.
',
run the following steps:
', abort
these substeps.
\, run
the following substeps:
:, abort these substeps.
]], remove
these characters from data.
[[
[, followed by one or
more uppercase letters, optionally followed by a
class specification, optionally followed by a
language specification, followed by [
]]
]<, followed by one
or more scheme characters, followed by :
< instead of ]<, except
that the emitted token is an inline end tag token instead
of an element token. The resScheme attribute
of the token MUST be the resScheme attribute of the
token that would be emitted if the first two character were
<. The resParameter
attribute of the token MUST be the resParameter attribute of
the token that would be emitted if the first two character were
<.
], remove the
character from data.
]>> followed by one or
more digits, followed by ]
] followed by zero or more
white space characters followed by [
] followed by zero or more
white space characters followed by a language
specification followed by [
<, followed by one
or more scheme characters, followed by :
>,
remove the first character of data and abort these steps.
",
append " to data and run the following
substeps:
",
append " to value, remove the first
character of data, and abort these substeps.
\, run
the following substeps:
\ to value.
: followed by value.
URI.
anchor-external, namespace is the SuikaWiki/0.9
namespace, resScheme
attribute is scheme, resParameter attribute is
value, and content
is content.
'''
''
>> followed by one or
more digits
anchor-internal, namespace is the SuikaWiki/0.9
namespace, anchor
attribute is the digits part of the matched
substring, and content is the
matched substring.
__&&
&&__, or if
data does not contain &&__ as a
substring, emit four character
tokens whose data are
_, _, &, and
& respectively and remove the first four characters
of data and abort these steps.
&&__ (exclusive).
&&__ and any
character before it from data.
replace,
namespace is the
SuikaWiki/0.9 namespace, by attribute is name.
To parse a magic line data, the following steps MUST be used:
#?.)
/, set the
substring after the first occurence of the character to version. Note that version might become
the empty string. Remove the / character and the
substring after the character from name.
Name content
attribute of the document element in the
SuikaWiki/0.9 namespace to name.
Version content attribute of
the document element in the SuikaWiki/0.9
namespace to version.
=, set name to those characters
and remove those characters from data.
parameter element in the
SuikaWiki/0.9 namespace and set the name content
attribute of parameter to name.
=.)
", remove that character from data.
", create a value element in the SuikaWiki/0.9
namespace, set the textContent IDL
attribute of the node to value, and append the
node to parameter.
\, run the following substeps:
\.)
,, abort these substeps.
,, create a value
element in the SuikaWiki/0.9 namespace, set the
textContent IDL attribute of the node to
value, append the node to parameter,
and go back to the first substep of these substeps.
", remove that character from data.
The tree construction stage constructs a DOM tree from a series of tokens emitted by the tokenization stage. The tree construction stage has two state variables: insertion mode and stack of open elements.
The insertion mode is one of "in section", "in table row", or "in paragraph". The default that MUST be used when the tree construction begins is the "in section" insertion mode. The rules for these insertion modes are described in the subsections below.
When the algorithm below says that the parser is to do something “using the rules for the m insertion mode”, the parser MUST use the rules described under the m insertion mode's section, but MUST leave the insertion mode unchanged.
The stack of open elements contains tuples of
(element node, section depth, quotation
depth, list depth). These stack grows downdards; the
topmost entry on the stack is the first one added to the stack, and
the bottommost entry of the stack is the most recently added entry in
the stack. It initially contains only a tuple: (the body
element, 0, 0, 0). When
an entry is pushed to the stack of open elements, the
items of the new tupple is set to the same values as the bottommost
tuple unless otherwise specified.
The current element is the element node of the bottommost entry in the stack of open elements.
Structural elements are elements whose local name is one
of body, section,
insert, delete, blockquote,
h1, ul, ol, dl,
li, dt, dd, table,
tbody, tr, td, p,
comment-p, ed, or pre.
In the "in section" insertion mode, a token MUST be processed as follows:
body,
section, insert, or delete, pop
the element off the stack of open elements and follow
this substep again.
section element in the HTML
namespace, append the element created to the current
element, push the element created to the stack of open
elements with section depth set to current depth + 1, quotation depth set to
zero (0), and list depth set to zero (0), and go back to
the first substep of these substeps.
section element in the HTML
namespace.
h1 element in the HTML
namespace.
INS
insert element in the SuikaWiki/0.9
namespace.
class content attribute of
the element created to classes.
DEL
delete element in the SuikaWiki/0.9
namespace.
class content attribute of
the element created to classes.
blockquote, body, section,
insert, or delete, pop the element off the
stack of open elements and follow this substep again.
blockquote element in the HTML
namespace, append the element created to the current
element, push the element created to the stack of open
elements with section depth set to zero (0),
quotation depth set to current depth +
1, and list depth set to zero (0), and go back to the
first substep of these substeps.
ul, if the last
character in depth is
-, or ol, otherwise.
-, create a ul
element in the HTML namespace.
ol element in the HTML
namespace.
li element in the HTML
namespace.
li element in the HTML
namespace.
dd, pop the element off the stack of open
elements.
dl, create a dl element in the
HTML namespace, append the element created to the
current element, and push the element created to the
stack of open elements.
dt element in the HTML
namespace.
table element in the HTML
namespace.
tbody element in the HTML
namespace.
tr element in the HTML
namespace.
PRE
pre element in the HTML
namespace.
class content attribute of
the element created to classes.
pre element in the HTML
namespace.
comment-p element in the
SuikaWiki/0.10 namespace.
ed element in the SuikaWiki/0.10
namespace.
body,
section, insert, or delete, pop
the element off the stack of open elements and follow
this substep again.
INS
insert, pop the current
element off the stack of open elements until such
an element whose local name is insert has been popped
from the stack of open elements.
DEL
delete, pop the current
element off the stack of open elements until such
an element whose local name is delete has been popped
from the stack of open elements.
replace
Document has been
constructed. Abort the parser.
li, dd,
comment-p, or ed, run the following
substeps:
p element in the HTML
namespace.
In the "in table row" insertion mode, a token MUST be processed as follows:
td element in the HTML
namespace.
lastChild IDL attribute of the current
element, if any, is td, increase the value of
colspan IDL attribute of the node by one (1)
and abort these substeps.
td element in the HTML
namespace.
tr, pop the element off the stack of open
elements.
tr element in the HTML
namespace.
In the "in paragraph" insertion mode, a token MUST be processed as follows:
| Tag name | Namespace | Local name |
|---|---|---|
AA
| The AA namespace | aa
|
ABBR
| The HTML namespace | abbr
|
CITE
| The HTML namespace | cite
|
CODE
| The HTML namespace | code
|
CSECTION
| The SuikaWiki/0.10 namespace | csection
|
DEL
| The HTML namespace | del
|
DFN
| The HTML namespace | dfn
|
INS
| The HTML namespace | ins
|
KBD
| The HTML namespace | kbd
|
KEY
| The SuikaWiki/0.10 namespace | key
|
Q
| The HTML namespace | q
|
QN
| The SuikaWiki/0.10 namespace | qn
|
RUBY
| The HTML namespace | ruby
|
RUBYB
| The SuikaWiki/0.9 namespace | rubyb
|
SAMP
| The HTML namespace | samp
|
SPAN
| The HTML namespace | span
|
SRC
| The SuikaWiki/0.10 namespace | src
|
SUB
| The HTML namespace | sub
|
SUP
| The HTML namespace | sup
|
TIME
| The HTML namespace | time
|
VAR
| The HTML namespace | var
|
WEAK
| The SuikaWiki/0.9 namespace | weak
|
| Anything else | The SuikaWiki/0.10 namespace | Same as tag name |
class content attribute of
the element created to classes.
lang content attribute
in the XML namespace of the element created to language.
title.
rt, set local name to rt, set
namespace to the HTML namespace, and pop the
current element off the stack of open
elements.
title or nsuri, set local name
to attrvalue and pop the current element off
the stack of open elements.
qn, set local name to
nsuri.
ruby or rubyb, set local
name to rt and set namespace to
the HTML namespace.
lang content attribute
in the XML namespace of the element created to language.
rt, title, nsuri, or
attrvalue, pop the element off the stack of open
elements.
strong or em, run the
following substeps:
]] to the current element,
push the current element to the stack of open
elements, and abort these substeps.
As a result, the bottommost and second bottommost entries becomes equal, but one of them is popped from the stack of open elements soon.
anchor-external element in the
SuikaWiki/0.9 namespace.
anchor-internal element in the
SuikaWiki/0.9 namespace.
textContent IDL attribute of the
element created to ]].
anchor content
attribute in the SuikaWiki/0.9 namespace of the
current element to anchor attribute of the
token.
resScheme content
attribute in the SuikaWiki/0.9 namespace of the
current element to resScheme attribute
of the token.
resParameter
content attribute in the SuikaWiki/0.9
namespace of the current element to resParameter
attribute of the token.
strong, pop the element off the stack of open
elements and abort these substeps.
strong element in the HTML
namespace.
em, pop the element off the stack of open
elements and abort these substeps.
em element in the HTML
namespace.
form
form element in the SuikaWiki/0.9
namespace.
id
content attribute of the element created to id of the form token.
input content
attribute of the element created to the first item in parameters of the form
token, if any, or the empty string otherwise.
template
content attribute of the element created to the second
item in parameters of the
form token, if any, or the empty string otherwise.
option
content attribute of the element created to the third
item in parameters of the
form token, if any, or the empty string otherwise.
parameter content
attribute of the element created to the concatenation of items
in parameters, separated by a
: character, in the same order.
form element in the SuikaWiki/0.9
namespace.
ref content
attribute of the element created to name of the form token.
id of the form
token is not null, set the id content attribute of the
element created to id of the form
token.
parameter content
attribute of the element created to the concatenation of items
in parameters, separated by a
: character, in the same order. The result value might
be the empty string.
anchor content attribute in
the SuikaWiki/0.9 namespace of the element created to
anchor attribute of the
element token.
by content attribute of
the element created to by
attribute of the element token.
resScheme
content attribute in the SuikaWiki/0.9
namespace of the element created to resScheme attribute of the
element token.
resParameter
content attribute in the SuikaWiki/0.9
namespace of the element created to resParameter attribute of
the element token.
textContent
IDL attribute of the element created to content of the element
token.
dt, pop the element off the stack of open
elements.
dd element in the HTML
namespace.
h1, pop the element off the stack of open
elements.
td, pop the element off the stack of open
elements.
PRE
pre, pop the element off the stack of open
elements.
...
text/x-suikawiki and
text/x.suikawiki.image Internet Media TypesThe SWML text serialization can be identified by
Internet Media Type text/x-suikawiki.
An entity labeled as text/x-suikawiki MUST be an SWML text serialization and
MUST be processed as an SWML text
serialization.
Additionally, for historical reason, an entity labeled as
text/x.suikawiki.image MUST be processed as an SWML text
serialization. This Internet Media Type MUST
NOT be used for a new entity.
It was originally intended that a document with format name equal to SuikaWiki is labeled as
text/x-suikawiki while a document with format name equal to SuikaWikiImage is
labeled as text/x.suikawiki.image.
The charset
parameter of these Internet Media Types represents the character
encoding used for the entity. It has the same requirements as the
charset parameter for the text/html
Internet Media Type @@ todo: ref.
The version
parameter MAY has the value 0.9 or 0.10 but SHOULD NOT be used. The parameter MUST be ignored.
This parameter was originally used to encode format version in favor of magic line.
... IMT template; fragment identifier
...
This specification is the specification for the SuikaWiki/0.9 namespace and the SuikaWiki/0.10 namespace. Anything belongging to those namespaces is defined in this specification.
Elements and attributes in the SuikaWiki/0.9 namespace and in the SuikaWiki/0.10 namespace, as well as attributes in no namespace for elements in the SuikaWiki/0.9 namespace and in the SuikaWiki/0.10 namespace, MUST NOT be used in context where they are not allowed explicitly.
A namespaced attribute allowed in another specification can be used
on elements in the SuikaWiki/0.9 namespace and in the
SuikaWiki/0.10 namespace. For example, a lang attribute in the XML
namespace is allowed to be specified for an XML element, as
defined in the XML specification [XML]. Note the allowed
attributes entry in following subsections only lists up
attributes defined in this specification.
Elements in the SuikaWiki/0.9 namespace and in the SuikaWiki/0.10 namespace defined in this specification MUST conform to their content model.
Inter-element whitespace, comment nodes, and processing instruction nodes MUST be ignored when establishing whether an element matches its content model or not.
Elements in the SuikaWiki/0.9 namespace and in the SuikaWiki/0.10 namespace MAY be orphan nodes (i.e. without a parent node).
In the following subsections, attributes listed in the allowed attributes entry MAY be specified to an element described in that subsection.
Some elements belong to categories. Categories flow content and phrasing content are defined in the HTML5 specification ....
Terms and algorithms valid integer, rules for parsing integers are defined in the HTML5 specification ....
An attribute is said to be specified to an element if
the hasAttributeNS method invoked on the element with
appropriate arguments would return true.
That is, the term specified is irrelevant from the
specified IDL attribute.
document
element in the SuikaWiki/0.9 namespacehead element in the
XHTML2 namespace, followed by a body element in the XHTML2
namespace, optionally followed by a image element
in the SuikaWiki/0.9 namespace.
This element MUST NOT be used.
...
parameter
element in the SuikaWiki/0.9 namespacevalue element in
the SuikaWiki/0.9 namespace.
name
This element MUST NOT be used.
... name
value element
in the SuikaWiki/0.9 namespaceThis element MUST NOT be used.
...
class attributeAll elements in the HTML namespace have class attribute ....
The class attribute of
an element in the SuikaWiki/0.9 namespace and
SuikaWiki/0.10 namespace has the same semantics and
requirements as the HTML class
attribute.
The class attribute of
an element in the AA namespace SHOULD be considered as having the same semantics
and requirements as the HTML class
attribute.
id attributeThe id attribute of an
element in the SuikaWiki/0.9 namespace and
SuikaWiki/0.10 namespace has the same semantics and
requirements as the id attribute of HTML5 ....
replace element in the
SuikaWiki/0.9 namespaceby
This element MUST NOT be used.
... by
text element in the
SuikaWiki/0.9 namespaceThis element MUST NOT be used.
...
insert element in the
SuikaWiki/0.9 namespace...
delete element in the
SuikaWiki/0.9 namespace...
dr element in the
SuikaWiki/0.9 namespacedt element in the XHTML2 namespace,
followed by a dd element in the XHTML2
namespace.
This element MUST NOT be used.
...
comment-p element in the
SuikaWiki/0.10 namespace...
ed element in the SuikaWiki/0.10
namespace...
anchor element in the
SuikaWiki/0.9 namespaceanchor in the
SuikaWiki/0.9 namespace
...
anchor-internal element in the
SuikaWiki/0.9 namespaceanchor in the
SuikaWiki/0.9 namespace
...
anchor-end element in the
SuikaWiki/0.9 namespaceanchor in the
SuikaWiki/0.9 namespace.
...
anchor attribute
in the SuikaWiki/0.9 namespaceThe anchor attribute in the
SuikaWiki/0.9 namespace, when specified to an
anchor-end element, defines an anchor number
for the parent element of the anchor-end element, if any.
The attribute MUST be specified and its
value MUST be a valid integer.
The integer MUST have different value from any
other anchor attribute in the
SuikaWiki/0.9 namespace specified in an
anchor-end element in the SuikaWiki/0.9
namespace that belongs to the same tree as the first attribute.
The anchor attribute in the
SuikaWiki/0.9 namespace MAY be
specified to q elements in the HTML
namespace and in the XHTML2 namespace, as well as
ins and del elements in the HTML
namespace. The attribute can also be specified to
anchor and anchor-internal elements in the
SuikaWiki/0.9 namespace.
In these cases, the attribute represents the anchor
number of the element referenced. If the element on which the
attribute is specified is an anchor element, the element
referenced might be found in the document referenced by the element.
Otherwise, the element is in the tree the element belongs to.
If the element on which the attribute is specified is not
an anchor or anchor-internal element, the
attribute has similar semantics to that of the cite
attribute on the element. In such cases, the anchor attribute in the
SuikaWiki/0.9 namespace MUST NOT
be specified when the cite attribute is specified.
A user agent MUST ignore the anchor attribute in the
SuikaWiki/0.9 namespace if the cite
attribute is specified.
The attribute value MUST be a valid
integer. Unless the element is anchor, the
integer MUST be equal to one of the integer
represented by the anchor attribute
in the SuikaWiki/0.9 namespace specified to an
anchor-internal element in the SuikaWiki/0.9
namespace that belongs to the same tree.
anchor-external element in the
SuikaWiki/0.9 namespaceresParameter in the
SuikaWiki/0.9 namespace
resScheme in the
SuikaWiki/0.9 namespace
...
resScheme
attribute in the SuikaWiki/0.9 namespaceThe resScheme attribute in
the SuikaWiki/0.9 namespace MAY be
specified to q elements in the HTML
namespace and in the XHTML2 namespace, as well as
ins and del elements in the HTML
namespace. The attribute can also be specified to an
anchor-external element in the SuikaWiki/0.9
namespace.
...
resParameter attribute
in the SuikaWiki/0.9 namespaceThe resParameter attribute
in the SuikaWiki/0.9 namespace MAY
be specified to q elements in the HTML
namespace and in the XHTML2 namespace, as well as
ins and del elements in the HTML
namespace. The attribute can also be specified to an
anchor-external element in the SuikaWiki/0.9
namespace.
...
form element in the
SuikaWiki/0.9 namespaceid
input
option
parameter
ref
template
... ref,
parameter.
... input, template, option
image element in the
SuikaWiki/0.9 namespaceThis element MUST NOT be used.
...
aa element in the AA namespaceThe aa element in the AA namespace ... falls into the phrasing content
category for the purpose of the content models in this specification.
The content model of this element SHOULD be considered as phrasing content.
csection element in the
SuikaWiki/0.10 namespace...
src element in the
SuikaWiki/0.10 namespace...
qn element in the SuikaWiki/0.10
namespacensuri element in the SuikaWiki/0.10
namespace.
class
...
qname element in the
SuikaWiki/0.10 namespaceThis element MUST NOT be used.
...
nsuri element in the
SuikaWiki/0.10 namespace...
rubyb element in the
SuikaWiki/0.9 namespacert
element in the HTML namespace.
class
...
weak element in the
SuikaWiki/0.9 namespace...
title element in the
SuikaWiki/0.10 namespaceThis element MAY be inserted as the last
child of abbr, dfn, span, or
time element in the HTML namespace when the
title attribute of that element is
not specified.
If the parent element of the element has a title
attribute specified, or the element is not the
last child, the element MUST be
ignored.
Inter-element whitespaces, comments, and processing instructions can be inserted after this element.
...
key element in the
SuikaWiki/0.10 namespace...
attrvalue element in the
SuikaWiki/0.10 namespaceThis element MUST NOT be used.
...
Uppercase elements are elements in the SuikaWiki/0.10 namespace whose local name consists of one or more uppercase letters.
These elements MUST NOT be used.
These elements might be inserted into the DOM by a parser when an inline start tag with unknown tag name is found.