Chromium Code Reviews| Index: chrome/installer/mac/app/testing/requestCheck.dtd |
| diff --git a/chrome/installer/mac/app/testing/requestCheck.dtd b/chrome/installer/mac/app/testing/requestCheck.dtd |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5eff1daa5322d7aebfc88376ff68534040fb6fcb |
| --- /dev/null |
| +++ b/chrome/installer/mac/app/testing/requestCheck.dtd |
| @@ -0,0 +1,65 @@ |
| +<!-- |
| + |
| + Welcome to a document type declaration (DTD). |
| + This is a document that makes sure XML files are correctly formed. |
| + |
| + Below, |request| is implied to be the root element of the XML document, whose |
| + children are |os| and |app|. |
| +--> |
| +<!ELEMENT request (os, app)> |
| +<!-- |
| + |
| + Below, this indicates that |protocol| is a required attribute of the |
|
Elly Fong-Jones
2016/07/22 17:39:08
Nice documentation :D
|
| + |request| element; by indicating `NMTOKEN`, we indicate that this attribute |
| + must have a value associated with it that does not contain whitespace. `CDATA` |
| + would be the more commonly used keyword for content with whitespace. |
| +--> |
| +<!ATTLIST request protocol NMTOKEN #REQUIRED> |
| +<!-- |
| + |
| + The |os| element should not have any children and cannot have any content |
| + within the tag. (<os/> and <os></os> are allowed, but <os>stuff here!</os> is |
| + not a valid element.) |
| +--> |
| +<!ELEMENT os EMPTY> |
| +<!-- |
| + |
| + This |platform| attribute is a required attribute of |os|, and its value must |
| + be "mac". |
| +--> |
| +<!ATTLIST os platform (mac) #REQUIRED> |
| +<!-- |
| + |
| + The |version|, |arch|, and |sp| attributes are optional attributes of |os|. If |
| + a request's XML body has the |sp|, it may not need the version or arch; if the |
| + |sp| is not included but |version| and |arch| are specified, the XML body is |
| + still valid. Unfortunately there is relatively less logic available for |
| + attributes, so I currently cannot reject the XML document if there is only |
| + either |arch| or |version|. |
| +--> |
| +<!ATTLIST os version NMTOKEN #IMPLIED> |
| +<!ATTLIST os arch NMTOKEN #IMPLIED> |
| +<!ATTLIST os sp NMTOKEN #IMPLIED> |
| +<!-- |
| + |
| + |app| has only one child, |updatecheck|. |
| +--> |
| +<!ELEMENT app (updatecheck)> |
| +<!-- |
| + |
| + The |appid| attribute of the |app| element must have "com.google.Chrome" as |
| + its value. |
| +--> |
| +<!ATTLIST app appid (com.google.Chrome) #REQUIRED> |
| +<!-- |
| + |
| + The following two attributes are required; their values must not contain |
| + whitespace. |
| +--> |
| +<!ATTLIST app version NMTOKEN #REQUIRED> |
| +<!ATTLIST app lang NMTOKEN #REQUIRED> |
| +<!-- |
| + |
| + |updatecheck| must be an empty element. |
| +--> |
| +<!ELEMENT updatecheck EMPTY> |