Skip to content

Instantly share code, notes, and snippets.

@takahashim
Created May 4, 2010 09:39
Show Gist options
  • Save takahashim/389201 to your computer and use it in GitHub Desktop.
Save takahashim/389201 to your computer and use it in GitHub Desktop.
# NCX schema in relaxng compact syntax
# original: ncx.rng in epubcheck http://code.google.com/p/epubcheck/
# generated by RngToRncText.xsl (RngToRnc 1.4) http://www.pantor.com/download.html
#
default namespace = "http://www.daisy.org/z3986/2005/ncx/"
start =
element ncx
{
attribute version { "2005-1" },
i18n,
element head { meta+ },
element docTitle { attribute id { text }?, \text, img?, i18n },
element docAuthor { attribute id { text }?, \text, img?, i18n }*,
element navMap { attribute id { text }?, navInfo*, navLabel*, navPoint+ },
pageList?,
navList*
}
\text =
element text { ( attribute id { text }, attribute class { text } )?, text }
img =
element img
{
( attribute id { text }, attribute class { text } )?,
attribute src { text }
}
content = element content { attribute id { text }?, attribute src { text } }
navInfo = element navInfo { \text, img?, i18n }
navLabel = element navLabel { \text, img?, i18n }
navPoint =
element navPoint
{
attribute id { text },
attribute class { text }?,
attribute playOrder { text },
navLabel+,
content,
navPoint*
}
pageList =
element pageList
{
( attribute id { text }, attribute class { text } )?,
navLabel?,
navInfo?,
pageTarget+
}
navList =
element navList
{
attribute id { text }?,
attribute class { text }?,
navInfo*,
navLabel+,
navTarget+
}
pageTarget =
element pageTarget
{
attribute id { text }?,
attribute value { text }?,
attribute type { text },
attribute class { text }?,
attribute playOrder { text },
navLabel+,
content
}
navTarget =
element navTarget
{
attribute id { text },
attribute class { text }?,
attribute value { text }?,
attribute playOrder { text },
navLabel+,
content
}
meta =
element meta
{
attribute name { text },
attribute content { text },
attribute scheme { text }?
}
i18n = attribute lang { xsd:language }?, attribute dir { "ltr" | "rtl" }?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment