[ttml2] add missing isd schema files
authorGlenn Adams <glenn@skynav.com>
Wed, 14 Jan 2015 19:33:08 -0700
changeset 839 303566a2b384
parent 838 a7f98e694433
child 840 a5843d9ba23a
[ttml2] add missing isd schema files
ttml2/spec/rnc/ttml2-isd.rnc
ttml2/spec/xsd/ttml2-isd.xsd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ttml2/spec/rnc/ttml2-isd.rnc	Wed Jan 14 19:33:08 2015 -0700
@@ -0,0 +1,108 @@
+# .......................................................................
+# TTML2 ISD Module ......................................................
+# .......................................................................
+
+namespace isd = "http://www.w3.org/ns/ttml#isd"
+namespace ttp = "http://www.w3.org/ns/ttml#parameter"
+namespace tts = "http://www.w3.org/ns/ttml#styling"
+namespace local = ""
+
+TTAF.isd.parameter.attrib.class &=
+  TTAF.cellResolution.attrib,
+  TTAF.frameRate.attrib,
+  TTAF.frameRateMultiplier.attrib,
+  TTAF.mediaOffset.attrib,
+  TTAF.pixelAspectRatio.attrib,
+  TTAF.storageAspectRatio.attrib,
+  TTAF.subFrameRate.attrib,
+  TTAF.tickRate.attrib
+
+TTAF.isd.style.attrib.class &=
+  ( attribute tts:* { text } )*
+
+TTAF.isd.other.attrib.class &=
+  ( attribute * - ( xml:* | local:* | ttp:* | tts:* ) { text } )*
+
+# sequence - intermediate synchronic document sequence
+TTAF.isd.sequence =
+  element isd:sequence {
+    TTAF.isd.sequence.attlist,
+    TTAF.isd.sequence.content
+  }
+
+TTAF.isd.sequence.attlist &=
+  attribute size { xsd:nonNegativeInteger }?,
+  attribute version { xsd:nonNegativeInteger }?,
+  TTAF.lang.required.attrib,
+  TTAF.isd.parameter.attrib.class,
+  TTAF.isd.other.attrib.class
+
+TTAF.isd.sequence.content.extra = empty
+TTAF.isd.sequence.content =
+  (TTAF.metadata*,
+   TTAF.parameters.profile?,
+   TTAF.isd.isd*,
+   TTAF.isd.sequence.content.extra*)
+
+# isd - intermediate synchronic document instance
+TTAF.isd.isd =
+  element isd:isd {
+    TTAF.isd.isd.attlist,
+    TTAF.isd.isd.content
+  }
+
+TTAF.isd.isd.attlist &=
+  attribute begin { string },
+  attribute end { string },
+  attribute version { xsd:nonNegativeInteger }?,
+  TTAF.lang.attrib,
+  TTAF.isd.parameter.attrib.class,
+  TTAF.isd.other.attrib.class
+
+TTAF.isd.isd.content.extra = empty
+TTAF.isd.isd.content =
+  (TTAF.metadata*,
+   TTAF.parameters.profile?,
+   TTAF.isd.css*,
+   TTAF.isd.region*,
+   TTAF.isd.isd.content.extra*)
+
+# css - computed style set
+TTAF.isd.css =
+  element isd:css {
+    TTAF.isd.css.attlist,
+    TTAF.isd.css.content
+  }
+
+TTAF.isd.css.attlist &=
+  TTAF.id.required.attrib,
+  TTAF.isd.style.attrib.class,
+  TTAF.isd.other.attrib.class
+
+TTAF.isd.css.content.extra = empty
+TTAF.isd.css.content =
+  (TTAF.metadata*,
+   TTAF.isd.css.content.extra*)
+
+# region - region
+TTAF.isd.region =
+  element isd:region {
+    TTAF.isd.region.attlist,
+    TTAF.isd.region.content
+  }
+
+TTAF.isd.region.attlist &=
+  attribute style { xsd:IDREF }?,
+  TTAF.id.required.attrib,
+  TTAF.isd.other.attrib.class
+
+TTAF.isd.region.content.extra = empty
+TTAF.isd.region.content =
+  (TTAF.metadata*,
+   TTAF.animation*,
+   TTAF.body,
+   TTAF.isd.region.content.extra*)
+
+# .......................................................................
+# .......................................................................
+# .......................................................................
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ttml2/spec/xsd/ttml2-isd.xsd	Wed Jan 14 19:33:08 2015 -0700
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xs:schema targetNamespace="http://www.w3.org/ns/ttml#isd" xml:lang="en"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:tt="http://www.w3.org/ns/ttml"
+  xmlns:ttm="http://www.w3.org/ns/ttml#metadata"
+  xmlns:ttp="http://www.w3.org/ns/ttml#parameter"
+  xmlns:tts="http://www.w3.org/ns/ttml#styling"
+  xmlns:isd="http://www.w3.org/ns/ttml#isd">
+  <xs:import namespace="http://www.w3.org/ns/ttml"
+    schemaLocation="ttml2-metadata.xsd"/>
+  <xs:import namespace="http://www.w3.org/ns/ttml#parameter"
+    schemaLocation="ttml2-parameter-attribs.xsd"/>
+  <xs:import namespace="http://www.w3.org/ns/ttml#parameter"
+    schemaLocation="ttml2-parameter-items.xsd"/>
+  <xs:import namespace="http://www.w3.org/ns/ttml"
+    schemaLocation="ttml2-content.xsd"/>
+  <xs:import namespace="http://www.w3.org/ns/ttml"
+    schemaLocation="ttml2-animation.xsd"/>
+  <xs:import namespace="http://www.w3.org/XML/1998/namespace"
+    schemaLocation="xml.xsd"/>
+  <xs:attributeGroup name="isd.parameter.attrib.class">
+    <xs:attribute ref="ttp:cellResolution"/>
+    <xs:attribute ref="ttp:frameRate"/>
+    <xs:attribute ref="ttp:frameRateMultiplier"/>
+    <xs:attribute ref="ttp:mediaOffset"/>
+    <xs:attribute ref="ttp:pixelAspectRatio"/>
+    <xs:attribute ref="ttp:storageAspectRatio"/>
+    <xs:attribute ref="ttp:subFrameRate"/>
+    <xs:attribute ref="ttp:tickRate"/>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="isd.style.attrib.class">
+    <xs:anyAttribute namespace="http://www.w3.org/ns/ttml#styling" processContents="lax"/>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="isd.other.attrib.class">
+    <xs:anyAttribute namespace="##other" processContents="lax"/>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="sequence.attlist">
+    <xs:attribute name="size" type="xs:nonNegativeInteger"/>
+    <xs:attribute name="version" type="xs:nonNegativeInteger"/>
+    <xs:attribute ref="xml:id"/>
+    <xs:attribute ref="xml:lang" use="required"/>
+    <xs:attributeGroup ref="isd:isd.parameter.attrib.class"/>
+    <xs:attributeGroup ref="isd:isd.other.attrib.class"/>
+  </xs:attributeGroup>
+  <xs:complexType name="sequence.eltype">
+    <xs:sequence>
+      <xs:element ref="tt:metadata" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element ref="ttp:profile" minOccurs="0" maxOccurs="1"/>
+      <xs:element ref="isd:isd" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attributeGroup ref="isd:sequence.attlist"/>
+  </xs:complexType>
+  <xs:attributeGroup name="isd.attlist">
+    <xs:attribute name="begin" type="xs:string" use="required"/>
+    <xs:attribute name="end" type="xs:string" use="required"/>
+    <xs:attribute name="version" type="xs:nonNegativeInteger"/>
+    <xs:attribute ref="xml:id"/>
+    <xs:attribute ref="xml:lang"/>
+    <xs:attributeGroup ref="isd:isd.parameter.attrib.class"/>
+    <xs:attributeGroup ref="isd:isd.other.attrib.class"/>
+  </xs:attributeGroup>
+  <xs:complexType name="isd.eltype">
+    <xs:sequence>
+      <xs:element ref="tt:metadata" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element ref="ttp:profile" minOccurs="0" maxOccurs="1"/>
+      <xs:element ref="isd:css" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element ref="isd:region" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attributeGroup ref="isd:isd.attlist"/>
+  </xs:complexType>
+  <xs:attributeGroup name="css.attlist">
+    <xs:attribute name="style" type="xs:IDREF"/>
+    <xs:attribute ref="xml:id" use="required"/>
+    <xs:attributeGroup ref="isd:isd.style.attrib.class"/>
+    <xs:attributeGroup ref="isd:isd.other.attrib.class"/>
+  </xs:attributeGroup>
+  <xs:complexType name="css.eltype">
+    <xs:sequence>
+      <xs:element ref="tt:metadata" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attributeGroup ref="isd:css.attlist"/>
+  </xs:complexType>
+  <xs:attributeGroup name="region.attlist">
+    <xs:attribute name="style" type="xs:IDREF"/>
+    <xs:attribute ref="xml:id" use="required"/>
+    <xs:attributeGroup ref="isd:isd.other.attrib.class"/>
+  </xs:attributeGroup>
+  <xs:complexType name="region.eltype">
+    <xs:sequence>
+      <xs:element ref="tt:metadata" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element ref="tt:animate" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element ref="tt:body" minOccurs="1" maxOccurs="1"/>
+    </xs:sequence>
+    <xs:attributeGroup ref="isd:region.attlist"/>
+  </xs:complexType>
+  <xs:element name="sequence" type="isd:sequence.eltype"/>
+  <xs:element name="isd" type="isd:isd.eltype"/>
+  <xs:element name="region" type="isd:region.eltype"/>
+  <xs:element name="css" type="isd:css.eltype"/>
+</xs:schema>