forked from nolanw/HTMLReader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHTMLDocumentType.h
More file actions
36 lines (25 loc) · 1.29 KB
/
HTMLDocumentType.h
File metadata and controls
36 lines (25 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// HTMLDocumentType.h
//
// Public domain. https://github.com/nolanw/HTMLReader
#import <HTMLReader/HTMLNode.h>
NS_ASSUME_NONNULL_BEGIN
/**
An HTMLDocumentType represents an archaic description of the standards an HTML document is meant to adhere to.
The only valid document type is `<!DOCTYPE html>`.
For more information, see http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#the-doctype
*/
@interface HTMLDocumentType : HTMLNode
/**
Given: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|____| |_________________________| |_____________________________________|
We have: name publicIdentifier systemIdentifier
*/
- (instancetype)initWithName:(NSString *)name publicIdentifier:(NSString * __nullable)publicIdentifier systemIdentifier:(NSString * __nullable)systemIdentifier NS_DESIGNATED_INITIALIZER;
/// That first part of the DOCTYPE.
@property (readonly, copy, nonatomic) NSString *name;
/// That second part of the DOCTYPE.
@property (readonly, copy, nonatomic) NSString * __nullable publicIdentifier;
/// That third part of the DOCTYPE.
@property (readonly, copy, nonatomic) NSString * __nullable systemIdentifier;
@end
NS_ASSUME_NONNULL_END