view etc/schema/relaxng.rnc @ 98353:f1adde06246e

(Search): Shorten introduction. (Basic Isearch): Add command table. Discuss reverse isearch and isearch highlighting. (Repeat Isearch): Move lazy highlighting discussion here. Add search ring to cindex. (Special Isearch): Move input methods discussion here. (Non-ASCII Isearch): Node deleted, merged with Special Isearch. (Isearch Yank): Node deleted, and contents moved into Basic Isearch and Repeat Isearch. (Isearch Minibuffer): New node. (Word Search): Document new word search commands. (Regexp Example): Simplify example using sentence-end-base variable. (Replace): Reword introduction. (Unconditional Replace): Remove unnecessary example. (Other Repeating Search): Document new `M-s o' binding.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 25 Sep 2008 17:52:23 +0000
parents 38f93f3d00a2
children ef31eb276c4b
line wrap: on
line source

# RELAX NG XML syntax expressed in RELAX NG Compact syntax.

default namespace rng = "http://relaxng.org/ns/structure/1.0"
namespace local = ""
datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"

start = pattern

pattern =
  element element { (nameQName | nameClass), (common & pattern+) }
  | element attribute { (nameQName | nameClass), (common & pattern?) }
  | element group|interleave|choice|optional
            |zeroOrMore|oneOrMore|list|mixed { common & pattern+ }
  | element ref|parentRef { nameNCName, common }
  | element empty|notAllowed|text { common }
  | element data { type, param*, (common & exceptPattern?) }
  | element value { commonAttributes, type?, xsd:string }
  | element externalRef { href, common }
  | element grammar { common & grammarContent* }

param = element param { commonAttributes, nameNCName, xsd:string }

exceptPattern = element except { common & pattern+ }

grammarContent = 
  definition
  | element div { common & grammarContent* }
  | element include { href, (common & includeContent*) }

includeContent =
  definition
  | element div { common & includeContent* }

definition =
  element start { combine?, (common & pattern+) }
  | element define { nameNCName, combine?, (common & pattern+) }

combine = attribute combine { "choice" | "interleave" }

nameClass = 
  element name { commonAttributes, xsd:QName }
  | element anyName { common & exceptNameClass? }
  | element nsName { common & exceptNameClass? }
  | element choice { common & nameClass+ }

exceptNameClass = element except { common & nameClass+ }

nameQName = attribute name { xsd:QName }
nameNCName = attribute name { xsd:NCName }
href = attribute href { xsd:anyURI }
type = attribute type { xsd:NCName }

common = commonAttributes, foreignElement*

commonAttributes = 
  attribute ns { xsd:string }?,
  attribute datatypeLibrary { xsd:anyURI }?,
  foreignAttribute*

foreignElement = element * - rng:* { (anyAttribute | text | anyElement)* }
foreignAttribute = attribute * - (rng:*|local:*) { text }
anyElement = element * { (anyAttribute | text | anyElement)* }
anyAttribute = attribute * { text }