| OLD | NEW |
| (Empty) | |
| 1 <!-- |
| 2 Copyright 2016 The Chromium Authors. All rights reserved. |
| 3 Use of this source code is governed by a BSD-style license that can be |
| 4 found in the LICENSE file. |
| 5 --> |
| 6 <!-- |
| 7 |
| 8 Welcome to a document type declaration (DTD). |
| 9 This is a document that makes sure XML files are correctly formed. |
| 10 |
| 11 Below, |request| is implied to be the root element of the XML document, whose |
| 12 children are |os| and |app|. |
| 13 --> |
| 14 <!ELEMENT request (os, app)> |
| 15 <!-- |
| 16 |
| 17 Below, this indicates that |protocol| is a required attribute of the |
| 18 |request| element; by indicating `NMTOKEN`, we indicate that this attribute |
| 19 must have a value associated with it that does not contain whitespace. `CDATA` |
| 20 would be the more commonly used keyword for content with whitespace. |
| 21 --> |
| 22 <!ATTLIST request protocol NMTOKEN #REQUIRED> |
| 23 <!-- |
| 24 |
| 25 The |os| element should not have any children and cannot have any content |
| 26 within the tag. (<os/> and <os></os> are allowed, but <os>stuff here!</os> is |
| 27 not a valid element.) |
| 28 --> |
| 29 <!ELEMENT os EMPTY> |
| 30 <!-- |
| 31 |
| 32 This |platform| attribute is a required attribute of |os|, and its value must |
| 33 be "mac". |
| 34 --> |
| 35 <!ATTLIST os platform (mac) #REQUIRED> |
| 36 <!-- |
| 37 |
| 38 The |version|, |arch|, and |sp| attributes are optional attributes of |os|. If |
| 39 a request's XML body has the |sp|, it may not need the version or arch; if the |
| 40 |sp| is not included but |version| and |arch| are specified, the XML body is |
| 41 still valid. Unfortunately there is relatively less logic available for |
| 42 attributes, so I currently cannot reject the XML document if there is only |
| 43 either |arch| or |version|. |
| 44 --> |
| 45 <!ATTLIST os version NMTOKEN #IMPLIED> |
| 46 <!ATTLIST os arch NMTOKEN #IMPLIED> |
| 47 <!ATTLIST os sp NMTOKEN #IMPLIED> |
| 48 <!-- |
| 49 |
| 50 |app| has only one child, |updatecheck|. |
| 51 --> |
| 52 <!ELEMENT app (updatecheck)> |
| 53 <!-- |
| 54 |
| 55 The |appid| attribute of the |app| element must have "com.google.Chrome" as |
| 56 its value. |
| 57 --> |
| 58 <!ATTLIST app appid (com.google.Chrome) #REQUIRED> |
| 59 <!-- |
| 60 |
| 61 The following two attributes are required; their values must not contain |
| 62 whitespace. |
| 63 --> |
| 64 <!ATTLIST app version NMTOKEN #REQUIRED> |
| 65 <!ATTLIST app lang NMTOKEN #REQUIRED> |
| 66 <!-- |
| 67 |
| 68 |updatecheck| must be an empty element. |
| 69 --> |
| 70 <!ELEMENT updatecheck EMPTY> |
| OLD | NEW |