This commit is contained in:
~lucidiot 2021-03-21 16:26:52 +00:00
parent 7e349ebe1b
commit 9d4fd78aae
3 changed files with 1195 additions and 0 deletions

492
assets/xsd/cdf-w3c.xsd Normal file
View File

@ -0,0 +1,492 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
W3C Channel Definition Format XML Schema
Copyright (c) 2021 ~lucidiot
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
This file was derived from the Channel Definition Format specification
at <https://www.w3.org/TR/NOTE-CDFsubmit.html>.
-->
<xs:schema targetNamespace="https://www.w3.org/TR/NOTE-CDFsubmit"
version="1.0"
elementFormDefault="qualified"
xmlns="https://www.w3.org/TR/NOTE-CDFsubmit"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="boolean">
<xs:restriction base="xs:string">
<xs:enumeration value="YES" />
<xs:enumeration value="NO" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="priority">
<xs:restriction base="xs:string">
<xs:enumeration value="HI" />
<xs:enumeration value="NORMAL" />
<xs:enumeration value="LOW" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="precache">
<xs:restriction base="xs:string">
<xs:enumeration value="DEFAULT">
<xs:annotation>
<xs:documentation>
Whatever the user has as default.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="YES">
<xs:annotation>
<xs:documentation>
Do retrieve contents into the cache.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="NO">
<xs:annotation>
<xs:documentation>
Do not retrieve contents into the cache.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="userScheduleValue">
<xs:restriction base="xs:string">
<xs:enumeration value="DAILY" />
<xs:enumeration value="WEEKLY" />
<xs:enumeration value="HOURLY" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="logoType">
<xs:restriction base="xs:string">
<xs:enumeration value="BIG" />
<xs:enumeration value="WIDE" />
<xs:enumeration value="SMALL" />
<xs:enumeration value="REGULAR" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="common" abstract="true">
<xs:sequence>
<xs:element name="LastMod" type="LastMod" minOccurs="0" />
<xs:element name="Title" type="Title" minOccurs="0" />
<xs:element name="Abstract" type="Abstract" minOccurs="0" />
<xs:element name="Author" type="Author" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="Publisher" type="Publisher" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="Copyright" type="Copyright" minOccurs="0" />
<xs:element name="PublicationDate" type="PublicationDate" minOccurs="0" />
<xs:element name="Logo" type="Logo" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="Keywords" type="Keywords" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="Category" type="Category" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="Ratings" type="Ratings" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="Schedule" type="Schedule" minOccurs="0" />
<xs:element name="UserSchedule" type="UserSchedule" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="LastMod">
<xs:annotation>
<xs:documentation>
Last modified date for this web page
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="xs:dateTime" use="required" />
</xs:complexType>
<xs:complexType name="Title">
<xs:annotation>
<xs:documentation>
Title
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="xs:string" use="required" />
</xs:complexType>
<xs:complexType name="Abstract">
<xs:annotation>
<xs:documentation>
Short description summarizing the article (200 characters or less recommended)
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="xs:string" use="required" />
</xs:complexType>
<xs:complexType name="Author">
<xs:annotation>
<xs:documentation>
Author
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="xs:string" use="required" />
</xs:complexType>
<xs:complexType name="Publisher">
<xs:annotation>
<xs:documentation>
Publisher
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="xs:string" use="required" />
</xs:complexType>
<xs:complexType name="Copyright">
<xs:annotation>
<xs:documentation>
Copyright
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="xs:string" use="required" />
</xs:complexType>
<xs:complexType name="PublicationDate">
<xs:annotation>
<xs:documentation>
Publication Date
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="xs:string" use="required" />
</xs:complexType>
<xs:complexType name="Keywords">
<xs:annotation>
<xs:documentation>
Comma delimited keywords that match this channel
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="xs:string" use="required" />
</xs:complexType>
<xs:complexType name="Category">
<xs:annotation>
<xs:documentation>
A category to which this web page belongs in. The string value is a URI to a CategoryDef element.
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="#.*" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:complexType name="Ratings">
<xs:annotation>
<xs:documentation>
Rating of the channel by one or more ratings services. (String found in PICS label meta tag.)
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="xs:string" use="required" />
</xs:complexType>
<xs:complexType name="Channel">
<xs:annotation>
<xs:documentation>
Defines a channel.
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="common">
<xs:sequence>
<xs:element name="Channel" type="Channel" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="Item" type="Item" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="IntroURI" type="IntroURI" minOccurs="0" />
<xs:element name="Authorization" type="Authorization" minOccurs="0" />
<xs:element name="MinStorage" type="MinStorage" minOccurs="0" />
<xs:element name="Tracking" type="Tracking" minOccurs="0" />
</xs:sequence>
<xs:attribute name="HREF" type="xs:anyURI" use="optional">
<xs:annotation>
<xs:documentation>
URI for the next updated version of this channel
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IsClonable" type="boolean" use="optional" default="NO">
<xs:annotation>
<xs:documentation>
Can channel be copied or moved within the channel changer hierarchy
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="IntroURI">
<xs:annotation>
<xs:documentation>
URI to introductory web page for channel. Can provide general and setup information
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="xs:anyURI" use="required" />
</xs:complexType>
<xs:complexType name="Authorization">
<xs:annotation>
<xs:documentation>
Certification of executable content downloadable by this channel ("Authenticode for channels")
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="xs:anyURI" use="required" />
</xs:complexType>
<xs:complexType name="MinStorage">
<xs:annotation>
<xs:documentation>
Minimum storage size required, in kilobytes
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="xs:nonNegativeInteger" use="optional" default="0" />
</xs:complexType>
<xs:complexType name="Item">
<xs:annotation>
<xs:documentation>
Defines an item of a channel, a unit of information for the user, usually corresponding to a web page.
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="common">
<xs:sequence>
<xs:element name="Usage" type="Usage" minOccurs="0" />
</xs:sequence>
<xs:attribute name="HREF" type="xs:anyURI" use="required">
<xs:annotation>
<xs:documentation>
URI of article contents
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="MIMEType" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
MIME Type of article contents
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IsVisible" type="boolean" use="optional" default="YES">
<xs:annotation>
<xs:documentation>
This item should be visible to the user.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Priority" type="priority" use="optional" default="NORMAL">
<xs:annotation>
<xs:documentation>
Priority of this item
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Precache" type="precache" use="optional" default="DEFAULT">
<xs:annotation>
<xs:documentation>
Publisher recommended download behavior.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Usage">
<xs:annotation>
<xs:documentation>
Start tag should have VALUE=usage where usage indicates how this item should be used. Children elements can specify more parameters.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:any minOccurs="0" />
</xs:sequence>
<xs:attribute name="VALUE" type="xs:string" use="optional" />
</xs:complexType>
<xs:complexType name="UserSchedule">
<xs:annotation>
<xs:documentation>
Specifies a client-side user-defined schedule.
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="userScheduleValue" use="optional">
<xs:annotation>
<xs:documentation>
ID/name for predefined/client defined schedule
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="StartDate">
<xs:annotation>
<xs:documentation>
This is the day upon which the schedule will start to apply.
By default, the schedule starts immediately.
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="xs:dateTime" use="required" />
</xs:complexType>
<xs:complexType name="EndDate">
<xs:annotation>
<xs:documentation>
This is the day upon which the schedule will start to apply.
By default, the schedule never ends.
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="xs:dateTime" use="required" />
</xs:complexType>
<xs:complexType name="baseTime" abstract="true">
<xs:attribute name="DAY" type="xs:nonNegativeInteger" default="0" />
<xs:attribute name="HOUR" type="xs:nonNegativeInteger" default="0" />
<xs:attribute name="MIN" type="xs:nonNegativeInteger" default="0" />
<xs:attribute name="SEC" type="xs:nonNegativeInteger" default="0" />
</xs:complexType>
<xs:complexType name="IntervalTime">
<xs:complexContent>
<xs:extension base="baseTime">
<xs:annotation>
<xs:documentation>
The interval of time that the schedule should repeat over.
By default, it only performs the schedule once (infinity).
</xs:documentation>
</xs:annotation>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="EarliestTime">
<xs:complexContent>
<xs:extension base="baseTime">
<xs:annotation>
<xs:documentation>
Earliest time during the schedule interval that the schedule applies to.
By default, the schedule will be performed at the beginning of the interval.
</xs:documentation>
</xs:annotation>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="LatestTime">
<xs:complexContent>
<xs:extension base="baseTime">
<xs:annotation>
<xs:documentation>
Latest time during the schedule interval that the schedule applied to. If it is not equal to EarliestTime, then the time is randomly chosen in range.
By default, the schedule will be performed at the beginning of the interval.
</xs:documentation>
</xs:annotation>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Schedule">
<xs:annotation>
<xs:documentation>
Defines a bounded repeating interval of time.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="StartDate" type="StartDate" minOccurs="0" />
<xs:element name="EndDate" type="EndDate" minOccurs="0" />
<xs:element name="IntervalTime" type="IntervalTime" minOccurs="0" />
<xs:element name="EarliestTime" type="EarliestTime" minOccurs="0" />
<xs:element name="LatestTime" type="LatestTime" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="Logo">
<xs:annotation>
<xs:documentation>
Defines an image that can be used to represent a channel or channel item.
</xs:documentation>
</xs:annotation>
<xs:attribute name="HREF" type="xs:anyURI" use="required">
<xs:annotation>
<xs:documentation>
URL to the image for the logo
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="TYPE" type="logoType" use="optional" default="REGULAR">
<xs:annotation>
<xs:documentation>
String indicating what context image should be used.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="Tracking">
<xs:annotation>
<xs:documentation>
Indicates how a channel can or should support user tracking.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="PostURL" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="PostURL">
<xs:annotation>
<xs:documentation>
The URL to post tracking results to
</xs:documentation>
</xs:annotation>
<xs:attribute name="HREF" type="xs:anyURI" use="required" />
</xs:complexType>
<xs:complexType name="CategoryDef">
<xs:annotation>
<xs:documentation>
This profile provides a generic container for properties of a category. Item profiles (used by channel and article profiles) can reference to these category elements using the URI "#foo" when ID="foo" is a parameter in the Category tag.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="CategoryName" />
<xs:element name="Description" type="Description" minOccurs="0" />
<xs:element name="CategoryDef" type="CategoryDef" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="ID" type="xs:ID" use="optional" />
</xs:complexType>
<xs:complexType name="CategoryName">
<xs:annotation>
<xs:documentation>
Name of category
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="xs:string" />
</xs:complexType>
<xs:complexType name="Description">
<xs:annotation>
<xs:documentation>
Textual description of category
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="xs:string" />
</xs:complexType>
<xs:element name="Channel" type="Channel" />
</xs:schema>

627
assets/xsd/cdf.xsd Normal file
View File

@ -0,0 +1,627 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Channel Definition Format XML Schema
Copyright (c) 2021 ~lucidiot
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
This file was derived from the Channel Definition Format documentation
at <https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa768139(v=vs.85)>.
-->
<xs:schema targetNamespace="https://msdn.microsoft.com/workshop/standards/cdf/"
version="1.0"
elementFormDefault="qualified"
xmlns="https://msdn.microsoft.com/workshop/standards/cdf/"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="sWhiteSpace">
<xs:restriction base="xs:string">
<xs:enumeration value="DEFAULT">
<xs:annotation>
<xs:documentation>
Value that permits white space to be filtered out during file processing.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="PRESERVE">
<xs:annotation>
<xs:documentation>
Value that ensures all white space characters are retained.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="shortUri">
<xs:restriction base="xs:anyURI">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="sCache">
<xs:restriction base="xs:string">
<xs:enumeration value="Yes">
<xs:annotation>
<xs:documentation>
Default. Content is downloaded only if the user has specified that channel content should be downloaded.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="No">
<xs:annotation>
<xs:documentation>
Content is not downloaded and the LEVEL attribute is ignored.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="sStyle">
<xs:restriction base="xs:string">
<xs:enumeration value="ICON">
<xs:annotation>
<xs:documentation>
This image appears in the Channels Explorer Bar hierarchy and other areas of the Windows namespace, such as when viewing the contents of a folder containing the CDF.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="IMAGE">
<xs:annotation>
<xs:documentation>
This logo image is placed in the desktop Channel Bar to provide a quick launching mechanism for the main channel page.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="IMAGE-WIDE">
<xs:annotation>
<xs:documentation>
Wide logos are displayed in the Channels Explorer Bar to provide a link to the main channel page. When clicked, this image will also expand or contract the channel's hierarchy (if one exists) in the Channels Explorer Bar.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="sScope">
<xs:restriction base="xs:string">
<xs:enumeration value="OFFLINE">
<xs:annotation>
<xs:documentation>
Pages read from local cache should be logged.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="ONLINE">
<xs:annotation>
<xs:documentation>
Pages read from URL browsing should logged.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="ALL">
<xs:annotation>
<xs:documentation>
Default. Both types of page hits should be logged.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="sValue">
<xs:restriction base="xs:string">
<xs:enumeration value="Channel">
<xs:annotation>
<xs:documentation>
Items that appear in the browser channel pane. This is the default behavior when no USAGE element appears under an ITEM.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="DesktopComponent">
<xs:annotation>
<xs:documentation>
Items that are displayed in a frame located on the Active Desktop. Attributes assigned this value can only be used in the context of an Active Desktop item. Channels require a separate CDF file.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="Email">
<xs:annotation>
<xs:documentation>
The parent element is an e-mail that is sent when the channel content is updated (one per CDF).
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="NONE">
<xs:annotation>
<xs:documentation>
If a NONE value is assigned to the only USAGE element in an ITEM, the item will not appear in the Channels Explorer Bar.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="ScreenSaver">
<xs:annotation>
<xs:documentation>
This one item is displayed in the special Internet Explorer screen saver (one per CDF).
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="SmartScreen">
<xs:annotation>
<xs:documentation>
"SmartScreen," a trademark of PointCast Inc., can be used in place of the ScreenSaver value to display the PointCast Network SmartScreen in the Internet Explorer screen saver.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="SoftwareUpdate">
<xs:annotation>
<xs:documentation>
This indicates the CDF file is being used for a Software Update channel, which allows software to be automatically updated over the Web. This value is only valid for the top-level channel.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="date">
<xs:annotation>
<xs:documentation>
A stricter date format than what XML Schema allows; CDF does not allow timezones in dates.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:date">
<xs:pattern value="[0-9]{4}-[01][0-9]-[0-3][0-9]" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="datetime">
<xs:annotation>
<xs:documentation>
A stricter datetime format than what XML Schema allows; CDF does not allow timezones in datetimes.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:date">
<xs:pattern value="[0-9]{4}-[01][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9]" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="offset">
<xs:restriction base="xs:string">
<xs:pattern value="[-+][01][0-9][0-5][0-9]" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="A">
<xs:annotation>
<xs:documentation>
Defines a hypertext link for an element.
</xs:documentation>
</xs:annotation>
<xs:attribute name="HREF" type="xs:anyURI" use="required">
<xs:annotation>
<xs:documentation>
String value specifying the URL associated with the parent element.
CDF supports only HTTP, HTTPS, and FTP protocols. If a different protocol is used, Internet Explorer will fail to navigate to the page without notifying the user.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="ABSTRACT">
<xs:annotation>
<xs:documentation>
Summarizes the associated parent element.
</xs:documentation>
</xs:annotation>
<xs:attribute name="XML-SPACE" type="sWhiteSpace" use="optional" default="DEFAULT">
<xs:annotation>
<xs:documentation>
String value that specifies how white space—such as a tab, space, or blank line—is treated.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="CHANNEL">
<xs:annotation>
<xs:documentation>
Defines a channel or subchannel.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="A" type="A" minOccurs="0" />
<xs:element name="ABSTRACT" type="ABSTRACT" minOccurs="0" />
<xs:element name="CHANNEL" type="CHANNEL" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="ITEM" type="ITEM" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="LOG" type="LOG" minOccurs="0" />
<xs:element name="LOGIN" type="LOGIN" minOccurs="0" />
<xs:element name="LOGO" type="LOGO" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="LOGTARGET" type="LOGTARGET" minOccurs="0" />
<xs:element name="SCHEDULE" type="SCHEDULE" minOccurs="0" />
<xs:element name="TITLE" type="TITLE" minOccurs="0" />
</xs:sequence>
<xs:attribute name="BASE" type="xs:anyURI" use="optional">
<xs:annotation>
<xs:documentation>
Base URL for the channel. This is used to resolve relative URLs specified in ITEM and CHANNEL elements contained within this channel. The BASE attribute applies to all child elements of the current channel or subchannel. This attribute supersedes the BASE value previously defined by a parent CHANNEL element, if any exists. The URL specified must end with a trailing "/", or the last word will be removed.
CDF supports only HTTP, HTTPS, and FTP protocols. If a different protocol is used, Internet Explorer will fail to navigate to the page without notifying the user.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="HREF" type="xs:anyURI" use="optional">
<xs:annotation>
<xs:documentation>
URL associated with the channel. The browser navigates to this location when the user activates the channel. The HREF attribute should be omitted if the CHANNEL element contains an anchor (A) as a child element.
CDF supports only HTTP, HTTPS, and FTP protocols. If a different protocol is used, Internet Explorer will fail to navigate to the page without notifying the user.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LASTMOD" type="datetime" use="optional">
<xs:annotation>
<xs:documentation>
Last date/time in GMT that the page indexed by the HREF attribute was modified. GMT is Greenwich Mean Time, also known as Universal Time Coordinated (UTC). Note that the LASTMOD date/time is not necessarily your local time. This attribute allows the channel client to determine whether the content has changed since the last time it was downloaded. The item is downloaded only if the date associated with the cached item is older than the LASTMOD value in the CDF file.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LEVEL" type="xs:nonNegativeInteger" use="optional" default="3">
<xs:annotation>
<xs:documentation>
Number of levels (or links) deep the client should "site crawl" and precache the HTML content from the URL specified in the HREF attribute. The default is zero, which specifies to only precache the URL of the CHANNEL, along with any images it uses. If the URL contains frames, the client will also retrieve all content inside the frames. By default, the maximum number of levels that can be specified for site crawling is three.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PRECACHE" type="sCache" use="optional">
<xs:annotation>
<xs:documentation>
String that specifies whether content is downloaded.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="SELF" type="xs:anyURI" use="optional">
<xs:annotation>
<xs:documentation>
Indicate the location of the CDF file to use for creating a channel subscription. Note that this attribute is unnecessary and is only supported for backward compatibility.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="EARLIESTTIME">
<xs:annotation>
<xs:documentation>
Specifies the beginning of the valid range of time within which updates to the Channel Definition Format (CDF) can occur.
</xs:documentation>
</xs:annotation>
<xs:attribute name="DAY" type="xs:positiveInteger" use="optional">
<xs:annotation>
<xs:documentation>
Nonzero number specifying the first day within the INTERVALTIME that the schedule can be updated.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="HOUR" type="xs:positiveInteger" use="optional">
<xs:annotation>
<xs:documentation>
Nonzero number specifying the first hour within the INTERVALTIME that the schedule can be updated.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="MIN" type="xs:positiveInteger" use="optional">
<xs:annotation>
<xs:documentation>
Nonzero number specifying the first minute within the INTERVALTIME that the schedule can be updated.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="HTTP-EQUIV">
<xs:annotation>
<xs:documentation>
Supplies information that can also be provided through HTTP response headers.
</xs:documentation>
</xs:annotation>
<xs:attribute name="NAME" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
String value name of the HTTP header parameter sent with the log file, such as "Encoding-Type."
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VALUE" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
String value of the corresponding parameter.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="INTERVALTIME">
<xs:annotation>
<xs:documentation>
Specifies the length of time between SCHEDULE updates.
</xs:documentation>
</xs:annotation>
<xs:attribute name="DAY" type="xs:positiveInteger" use="optional">
<xs:annotation>
<xs:documentation>
Nonzero number of days over which the SCHEDULE will repeat.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="HOUR" type="xs:positiveInteger" use="optional">
<xs:annotation>
<xs:documentation>
Nonzero number of hours over which the SCHEDULE will repeat.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="MIN" type="xs:positiveInteger" use="optional">
<xs:annotation>
<xs:documentation>
Nonzero number of minutes over which the SCHEDULE will repeat.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="ITEM">
<xs:annotation>
<xs:documentation>
Defines an item in a channel.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="A" type="A" minOccurs="0" />
<xs:element name="ABSTRACT" type="ABSTRACT" minOccurs="0" />
<xs:element name="CHANNEL" type="CHANNEL" minOccurs="0" />
<xs:element name="LOG" type="LOG" minOccurs="0" />
<xs:element name="LOGO" type="LOGO" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="TITLE" type="TITLE" minOccurs="0" />
<xs:element name="USAGE" type="USAGE" minOccurs="0" />
</xs:sequence>
<xs:attribute name="HREF" type="shortUri" use="optional">
<xs:annotation>
<xs:documentation>
URL that represents the ITEM. The browser navigates to this location when the user activates the channel. There must be exactly one HREF attribute with the ITEM element. To enable page-hit logging, the URL must contain no more than 255 characters. The HREF attribute should be omitted if the ITEM element contains an anchor (A) as a child element.
CDF supports only HTTP, HTTPS, and FTP protocols. If a different protocol is used, Internet Explorer will fail to navigate to the page without notifying the user.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LASTMOD" type="datetime" use="optional">
<xs:annotation>
<xs:documentation>
Last date/time in GMT that the page indexed by the HREF attribute was modified. GMT is Greenwich Mean Time, also known as Universal Time Coordinated (UTC). Note that the LASTMOD date/time is not necessarily your local time. This allows the channel client to determine whether the content has changed since the last time it was downloaded. The ITEM is downloaded only if the date associated with the cached ITEM is older than the LASTMOD value in the CDF file.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LEVEL" type="xs:nonNegativeInteger" use="optional" default="0">
<xs:annotation>
<xs:documentation>
Number of levels (or links) deep the client should "site crawl" and precache the HTML content from the URL specified in the HREF attribute. The default is zero, which specifies to precache only the URL of the ITEM and the images it references. If the URL contains frames, the client also retrieves all content inside the frames.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PRECACHE" type="sCache" use="optional" default="Yes">
<xs:annotation>
<xs:documentation>
String that specifies whether content is downloaded.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="SHOW" type="sValue" use="optional">
<xs:annotation>
<xs:documentation>
Indicates how the parent element should be used. Deprecated; prefer the USAGE element instead.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="LATESTTIME">
<xs:annotation>
<xs:documentation>
Specifies the latest time during the INTERVALTIME that the schedule will be applied and updated.
</xs:documentation>
</xs:annotation>
<xs:attribute name="DAY" type="xs:positiveInteger" use="optional">
<xs:annotation>
<xs:documentation>
Nonzero number specifying the last day within the INTERVALTIME that the schedule can be updated.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="HOUR" type="xs:positiveInteger" use="optional">
<xs:annotation>
<xs:documentation>
Nonzero number specifying the last hour within the INTERVALTIME that the schedule can be updated.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="MIN" type="xs:positiveInteger" use="optional">
<xs:annotation>
<xs:documentation>
Nonzero number specifying the last minute within the INTERVALTIME that the schedule can be updated.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="LOG">
<xs:annotation>
<xs:documentation>
Specifies that the URL of the parent ITEM element should be recorded in a page-hit log file.
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="xs:string" fixed="document:view" use="required">
<xs:annotation>
<xs:documentation>
String value specifying the event to be logged. Currently, "document:view" is the only value supported by Internet Explorer.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="LOGIN">
<xs:annotation>
<xs:documentation>
Specifies that the channel requires authentication for updates.
</xs:documentation>
</xs:annotation>
</xs:complexType>
<xs:complexType name="LOGO">
<xs:annotation>
<xs:documentation>
Specifies an image used to represent a CHANNEL, ITEM, or SOFTPKG element.
</xs:documentation>
</xs:annotation>
<xs:attribute name="HREF" type="xs:anyURI" use="required">
<xs:annotation>
<xs:documentation>
URL associated with the channel logo or icon image.
CDF supports only HTTP, HTTPS, and FTP protocols. If a different protocol is used, Internet Explorer will fail to load the logo without notifying the user.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="STYLE" type="sStyle" use="required">
<xs:annotation>
<xs:documentation>
String value indicating the context in which a logo will be used
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="LOGTARGET">
<xs:annotation>
<xs:documentation>
Specifies where to send a Channel Definition Format (CDF) client page-hit log file.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="HTTP-EQUIV" type="HTTP-EQUIV" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="PURGETIME" type="PURGETIME" minOccurs="0" />
</xs:sequence>
<xs:attribute name="HREF" type="xs:anyURI" use="required">
<xs:annotation>
<xs:documentation>
URL the log will be sent to.
CDF supports only HTTP, HTTPS, and FTP protocols. If a different protocol is used, Internet Explorer will fail to load the logo without notifying the user.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="METHOD" type="xs:string" fixed="POST" use="required">
<xs:annotation>
<xs:documentation>
String value that specifies the HTTP method to be used for sending the data.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="SCOPE" type="sScope" use="optional" default="ALL">
<xs:annotation>
<xs:documentation>
String value that specifies which type of page hits should be logged.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="SCHEDULE">
<xs:annotation>
<xs:documentation>
Defines the schedule used for channel updating.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="EARLIESTTIME" type="EARLIESTTIME" minOccurs="0" />
<xs:element name="INTERVALTIME" type="INTERVALTIME" minOccurs="0" />
<xs:element name="LATESTTIME" type="LATESTTIME" minOccurs="0" />
</xs:sequence>
<xs:attribute name="STARTDATE" type="xs:date" use="optional">
<xs:annotation>
<xs:documentation>
Numeric value specifying the day on which the schedule will start to apply. If this attribute is omitted, the schedule will start to apply on the current day.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="STOPDATE" type="xs:date" use="optional">
<xs:annotation>
<xs:documentation>
Numeric value specifying the day on which the schedule stops updating (expires). If this attribute is omitted, the schedule will not expire.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="TIMEZONE" type="offset" use="optional">
<xs:annotation>
<xs:documentation>
Difference between local time and Universal Time Coordinated (UTC). This allows channel publishers to specify an absolute time for an update schedule. The offset specified for this attribute adjusts the EARLIESTTIME and LATESTTIME child elements accordingly.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="PURGETIME">
<xs:annotation>
<xs:documentation>
Specifies the maximum age of valid page hits when the log file is being uploaded.
</xs:documentation>
</xs:annotation>
<xs:attribute name="HOUR" type="xs:positiveInteger" use="required">
<xs:annotation>
<xs:documentation>
Number of hours for which the logging information is considered valid.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="TITLE">
<xs:annotation>
<xs:documentation>
Specifies a text string representing the title of the CHANNEL or ITEM element.
</xs:documentation>
</xs:annotation>
<xs:attribute name="XML-SPACE" type="sWhiteSpace" use="optional" default="DEFAULT">
<xs:annotation>
<xs:documentation>
String value that specifies how white space—such as a tab, space, or blank line—is treated.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="USAGE">
<xs:annotation>
<xs:documentation>
Indicates how the parent element should be used.
</xs:documentation>
</xs:annotation>
<xs:attribute name="VALUE" type="sValue" use="required">
<xs:annotation>
<xs:documentation>
String value that specifies how the parent element will be used.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:element name="CHANNEL" type="CHANNEL" />
</xs:schema>

76
content/cdf.md Normal file
View File

@ -0,0 +1,76 @@
---
title: Channel Definition Format
---
The Channel Definition Format was a Microsoft file format for syndication
based on XML. It was designed for its *Active Channels* technology and got
extended for *Active Desktop* integration or for [OSD][osd].
## Specification (or lack thereof)
CDF does not have a standardized specification: [a note][w3c] was sent to the
W3C in 1997 with a very early draft of the format, with the intention of later
making it into a standard, but there were no further updates.
The [Microsoft docs][docs-970314] of that time are the same as this draft.
The [latest documentation][docs], from 2002, describes a format that varies a
lot from that W3C note.
There is no official <abbr title="Document Type Definition">DTD</abbr> or
<abbr title="XML Schema Definition">XSD</abbr>. Someone wrote a [DTD][dtd]
with support for the *Active Desktop* and [OSD][osd] extensions.
I wrote my own XSD files to help me use this format in [ITSB][itsb]:
* [W3C draft](./xsd/cdf-w3c.xsd)
* [CDF 0.4](./xsd/cdf.xsd) (latest)
## Support
CDF was supported by Internet Explorer 4 to 7, and no other software is known
to have supported this format.
The format was created and implemented in IE4 while XML was still a draft,
causing some valid XML documents to not be understood properly by IE4, and all
the sample CDF files provided with IE4 to make XML parsers scream.
Support was dropped in 2009 with the release of IE8 as it lost against RSS,
and as Microsoft's dedicated RSS team implemented RSS support in IE7.
## Notable features
* Scheduling options to avoid useless synchronizations
* Nested channels (merge multiple feeds into one)
* Custom icons in the IE favorites sidebar
* Customization of IE's crawling behavior when making a website available
offline, using `<LINK REL="OFFLINE" HREF="...cdf">`
* *Active Desktop* integration to display articles on the desktop
* Integration with [Open Software Description][osd] to send software updates
## Usage
I use this format in [ITSB][itsb] to provide separate channels generated from
each RSS feed, or channels that group channels together. This second form
usually causes Internet Explorer to lag heavily due to the few megabytes of
items it is downloading in a single file. All of those CDF files have been
tested and confirmed to be working with Internet Explorer 6 SP1 on Windows
2000 SP4.
## Links
* [March 10th 1997 specification][docs-970314]
* [March 21st 1997 specification][docs-970321]
* [Latest documentation][docs] (CDF 0.4)
* [Unofficial DTD][dtd]
* [W3C draft][w3c]
* Special Edition Using HTML 4, [Building Channels with CDF][building],
Jerry Honeycutt
[building]: https://www.rigacci.org/docs/biblio/online/html4/ch30/ch30.htm
[docs]: https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa768139(v=vs.85)
[docs-970314]: http://xml.coverpages.org/cdf970314.html
[docs-970321]: http://xml.coverpages.org/cdf970321.html
[dtd]: http://www2.cmp.uea.ac.uk/~jrwg/JAXP/examples/cdf/cdf.dtd
[itsb]: https://tilde.town/~lucidiot/itsb/
[osd]: ./osd.html
[w3c]: https://www.w3.org/TR/NOTE-CDFsubmit.html