Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Documenting .isXHTML generation better.

  • Loading branch information...
commit 72adfa10f78bdcdc85c97bbb4fc1bf03ec519270 1 parent 994c91e
@mikeabdullah mikeabdullah authored
Showing with 13 additions and 5 deletions.
  1. +7 −3 KSHTMLWriter.h
  2. +6 −2 KSHTMLWriter.m
View
10 KSHTMLWriter.h
@@ -17,14 +17,18 @@
}
#pragma mark Creating an HTML Writer
-// For if you desperately need to set a doctype before calling -startDocument:isXHTML:
+// For if you desperately need to set a doctype before calling -startDocument:isXHTML: (perhaps because you're not going to call it!)
- (id)initWithOutputWriter:(id <KSWriter>)stream isXHTML:(BOOL)isXHTML;
+#pragma mark XHTML
+// Whether empty elements should be written as <FOO> or <FOO />
+// Default is YES. There's no setter method; instead, specify with -startDocument:isXHTML: or when initializing.
+@property(nonatomic, readonly, getter=isXHTML) BOOL XHTML;
+
+
#pragma mark Document
-// It doesn't make sense to change from isXHTML mid-write, so is only supported when initialising or when starting document.
- (void)startDocument:(NSString *)DTD isXHTML:(BOOL)isXHTML;
-@property(nonatomic, readonly, getter=isXHTML) BOOL XHTML;
#pragma mark HTML Fragments
View
8 KSHTMLWriter.m
@@ -11,6 +11,8 @@
@implementation KSHTMLWriter
+#pragma mark Creating an HTML Writer
+
- (id)initWithOutputWriter:(id <KSWriter>)stream;
{
[super initWithOutputWriter:stream];
@@ -28,6 +30,10 @@ - (id)initWithOutputWriter:(id <KSWriter>)stream isXHTML:(BOOL)isXHTML;
return self;
}
+#pragma mark XHTML
+
+@synthesize XHTML = _isXHTML;
+
#pragma mark Document
- (void)startDocument:(NSString *)DTD isXHTML:(BOOL)isXHTML;
@@ -36,8 +42,6 @@ - (void)startDocument:(NSString *)DTD isXHTML:(BOOL)isXHTML;
[self startDocument:DTD];
}
-@synthesize XHTML = _isXHTML;
-
#pragma mark HTML Fragments
- (void)writeHTMLString:(NSString *)html;
Please sign in to comment.
Something went wrong with that request. Please try again.