[ttml2] add missing schema embedded modules
authorGlenn Adams <glenn@skynav.com>
Sat, 22 Nov 2014 10:12:09 -0700
changeset 767 cc2b7aad7e7a
parent 766 86ac277fdc7c
child 768 e3fdbceb09cb
[ttml2] add missing schema embedded modules
ttml2/spec/rnc/ttml2-embedded.rnc
ttml2/spec/xsd/ttml2-embedded.xsd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ttml2/spec/rnc/ttml2-embedded.rnc	Sat Nov 22 10:12:09 2014 -0700
@@ -0,0 +1,189 @@
+# .......................................................................
+# TTML2 Embedded Content Module .........................................
+# .......................................................................
+
+# Embedded Content Attributes
+
+TTAF.encoding.attrib
+  = attribute encoding { TTAF.DataEncoding.datatype }?
+TTAF.format.attrib
+  = attribute format { TTAF.DataFormat.datatype }?
+TTAF.length.attrib
+  = attribute length { TTAF.DataLength.datatype }?
+TTAF.src.attrib
+  = attribute src { TTAF.DataSource.datatype }?
+TTAF.type.attrib
+  = attribute type { TTAF.DataType.datatype }?
+TTAF.type.required.attrib
+  = attribute type { TTAF.DataType.datatype }
+
+# Data Attribute Class
+TTAF.Data.attrib.class &=
+  TTAF.format.attrib,
+  TTAF.src.attrib,
+  TTAF.type.attrib
+
+# Data Attribute Required Class
+TTAF.Data.attrib.required.class &=
+  TTAF.format.attrib,
+  TTAF.src.attrib,
+  TTAF.type.required.attrib
+
+# Embedded Content Elements
+
+# audio
+TTAF.audio =
+  element audio {
+    TTAF.audio.attlist,
+    TTAF.audio.content
+  }
+
+TTAF.audio.attlist &=
+  TTAF.Core.attrib.class,
+  TTAF.Metadata.attrib.class,
+  TTAF.Data.attrib.class
+
+TTAF.audio.content.extra = empty
+TTAF.audio.content =
+  (TTAF.Metadata.class*,
+   (TTAF.source | TTAF.audio.content.extra)*)
+
+# chunk
+TTAF.chunk =
+  element chunk {
+    TTAF.chunk.attlist,
+    TTAF.chunk.content
+  }
+
+TTAF.chunk.attlist &=
+  TTAF.id.attrib,
+  TTAF.encoding.attrib,
+  TTAF.length.attrib
+
+TTAF.chunk.content.extra = empty
+TTAF.chunk.content =
+  text
+
+# data
+TTAF.data =
+  element data {
+    TTAF.data.attlist,
+    TTAF.data.content
+  }
+
+TTAF.data.attlist &=
+  TTAF.Core.attrib.class,
+  TTAF.Data.attrib.required.class,
+  TTAF.encoding.attrib,
+  TTAF.length.attrib
+
+TTAF.data.content.extra = empty
+TTAF.data.content =
+  (text |
+    (TTAF.Metadata.class*,
+     TTAF.chunk+,
+     TTAF.data.content.extra*))
+
+# font
+TTAF.font =
+  element font {
+    TTAF.font.attlist,
+    TTAF.font.content
+  }
+
+TTAF.font.attlist &=
+  TTAF.Core.attrib.class,
+  TTAF.Metadata.attrib.class,
+  TTAF.Data.attrib.class,
+  attribute family { TTAF.FontFamily.datatype },
+  attribute range { TTAF.UnicodeRange.datatype },
+  attribute style { TTAF.FontStyle.datatype },
+  attribute weight { TTAF.FontWeight.datatype }
+
+TTAF.font.content.extra = empty
+TTAF.font.content =
+  (TTAF.Metadata.class*,
+   (TTAF.source | TTAF.font.content.extra)*)
+
+# image
+TTAF.image =
+  element image {
+    TTAF.image.attlist,
+    TTAF.image.content
+  }
+
+TTAF.image.attlist &=
+  TTAF.Core.attrib.class,
+  TTAF.Metadata.attrib.class,
+  TTAF.Data.attrib.class
+
+TTAF.image.content.extra = empty
+TTAF.image.content =
+  (TTAF.Metadata.class*,
+   (TTAF.source | TTAF.image.content.extra)*)
+
+# resources
+TTAF.resources =
+  element resources {
+    TTAF.resources.attlist,
+    TTAF.resources.content
+  }
+
+TTAF.resources.attlist &=
+  TTAF.Core.attrib.class
+
+TTAF.resources.content.extra = empty
+TTAF.resources.content =
+  (TTAF.Metadata.class*,
+   (TTAF.Resource.class | TTAF.resources.content.extra)*)
+
+# source
+TTAF.source =
+  element source {
+    TTAF.source.attlist,
+    TTAF.source.content
+  }
+
+TTAF.source.attlist &=
+  TTAF.Core.attrib.class,
+  TTAF.Data.attrib.class
+
+TTAF.source.content.extra = empty
+TTAF.source.content =
+  (TTAF.Metadata.class*,
+   TTAF.data?,
+   TTAF.source.content.extra*)
+
+# Audio.class
+TTAF.Audio.extra = empty
+TTAF.Audio.class |=
+  TTAF.audio | TTAF.Audio.extra
+
+# Data.class
+TTAF.Data.extra = empty
+TTAF.Data.class |=
+  TTAF.data | TTAF.Data.extra
+
+# Font.class
+TTAF.Font.extra = empty
+TTAF.Font.class |=
+  TTAF.font | TTAF.Font.extra
+
+# Image.class
+TTAF.Image.extra = empty
+TTAF.Image.class |=
+  TTAF.image | TTAF.Image.extra
+
+# Embedded.class
+TTAF.Embedded.extra = empty
+TTAF.Embedded.class |=
+  TTAF.audio | TTAF.image | TTAF.Embedded.extra
+
+# Resource.class
+TTAF.Resource.extra = empty
+TTAF.Resource.class |=
+  TTAF.Data.class | TTAF.Embedded.class | TTAF.Font.class
+
+# .......................................................................
+# .......................................................................
+# .......................................................................
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ttml2/spec/xsd/ttml2-embedded.xsd	Sat Nov 22 10:12:09 2014 -0700
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xs:schema targetNamespace="http://www.w3.org/ns/ttml" xml:lang="en"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:tt="http://www.w3.org/ns/ttml"
+  xmlns:ttd="http://www.w3.org/ns/ttml#datatype"
+  xmlns:ttm="http://www.w3.org/ns/ttml#metadata">
+  <xs:include schemaLocation="ttml2-core-attribs.xsd"/>
+  <xs:include schemaLocation="ttml2-metadata.xsd"/>
+  <xs:import namespace="http://www.w3.org/ns/ttml#metadata"
+    schemaLocation="ttml2-metadata-attribs.xsd"/>
+  <xs:import namespace="http://www.w3.org/ns/ttml#datatype"
+    schemaLocation="ttml2-datatypes.xsd"/>
+  <xs:attributeGroup name="audio.attlist">
+    <xs:attributeGroup ref="tt:Core.attrib.class"/>
+    <xs:attributeGroup ref="ttm:Metadata.attrib.class"/>
+    <xs:attribute name="format" type="ttd:dataFormat"/>
+    <xs:attribute name="src" type="ttd:dataSource"/>
+    <xs:attribute name="type" type="ttd:dataType"/>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="chunk.attlist">
+    <xs:attributeGroup ref="tt:Core.ID.attrib.class"/>
+    <xs:attribute name="encoding" type="ttd:dataEncoding"/>
+    <xs:attribute name="length" type="ttd:dataLength"/>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="data.attlist">
+    <xs:attributeGroup ref="tt:Core.attrib.class"/>
+    <xs:attribute name="encoding" type="ttd:dataEncoding"/>
+    <xs:attribute name="format" type="ttd:dataFormat"/>
+    <xs:attribute name="length" type="ttd:dataLength"/>
+    <xs:attribute name="src" type="ttd:dataSource"/>
+    <xs:attribute name="type" type="ttd:dataType" use="required"/>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="font.attlist">
+    <xs:attributeGroup ref="tt:Core.attrib.class"/>
+    <xs:attribute name="family" type="ttd:fontFamily"/>
+    <xs:attribute name="format" type="ttd:dataFormat"/>
+    <xs:attribute name="range" type="ttd:fontRange"/>
+    <xs:attribute name="src" type="ttd:dataSource"/>
+    <xs:attribute name="style" type="ttd:fontStyle"/>
+    <xs:attribute name="type" type="ttd:dataType"/>
+    <xs:attribute name="weight" type="ttd:fontWeight"/>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="image.attlist">
+    <xs:attributeGroup ref="tt:Core.attrib.class"/>
+    <xs:attributeGroup ref="ttm:Metadata.attrib.class"/>
+    <xs:attribute name="format" type="ttd:dataFormat"/>
+    <xs:attribute name="src" type="ttd:dataSource"/>
+    <xs:attribute name="type" type="ttd:dataType"/>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="resources.attlist">
+    <xs:attributeGroup ref="tt:Core.attrib.class"/>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="source.attlist">
+    <xs:attributeGroup ref="tt:Core.attrib.class"/>
+    <xs:attribute name="format" type="ttd:dataFormat"/>
+    <xs:attribute name="src" type="ttd:dataSource"/>
+    <xs:attribute name="type" type="ttd:dataType"/>
+  </xs:attributeGroup>
+  <xs:complexType name="audio.eltype">
+    <xs:sequence>
+      <xs:group ref="tt:Metadata.class" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element ref="tt:source" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attributeGroup ref="tt:audio.attlist"/>
+  </xs:complexType>
+  <xs:complexType name="chunk.eltype" mixed="true">
+    <xs:attributeGroup ref="tt:chunk.attlist"/>
+  </xs:complexType>
+  <xs:complexType name="data.eltype" mixed="true">
+    <xs:sequence>
+      <xs:group ref="tt:Metadata.class" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element ref="tt:chunk" minOccurs="1" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attributeGroup ref="tt:data.attlist"/>
+  </xs:complexType>
+  <xs:complexType name="font.eltype">
+    <xs:sequence>
+      <xs:group ref="tt:Metadata.class" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element ref="tt:source" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attributeGroup ref="tt:font.attlist"/>
+  </xs:complexType>
+  <xs:complexType name="image.eltype">
+    <xs:sequence>
+      <xs:group ref="tt:Metadata.class" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element ref="tt:source" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attributeGroup ref="tt:image.attlist"/>
+  </xs:complexType>
+  <xs:complexType name="resources.eltype">
+    <xs:sequence>
+      <xs:group ref="tt:Metadata.class" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:group ref="tt:Resource.class" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+    <xs:attributeGroup ref="tt:resources.attlist"/>
+  </xs:complexType>
+  <xs:complexType name="source.eltype">
+    <xs:sequence>
+      <xs:group ref="tt:Metadata.class" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element ref="tt:data" minOccurs="0" maxOccurs="1"/>
+    </xs:sequence>
+    <xs:attributeGroup ref="tt:source.attlist"/>
+  </xs:complexType>
+  <xs:element name="audio" type="tt:audio.eltype"/>
+  <xs:element name="chunk" type="tt:chunk.eltype"/>
+  <xs:element name="data" type="tt:data.eltype"/>
+  <xs:element name="font" type="tt:font.eltype"/>
+  <xs:element name="image" type="tt:image.eltype"/>
+  <xs:element name="resources" type="tt:resources.eltype"/>
+  <xs:element name="source" type="tt:source.eltype"/>
+  <xs:group name="Audio.class">
+    <xs:choice>
+      <xs:element ref="tt:audio"/>
+    </xs:choice>
+  </xs:group>
+  <xs:group name="Data.class">
+    <xs:choice>
+      <xs:element ref="tt:data"/>
+    </xs:choice>
+  </xs:group>
+  <xs:group name="Font.class">
+    <xs:choice>
+      <xs:element ref="tt:font"/>
+    </xs:choice>
+  </xs:group>
+  <xs:group name="Image.class">
+    <xs:choice>
+      <xs:element ref="tt:image"/>
+    </xs:choice>
+  </xs:group>
+  <xs:group name="Embedded.class">
+    <xs:choice>
+      <xs:element ref="tt:audio"/>
+      <xs:element ref="tt:image"/>
+    </xs:choice>
+  </xs:group>
+  <xs:group name="Resource.class">
+    <xs:choice>
+      <xs:group ref="tt:Data.class"/>
+      <xs:group ref="tt:Embedded.class"/>
+      <xs:group ref="tt:Font.class"/>
+    </xs:choice>
+  </xs:group>
+</xs:schema>