Skip to content

Commit

Permalink
Merge pull request #27 from dericed/error-attribute
Browse files Browse the repository at this point in the history
add error attribute to mediatrace schemas and transforms
  • Loading branch information
JeromeMartinez authored Jun 21, 2017
2 parents c4c85db + 5900389 commit cd9d565
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 4 deletions.
7 changes: 6 additions & 1 deletion mediaarea.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
xmlns="https://mediaarea.net/mediaarea" elementFormDefault="qualified"
xmlns:mi="https://mediaarea.net/mediainfo"
xmlns:mt="https://mediaarea.net/mediatrace"
xmlns:mmt="https://mediaarea.net/micromediatrace"
xmlns:mc="https://mediaarea.net/mediaconch"
version="0.1">
<xsd:import namespace="https://mediaarea.net/mediaconch" schemaLocation="mediaconch.xsd"/>
<xsd:import namespace="https://mediaarea.net/mediainfo" schemaLocation="mediainfo.xsd"/>
<xsd:import namespace="https://mediaarea.net/mediatrace" schemaLocation="mediatrace.xsd"/>
<xsd:import namespace="https://mediaarea.net/micromediatrace" schemaLocation="micromediatrace.xsd"/>
<xsd:element name="MediaArea" type="mediaareaType"/>
<xsd:complexType name="mediaareaType">
<xsd:annotation>
Expand All @@ -31,7 +33,10 @@
<xsd:complexType name="mediaType">
<xsd:sequence>
<xsd:element ref="mi:MediaInfo" minOccurs="0" maxOccurs="1" />
<xsd:element ref="mt:MediaTrace" minOccurs="0" maxOccurs="1" />
<xsd:choice minOccurs="0" maxOccurs="1">
<xsd:element ref="mt:MediaTrace" />
<xsd:element ref="mmt:MicroMediaTrace" />
</xsd:choice>
<xsd:element ref="mc:MediaConch" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="ref" />
Expand Down
5 changes: 5 additions & 0 deletions mediatrace.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,10 @@
<xsd:documentation>The attribute describes the type of data expression of the element, such as dt="binary.base64".</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="error" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Specifies the identity of an implementation error associated with the data or block. The value shall be expressed as a implementation check identifer and a version of that implementation check, delimited by a colon.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:attributeGroup>
</xsd:schema>
9 changes: 7 additions & 2 deletions micromediatrace.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<xsd:choice>
<xsd:element name="media" type="mediaType" minOccurs="0" maxOccurs="unbounded" />
<xsd:choice maxOccurs="unbounded">
<xsd:element name="block" type="blockType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="data" type="dataType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="b" type="blockType" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="d" type="dataType" minOccurs="0" maxOccurs="unbounded" />
</xsd:choice>
</xsd:choice>
</xsd:sequence>
Expand Down Expand Up @@ -141,5 +141,10 @@
<xsd:documentation>The attribute describes the type of data expression of the element, such as dt="binary.base64".</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="e" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Specifies the identity of an implementation error associated with the data or block. The value shall be expressed as a implementation check identifer and a version of that implementation check, delimited by a colon.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:attributeGroup>
</xsd:schema>
7 changes: 6 additions & 1 deletion transforms/micro.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,9 @@
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
<xsl:template match="@error">
<xsl:attribute name="e">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
5 changes: 5 additions & 0 deletions transforms/unmicro.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,9 @@
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:template>
<xsl:template match="@e">
<xsl:attribute name="error">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>

0 comments on commit cd9d565

Please sign in to comment.