All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.adobe.epubcheck.schema.30.mod.mathml.mathml3-common.rnc Maven / Gradle / Ivy

Go to download

EPUBCheck is a tool to validate the conformance of EPUB publications against the EPUB specifications. EPUBCheck can be run as a standalone command-line tool or used as a Java library.

There is a newer version: 5.1.0
Show newest version
#     This is the Mathematical Markup Language (MathML) 3.0, an XML
#     application for describing mathematical notation and capturing
#     both its structure and content.
#
#     With additional changes for integration into the validator.nu
#     service.
#
#     With additional changes for integration into EPUBCheck. 
#
#     Copyright 1998-2010 W3C (MIT, ERCIM, Keio)
#     Copyright 2012 Mozilla Foundation
#     Copyright 2014-2019 W3C (MIT, ERCIM, Keio, Beihang)
#
#     Use and distribution of this code are permitted under the terms
#     W3C Software Notice and License
#     http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231

default namespace m = "http://www.w3.org/1998/Math/MathML"
namespace local = ""

math = element math {math.attributes,MathExpression*}
MathExpression = semantics

NonMathMLAtt = attribute (* - (local:*|m:*)) {xsd:string} 

CommonDeprecatedAtt = attribute other {text}?

# changed datatype of id attr from ID to non-empty string
CommonAtt = attribute id {xsd:string { pattern = '[^\s]+' }}?,
            attribute xref {text}?,
            attribute class {xsd:NMTOKENS}?,
            attribute style {xsd:string}?,
            attribute href {xsd:anyURI}?,
            CommonDeprecatedAtt,
            NonMathMLAtt*


math.attributes = CommonAtt,
               attribute display {"block" | "inline"}?,
               attribute maxwidth {length}?,
               attribute overflow {"linebreak" | "scroll" | "elide" | "truncate" | "scale"}?,
               attribute altimg {xsd:anyURI}?,
               attribute altimg-width {length}?,
               attribute altimg-height {length}?,
               attribute altimg-valign {length | "top" | "middle" | "bottom"}?,
               attribute alttext {text}?,
               attribute cdgroup {xsd:anyURI}?,
               math.deprecatedattributes

# the mathml3-presentation schema  adds additional attributes
# to the math element, all those valid on mstyle

math.deprecatedattributes = attribute mode {xsd:string}?,
                            attribute macros {xsd:string}?


name = attribute name {xsd:NCName}
cd = attribute cd {xsd:NCName}

src = attribute src {xsd:anyURI}?

annotation = element annotation {annotation.attributes,text}
                     
# changed content model of annotation-xml -- mike
annotation-xml =
    ( annotation-xml.xhtml
    | annotation-xml.svg
    | annotation-xml.mathml
    )
    annotation-xml.model = (MathExpression | anyElement)*
    anyElement =
      element * - m:* {
        (attribute * { text }
         | text
         | anyElement)*
      }
    annotation-xml.xhtml =
        element annotation-xml {
            annotation-xml.model.xhtml, annotation-xml.attributes, att-encoding.xhtml?
        }
        annotation-xml.model.xhtml = 
          notAllowed
        att-encoding.xhtml =
          attribute encoding {
            string "application/xhtml+xml" | string "text/html"
          }
    annotation-xml.svg =
        element annotation-xml {
            annotation-xml.model.svg, annotation-xml.attributes, att-encoding.svg?
        }
        annotation-xml.model.svg = 
          notAllowed
        att-encoding.svg =
          attribute encoding {
            string "SVG1.1"
          }
    annotation-xml.mathml =
        element annotation-xml {
            annotation-xml.model.mathml, annotation-xml.attributes, att-encoding.mathml?
        }
        annotation-xml.model.mathml = 
          math
        att-encoding.mathml =
          attribute encoding {
            string "MathML" | string "MathML-Content" | string "MathML-Presentation"
          }

annotation.attributes = CommonAtt,
	                cd?,
                        name?,
                        DefEncAtt,
                        src?

annotation-xml.attributes = CommonAtt, cd?, name?, src?

DefEncAtt = attribute encoding {xsd:string}?,
            attribute definitionURL {xsd:anyURI}?

semantics = element semantics {semantics.attributes,
                               MathExpression, 
                              (annotation|annotation-xml)*}
semantics.attributes = CommonAtt,DefEncAtt,cd?,name?



length = xsd:string {
  pattern = '\s*((-?[0-9]*([0-9]\.?|\.[0-9])[0-9]*(e[mx]|in|cm|mm|p[xtc]|%)?)|(negative)?((very){0,2}thi(n|ck)|medium)mathspace)\s*' 
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy