-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1674 from CruGlobal/specCleanup
xml spec cleanup
- Loading branch information
Showing
7 changed files
with
147 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,138 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<xs:schema xmlns:analytics="https://mobile-content-api.cru.org/xmlns/analytics" | ||
xmlns:content="https://mobile-content-api.cru.org/xmlns/content" | ||
xmlns:cyoa="https://mobile-content-api.cru.org/xmlns/cyoa" | ||
xmlns:page="https://mobile-content-api.cru.org/xmlns/page" xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
elementFormDefault="qualified" targetNamespace="https://mobile-content-api.cru.org/xmlns/page"> | ||
|
||
<xs:import namespace="https://mobile-content-api.cru.org/xmlns/analytics" schemaLocation="analytics.xsd" /> | ||
<xs:import namespace="https://mobile-content-api.cru.org/xmlns/content" schemaLocation="content.xsd" /> | ||
<xs:import namespace="https://mobile-content-api.cru.org/xmlns/cyoa" schemaLocation="cyoa.xsd" /> | ||
|
||
<!-- region Page --> | ||
<xs:complexType name="BasePageType"> | ||
<xs:sequence> | ||
<xs:element ref="analytics:events" minOccurs="0"> | ||
<xs:annotation> | ||
<xs:documentation> | ||
Analytics events to trigger for this page. The default trigger mode for analytics events on | ||
pages is "visible". | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:element> | ||
</xs:sequence> | ||
|
||
<xs:attribute name="id" type="content:id" /> | ||
|
||
<xs:attribute name="hidden" type="xs:boolean" default="false"> | ||
<xs:annotation> | ||
<xs:documentation>Is this page hidden until triggered by a listener.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
|
||
<xs:attribute name="listeners" type="content:listeners"> | ||
<xs:annotation> | ||
<xs:documentation>This is a list of event_ids that will cause navigation to jump to this page. Page | ||
listeners are always "active". | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="dismiss-listeners" type="content:listeners"> | ||
<xs:annotation> | ||
<xs:documentation>This is the list of event_ids that will pop this page off a navigation stack. This | ||
listener is only "active" when the page is on top of the navigation stack. | ||
|
||
This listener currently only applies to the cyoa tool type. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
|
||
<xs:attribute name="primary-color" type="content:colorValue"> | ||
<xs:annotation> | ||
<xs:documentation>The primary color for this page. Defaults to the primary-color of the Manifest. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="primary-text-color" type="content:colorValue"> | ||
<xs:annotation> | ||
<xs:documentation>The text color for text displayed on top of the primary-color. Defaults to the | ||
primary-text-color of the Manifest. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
|
||
<xs:attribute name="background-color" type="content:colorValue" default="rgba(255, 255, 255, 0)"> | ||
<xs:annotation> | ||
<xs:documentation>This defines the background color for this page. This background color is layered on | ||
top of any manifest background layers. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="background-image" type="xs:string"> | ||
<xs:annotation> | ||
<xs:documentation>This defines a background image for this page.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="background-image-align" type="content:imageGravity" default="center"> | ||
<xs:annotation> | ||
<xs:documentation>This defines how we align the background image. This defaults to center. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="background-image-scale-type" type="content:imageScaleType" default="fill-x"> | ||
<xs:annotation> | ||
<xs:documentation>This defines how we should scale the background image. This defaults to fill-x. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
|
||
<xs:attribute name="control-color" type="content:colorValue"> | ||
<xs:annotation> | ||
<xs:documentation>This defines the control color for this page. This defaults to the page control color | ||
defined on the manifest. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
|
||
<xs:attribute name="text-color" type="content:colorValue"> | ||
<xs:annotation> | ||
<xs:documentation>The default text color for text content on this page. Defaults to the Manifest | ||
text-color. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="text-scale" type="xs:float" default="1"> | ||
<xs:annotation> | ||
<xs:documentation>Defines how much to scale all the text content on this page by.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
|
||
<!-- Import any external groups of attributes we want to support --> | ||
<xs:attributeGroup ref="content:page" /> | ||
<xs:attributeGroup ref="cyoa:page" /> | ||
</xs:complexType> | ||
<!-- region Page --> | ||
|
||
<!-- region external attributes --> | ||
<xs:attributeGroup name="manifest"> | ||
<xs:annotation> | ||
<xs:documentation>This attribute group is the set of attributes that can appear on the manifest node in the | ||
manifest xml. | ||
</xs:documentation> | ||
</xs:annotation> | ||
<xs:attribute ref="page:control-color" default="rgba(225, 225, 225, 1)"> | ||
<xs:annotation> | ||
<xs:documentation> | ||
This defines the control color for pages. | ||
|
||
Deprecated behavior: | ||
Fallback to lesson:control-color for lesson tool types. | ||
Remove this behavior once lesson:control-color is removed. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
</xs:attributeGroup> | ||
|
||
<xs:attribute name="control-color" type="content:colorValue" /> | ||
<!-- endregion external attributes --> | ||
<xs:include schemaLocation="page_base.xsd" /> | ||
<xs:include schemaLocation="page_cardcollection.xsd" /> | ||
<xs:include schemaLocation="page_content.xsd" /> | ||
</xs:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<xs:schema xmlns:analytics="https://mobile-content-api.cru.org/xmlns/analytics" | ||
xmlns:content="https://mobile-content-api.cru.org/xmlns/content" | ||
xmlns:cyoa="https://mobile-content-api.cru.org/xmlns/cyoa" | ||
xmlns:page="https://mobile-content-api.cru.org/xmlns/page" xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
elementFormDefault="qualified" targetNamespace="https://mobile-content-api.cru.org/xmlns/page"> | ||
|
||
<xs:import namespace="https://mobile-content-api.cru.org/xmlns/analytics" schemaLocation="analytics.xsd" /> | ||
<xs:import namespace="https://mobile-content-api.cru.org/xmlns/content" schemaLocation="content.xsd" /> | ||
<xs:import namespace="https://mobile-content-api.cru.org/xmlns/cyoa" schemaLocation="cyoa.xsd" /> | ||
|
||
<!-- region Page --> | ||
<xs:complexType name="BasePageType"> | ||
<xs:sequence> | ||
<xs:element ref="analytics:events" minOccurs="0"> | ||
<xs:annotation> | ||
<xs:documentation> | ||
Analytics events to trigger for this page. The default trigger mode for analytics events on | ||
pages is "visible". | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:element> | ||
</xs:sequence> | ||
|
||
<xs:attribute name="id" type="content:id" /> | ||
|
||
<xs:attribute name="hidden" type="xs:boolean" default="false"> | ||
<xs:annotation> | ||
<xs:documentation>Is this page hidden until triggered by a listener.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
|
||
<xs:attribute name="listeners" type="content:listeners"> | ||
<xs:annotation> | ||
<xs:documentation>This is a list of event_ids that will cause navigation to jump to this page. Page | ||
listeners are always "active". | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="dismiss-listeners" type="content:listeners"> | ||
<xs:annotation> | ||
<xs:documentation>This is the list of event_ids that will pop this page off a navigation stack. This | ||
listener is only "active" when the page is on top of the navigation stack. | ||
|
||
This listener currently only applies to the cyoa tool type. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
|
||
<xs:attribute name="primary-color" type="content:colorValue"> | ||
<xs:annotation> | ||
<xs:documentation>The primary color for this page. Defaults to the primary-color of the Manifest. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="primary-text-color" type="content:colorValue"> | ||
<xs:annotation> | ||
<xs:documentation>The text color for text displayed on top of the primary-color. Defaults to the | ||
primary-text-color of the Manifest. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
|
||
<xs:attribute name="background-color" type="content:colorValue" default="rgba(255, 255, 255, 0)"> | ||
<xs:annotation> | ||
<xs:documentation>This defines the background color for this page. This background color is layered on | ||
top of any manifest background layers. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="background-image" type="xs:string"> | ||
<xs:annotation> | ||
<xs:documentation>This defines a background image for this page.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="background-image-align" type="content:imageGravity" default="center"> | ||
<xs:annotation> | ||
<xs:documentation>This defines how we align the background image. This defaults to center. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="background-image-scale-type" type="content:imageScaleType" default="fill-x"> | ||
<xs:annotation> | ||
<xs:documentation>This defines how we should scale the background image. This defaults to fill-x. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
|
||
<xs:attribute name="control-color" type="content:colorValue"> | ||
<xs:annotation> | ||
<xs:documentation>This defines the control color for this page. This defaults to the page control color | ||
defined on the manifest. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
|
||
<xs:attribute name="text-color" type="content:colorValue"> | ||
<xs:annotation> | ||
<xs:documentation>The default text color for text content on this page. Defaults to the Manifest | ||
text-color. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="text-scale" type="xs:float" default="1"> | ||
<xs:annotation> | ||
<xs:documentation>Defines how much to scale all the text content on this page by.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
|
||
<!-- Import any external groups of attributes we want to support --> | ||
<xs:attributeGroup ref="content:page" /> | ||
<xs:attributeGroup ref="cyoa:page" /> | ||
</xs:complexType> | ||
<!-- region Page --> | ||
|
||
<!-- region external attributes --> | ||
<xs:attributeGroup name="manifest"> | ||
<xs:annotation> | ||
<xs:documentation>This attribute group is the set of attributes that can appear on the manifest node in the | ||
manifest xml. | ||
</xs:documentation> | ||
</xs:annotation> | ||
<xs:attribute ref="page:control-color" default="rgba(225, 225, 225, 1)"> | ||
<xs:annotation> | ||
<xs:documentation> | ||
This defines the control color for pages. | ||
|
||
Deprecated behavior: | ||
Fallback to lesson:control-color for lesson tool types. | ||
Remove this behavior once lesson:control-color is removed. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
</xs:attributeGroup> | ||
|
||
<xs:attribute name="control-color" type="content:colorValue" /> | ||
<!-- endregion external attributes --> | ||
</xs:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters