# Attribute definitions for presentation elements

# 
# RELAX NG Schema on MathML 2.0
# 
# See COPYING for the status of this software.
# Yutaka Furubayashi (Poka-Poka Dream Factory) <info@yupotan.sppd.ne.jp>
# Modified by Henri Sivonen <hsivonen@iki.fi>
#

namespace inherit = inherit
namespace local = ""
namespace ns1 = "http://www.w3.org/1999/xlink"

# fonts
mml.att-fontsize = attribute fontsize { mml.length.datatype }?
mml.att-fontweight = attribute fontweight { string "normal" | string "bold" }?
mml.att-fontstyle = attribute fontstyle { string "normal" | string "italic" }?
mml.att-fontfamily = attribute fontfamily { text }?
mml.att-color = attribute color { mml.color.datatype }?
# MathML2 typographically-distinguished symbol attributes
mml.att-mathvariant =
    attribute mathvariant {
        string "normal"
        | string "bold"
        | string "italic"
        | string "bold-italic"
        | string "double-struck"
        | string "bold-fraktur"
        | string "script"
        | string "bold-script"
        | string "fraktur"
        | string "sans-serif"
        | string "bold-sans-serif"
        | string "sans-serif-italic"
        | string "sans-serif-bold-italic"
        | string "monospace"
    }?
mml.att-mathsize =
    attribute mathsize {
        string "small" | string "normal" | string "big" | mml.length.datatype
    }?
mml.att-mathcolor = attribute mathcolor { mml.color.datatype }?
mml.att-mathbackground =
    attribute mathbackground { mml.color.datatype }?
mml.att-fontinfo &=
    mml.att-fontsize,
    mml.att-fontweight,
    mml.att-fontstyle,
    mml.att-fontfamily,
    mml.att-color,
    mml.att-mathvariant,
    mml.att-mathsize,
    mml.att-mathcolor,
    mml.att-mathbackground
mml.att-form = attribute form { string "prefix" | string "infix" | string "postfix" }?
mml.att-fence = attribute fence { string "true" | string "false" }?
mml.att-separator = attribute separator { string "true" | string "false" }?
mml.att-lspace = attribute lspace { mml.namedspace.datatype }?
mml.att-rspace = attribute rspace { mml.namedspace.datatype }?
mml.att-stretchy = attribute stretchy { string "true" | string "false" }?
mml.att-symmetric = attribute symmetric { string "true" | string "false" }?
mml.att-maxsize =
    attribute maxsize { mml.namedspace.datatype | string "infinity" }?
mml.att-minsize = attribute minsize { mml.namedspace.datatype }?
mml.att-largeop = attribute largeop { string "true" | string "false" }?
mml.att-movablelimits = attribute movablelimits { string "true" | string "false" }?
mml.att-accent = attribute accent { string "true" | string "false" }?
mml.att-opinfo &=
    mml.att-form,
    mml.att-fence,
    mml.att-separator,
    mml.att-lspace,
    mml.att-rspace,
    mml.att-stretchy,
    mml.att-symmetric,
    mml.att-maxsize,
    mml.att-minsize,
    mml.att-largeop,
    mml.att-movablelimits,
    mml.att-accent
mml.att-width = attribute width { mml.namedspace.datatype }?
mml.att-height = attribute height { mml.length.datatype }?
mml.att-depth = attribute depth { mml.length.datatype }?
mml.att-linebreak =
    attribute linebreak {
        string "auto"
        | string "newline"
        | string "indentingnewline"
        | string "nobreak"
        | string "goodbreak"
        | string "badbreak"
    }?
mml.att-sizeinfo &= mml.att-width, mml.att-height, mml.att-depth
mml.att-lquote = attribute lquote { text }?
mml.att-rquote = attribute rquote { text }?
mml.att-linethickness =
    attribute linethickness {
        mml.length.datatype | string "thin" | string "medium" | string "thick"
    }?
mml.att-scriptlevel = attribute scriptlevel { mml.number.datatype }?
mml.att-displaystyle = attribute displaystyle { string "true" | string "false" }?
mml.att-scriptsizemultiplier =
    attribute scriptsizemultiplier { mml.nonnegativefloat.datatype }?
mml.att-scriptminsize = attribute scriptminsize { mml.length.datatype }?
mml.att-background = attribute background { mml.color.datatype }?
mml.att-veryverythinmathspace =
    attribute veryverythinmathspace { mml.length.datatype }?
mml.att-verythinmathspace =
    attribute verythinmathspace { mml.length.datatype }?
mml.att-thinmathspace = attribute thinmathspace { mml.length.datatype }?
mml.att-mediummathspace =
    attribute mediummathspace { mml.length.datatype }?
mml.att-thickmathspace =
    attribute thickmathspace { mml.length.datatype }?
mml.att-verythickmathspace =
    attribute verythickmathspace { mml.length.datatype }?
mml.att-veryverythickmathspace =
    attribute veryverythickmathspace { mml.length.datatype }?
mml.att-open = attribute open { text }?
mml.att-close = attribute close { text }?
mml.att-separators = attribute separators { text }?
mml.att-subscriptshift =
    attribute subscriptshift { mml.length.datatype }?
mml.att-superscriptshift =
    attribute superscriptshift { mml.length.datatype }?
mml.att-accentunder = attribute accentunder { string "true" | string "false" }?
mml.att-align = attribute align { mml.align.datatype }?
mml.att-rowalign = attribute rowalign { mml.rowalign.datatype }?
mml.att-columnalign =
    attribute columnalign { mml.columnalign.datatype }?
mml.att-columnwidth =
    attribute columnwidth { mml.columnwidth.datatype }?
mml.att-groupalign = attribute groupalign { mml.groupalign.datatype }?
mml.att-alignmentscope =
    attribute alignmentscope { mml.alignmentscope.datatype }?
mml.att-rowspacing = attribute rowspacing { mml.rowspacing.datatype }?
mml.att-columnspacing =
    attribute columnspacing { mml.columnspacing.datatype }?
mml.att-rowlines = attribute rowlines { mml.lines.datatype }?
mml.att-columnlines = attribute columnlines { mml.lines.datatype }?
mml.att-frame = attribute frame { string "none" | string "solid" | string "dashed" }?
mml.att-framespacing =
    attribute framespacing { mml.framespacing.datatype }?
mml.att-equalrows = attribute equalrows { string "true" | string "false" }?
mml.att-equalcolumns = attribute equalcolumns { string "true" | string "false" }?
mml.att-tableinfo &=
    mml.att-align,
    mml.att-rowalign,
    mml.att-columnalign,
    mml.att-columnwidth,
    mml.att-groupalign,
    mml.att-alignmentscope,
    mml.att-rowspacing,
    mml.att-columnspacing,
    mml.att-rowlines,
    mml.att-columnlines,
    mml.att-frame,
    mml.att-framespacing,
    mml.att-equalrows,
    mml.att-equalcolumns,
    mml.att-displaystyle
mml.att-rowspan = attribute rowspan { mml.rowspan.datatype }?
mml.att-columnspan = attribute columnspan { mml.columnspan.datatype }?
mml.att-edge = attribute edge { string "left" | string "right" }?
# actiontypes
mml.att-actiontype = 
    attribute actiontype {
        string
    }?
#mml.att-actiontype =
#    ((attribute actiontype { string "toggle" },
#      attribute selection { mml.positiveinteger.datatype })
#     | attribute actiontype { string "statusline" }
#     | attribute actiontype { string "tooltip" }
#     | (attribute actiontype { string "highlight" },
#        attribute * - (inherit:* | local:* | ns1:*) {
#            mml.color.datatype
#        }*)
#     | (attribute actiontype { string "menu" },
#        attribute selection { mml.positiveinteger.datatype }))?
mml.att-name = attribute name { text }?
mml.att-alt = attribute alt { text }?
mml.att-index = attribute index { mml.number.datatype }?
mml.att-bevelled = attribute bevelled { string "true" | string "false" }?
