Internal Property Index & Descriptions
See AbiWord Internal Property List.
DTDs for AWML and XHTML with AWML extensions
- Qualified names module: AWML namespace and element name definitions: awml-qname-1.mod
- AWML element and attribute definitions: awml.mod
- XHTML extension using XHTML modules and some added AWML markup: xhtml-awml.mod
Proposal for version 2.0 AbiWord file format
At least two bugs in Bugzilla (Bug 2759 & Bug 4213) are concerned with invalid XML where the error is in non-conformance to the stated DTD. AbiWord's current DTD is completely inadequate - I mean no offense to the original authors; DTD syntax is deeply scary and AbiWord's file format isn't trivial to figure out - especially with the emergence of new technologies and the increasing adoption of XML as an interoperability language.
While XML is suitable for representing AbiWord's format, AWML has evolved with little real regard for XML conventions and the current format is in too many ways ill-defined. With AbiWord-2.0 approaching fast, however, the file format is once again stabilizing and the opportunity arises to formalize it with a valid DTD. Further, expressing the format in DTD form exposes weaknesses.
Of course, proposing a new standard is all very well, but it's the implementation that counts. People need to rely on the format, being able to read new and existing documents without loss of data.
And finally, if the file format is well-documented, this will aid developers who wish to write importers and file-format converters.
New XML Namespace for AWML
One of my pet peeves (and we're currently looking for the origin of that expression, so please give us you theories) is AWML's current namespace URL (xmlns:awml="http://www.abisource.com/awml.dtd") so I'm taking this opportunity to change it to something a little more elegant. So, the URI for the new file format is:
xmlns:awml="http://www.abisource.com/2003/"
which, by an uncanny coincidence, is also the URL of this page. Weird.
The DOCTYPE Declaration
For the new DTD we need a new DOCTYPE declaration:
Type Groups
Field Types
Section Types
AWML element and attribute definitions
a
<!ATTLIST a
href %URI.datatype; #REQUIRED
>abiword
<!ATTLIST abiword
template ( true | false ) #REQUIRED
styles ( locked | unlocked ) #REQUIRED
version CDATA #IMPLIED 'unnumbered'
props CDATA #IMPLIED ''
fileformat CDATA #FIXED '2.0'
><!-- TODO: xml:space="preserve" -->
bookmark
<!ATTLIST bookmark
type ( start | end ) #REQUIRED
name ID #REQUIRED
>br
c
<!ATTLIST c
style CDATA #IMPLIED 'inherit'
props CDATA #IMPLIED ''
><!-- TODO: "type", "endnote-id" & "footnote-id" attributes? -->
<!-- TODO: "style" - implement "inherit" -->
cbr
cell
d
<!ATTLIST d
name CDATA #REQUIRED
mime-type CDATA #REQUIRED
base64 ( yes | no ) #FIXED 'yes'
><!-- TODO: MIME types? -->
data
endnote
<!ATTLIST endnote
endnote-id CDATA #REQUIRED
>field
<!ATTLIST field
endnote-id CDATA #IMPLIED ''
footnote-id CDATA #IMPLIED ''
style CDATA #IMPLIED 'inherit'
props CDATA #IMPLIED ''
type FieldType.datatype; #REQUIRED
><!-- TODO: default 'none' for "endnote-id" & "footnote-id"? -->
foot
ignoredwords
image
<!ATTLIST image
dataid CDATA #REQUIRED
props CDATA #IMPLIED ''
><!-- TODO: "dataid", or "href"?, should really be of type IDREF -->
iw
l
<!ATTLIST l
id CDATA #REQUIRED
parentid CDATA #REQUIRED
type CDATA #REQUIRED
start-value CDATA #REQUIRED
list-decimal CDATA #REQUIRED
list-delim CDATA #REQUIRED
><!-- TODO: "id" should be ID and "parentid" should be ( IDREF | none ) -->
<!-- TODO: "type" is what? '0' for numbered, '5' for bulleted? -->
<!-- TODO: "start-value" is an integer -->
<!-- TODO: "list-decimal" can be empty or "NULL" (presumably for bulleted lists) -->
lists
m
<!ATTLIST m
key CDATA #REQUIRED
>metadata
p
<!ATTLIST p
id CDATA #IMPLIED ''
parentid CDATA #IMPLIED '0'
listid CDATA #IMPLIED ''
props CDATA #IMPLIED ''
level (0|1|2|3|4|5|6|7|8|9|10 | CDATA) #IMPLIED
style CDATA #IMPLIED 'Normal'
><!-- TODO: "type", "endnote-id" & "footnote-id" attributes? -->
<!-- TODO: "id" should be ID, and "listid" & "parentid" should be ( IDREF | none ) -->
<!-- TODO: need a new element type for lists, perhaps? <li>
maybe? -->
<!-- TODO: is "level" needed? -->
pagesize
<!ATTLIST pagesize
pagetype CDATA #REQUIRED
orientation CDATA #REQUIRED
width CDATA #REQUIRED
height CDATA #REQUIRED
units CDATA #REQUIRED
page-scale CDATA #REQUIRED
>pbr
r
<!ATTLIST r
id ID #REQUIRED
><!-- TODO: "id" - but was that intended? do we need "reviewer", and maybe "date", also? -->
revisions
s
<!ATTLIST s
basedon CDATA #IMPLIED 'None'
name CDATA #REQUIRED
type ( P | C ) #REQUIRED
props CDATA #REQUIRED
followedby CDATA #IMPLIED 'Normal'
>section
<!ATTLIST section
props CDATA #IMPLIED ''
type SectionType.datatype; #IMPLIED ''
id ID #IMPLIED
header CDATA #IMPLIED ''
footer CDATA #IMPLIED ''
num_columns CDATA #IMPLIED '1'
column_gap CDATA #IMPLIED ''
><!-- TODO: "header" & "footer" should be IDREF and default to 'none' -->
<!-- TODO: "num_columns" should be a whole number -->
<!-- TODO: "column_gap" should be a positive length (or 'auto'?) -->
<!-- TODO: "type" needs a default - 'flow' maybe? -->