43
43
@constant NSXMLDocumentIncludeContentTypeDeclaration Include a content type declaration for HTML or XHTML
44
44
*/
45
45
46
- #if arch(x86_64) || arch(arm64)
47
- public typealias NSXMLNodeOptionRawType = Int
48
- #else
49
- public typealias NSXMLNodeOptionRawType = Int64
50
- #endif
51
-
52
- public var NSXMLNodeOptionsNone : NSXMLNodeOptionRawType { return 0 }
46
+ public var NSXMLNodeOptionsNone : Int { return 0 }
53
47
54
48
// Init
55
- public var NSXMLNodeIsCDATA : NSXMLNodeOptionRawType { return 1 << 0 }
56
- public var NSXMLNodeExpandEmptyElement : NSXMLNodeOptionRawType { return 1 << 1 } // <a></a>
57
- public var NSXMLNodeCompactEmptyElement : NSXMLNodeOptionRawType { return 1 << 2 } // <a/>
58
- public var NSXMLNodeUseSingleQuotes : NSXMLNodeOptionRawType { return 1 << 3 }
59
- public var NSXMLNodeUseDoubleQuotes : NSXMLNodeOptionRawType { return 1 << 4 }
60
- public var NSXMLNodeNeverEscapeContents : NSXMLNodeOptionRawType { return 1 << 5 }
49
+ public var NSXMLNodeIsCDATA : Int { return 1 << 0 }
50
+ public var NSXMLNodeExpandEmptyElement : Int { return 1 << 1 } // <a></a>
51
+ public var NSXMLNodeCompactEmptyElement : Int { return 1 << 2 } // <a/>
52
+ public var NSXMLNodeUseSingleQuotes : Int { return 1 << 3 }
53
+ public var NSXMLNodeUseDoubleQuotes : Int { return 1 << 4 }
54
+ public var NSXMLNodeNeverEscapeContents : Int { return 1 << 5 }
61
55
62
56
// Tidy
63
- public var NSXMLDocumentTidyHTML : NSXMLNodeOptionRawType { return 1 << 9 }
64
- public var NSXMLDocumentTidyXML : NSXMLNodeOptionRawType { return 1 << 10 }
57
+ public var NSXMLDocumentTidyHTML : Int { return 1 << 9 }
58
+ public var NSXMLDocumentTidyXML : Int { return 1 << 10 }
65
59
66
60
// Validate
67
- public var NSXMLDocumentValidate : NSXMLNodeOptionRawType { return 1 << 13 }
61
+ public var NSXMLDocumentValidate : Int { return 1 << 13 }
68
62
69
63
// External Entity Loading
70
64
// Choose only zero or one option. Choosing none results in system-default behavior.
71
- public var NSXMLNodeLoadExternalEntitiesAlways : NSXMLNodeOptionRawType { return 1 << 14 }
72
- public var NSXMLNodeLoadExternalEntitiesSameOriginOnly : NSXMLNodeOptionRawType { return 1 << 15 }
73
- public var NSXMLNodeLoadExternalEntitiesNever : NSXMLNodeOptionRawType { return 1 << 19 }
65
+ public var NSXMLNodeLoadExternalEntitiesAlways : Int { return 1 << 14 }
66
+ public var NSXMLNodeLoadExternalEntitiesSameOriginOnly : Int { return 1 << 15 }
67
+ public var NSXMLNodeLoadExternalEntitiesNever : Int { return 1 << 19 }
74
68
75
69
// Parse
76
- public var NSXMLDocumentXInclude : NSXMLNodeOptionRawType { return 1 << 16 }
70
+ public var NSXMLDocumentXInclude : Int { return 1 << 16 }
77
71
78
72
// Output
79
- public var NSXMLNodePrettyPrint : NSXMLNodeOptionRawType { return 1 << 17 }
80
- public var NSXMLDocumentIncludeContentTypeDeclaration : NSXMLNodeOptionRawType { return 1 << 18 }
73
+ public var NSXMLNodePrettyPrint : Int { return 1 << 17 }
74
+ public var NSXMLDocumentIncludeContentTypeDeclaration : Int { return 1 << 18 }
81
75
82
76
// Fidelity
83
- public var NSXMLNodePreserveNamespaceOrder : NSXMLNodeOptionRawType { return 1 << 20 }
84
- public var NSXMLNodePreserveAttributeOrder : NSXMLNodeOptionRawType { return 1 << 21 }
85
- public var NSXMLNodePreserveEntities : NSXMLNodeOptionRawType { return 1 << 22 }
86
- public var NSXMLNodePreservePrefixes : NSXMLNodeOptionRawType { return 1 << 23 }
87
- public var NSXMLNodePreserveCDATA : NSXMLNodeOptionRawType { return 1 << 24 }
88
- public var NSXMLNodePreserveWhitespace : NSXMLNodeOptionRawType { return 1 << 25 }
89
- public var NSXMLNodePreserveDTD : NSXMLNodeOptionRawType { return 1 << 26 }
90
- public var NSXMLNodePreserveCharacterReferences : NSXMLNodeOptionRawType { return 1 << 27 }
91
- public var NSXMLNodePromoteSignificantWhitespace : NSXMLNodeOptionRawType { return 1 << 28 }
92
- public var NSXMLNodePreserveEmptyElements : NSXMLNodeOptionRawType { return NSXMLNodeExpandEmptyElement | NSXMLNodeCompactEmptyElement }
93
- public var NSXMLNodePreserveQuotes : NSXMLNodeOptionRawType { return NSXMLNodeUseSingleQuotes | NSXMLNodeUseDoubleQuotes }
94
- public var NSXMLNodePreserveAll : NSXMLNodeOptionRawType { return
77
+ public var NSXMLNodePreserveNamespaceOrder : Int { return 1 << 20 }
78
+ public var NSXMLNodePreserveAttributeOrder : Int { return 1 << 21 }
79
+ public var NSXMLNodePreserveEntities : Int { return 1 << 22 }
80
+ public var NSXMLNodePreservePrefixes : Int { return 1 << 23 }
81
+ public var NSXMLNodePreserveCDATA : Int { return 1 << 24 }
82
+ public var NSXMLNodePreserveWhitespace : Int { return 1 << 25 }
83
+ public var NSXMLNodePreserveDTD : Int { return 1 << 26 }
84
+ public var NSXMLNodePreserveCharacterReferences : Int { return 1 << 27 }
85
+ public var NSXMLNodePromoteSignificantWhitespace : Int { return 1 << 28 }
86
+ public var NSXMLNodePreserveEmptyElements : Int { return NSXMLNodeExpandEmptyElement | NSXMLNodeCompactEmptyElement }
87
+ public var NSXMLNodePreserveQuotes : Int { return NSXMLNodeUseSingleQuotes | NSXMLNodeUseDoubleQuotes }
88
+ public var NSXMLNodePreserveAll : Int { return
95
89
NSXMLNodePreserveNamespaceOrder |
96
90
NSXMLNodePreserveAttributeOrder |
97
91
NSXMLNodePreserveEntities |
@@ -102,6 +96,6 @@ public var NSXMLNodePreserveAll: NSXMLNodeOptionRawType { return
102
96
NSXMLNodePreserveWhitespace |
103
97
NSXMLNodePreserveDTD |
104
98
NSXMLNodePreserveCharacterReferences |
105
- 0xFFF00000 // high 12 bits
99
+ Int ( bitPattern : 0xFFF00000 ) // high 12 bits
106
100
}
107
101
0 commit comments