ETTextHTML documentation

Authors

Generated by builder

Contents -

  1. Software documentation for the ETReferenceBuilder class
  2. Software documentation for the ETXHTMLAutolinkingHeadingBuilder class
  3. Software documentation for the ETXHTMLFootnoteBuilder class
  4. Software documentation for the ETXHTMLHeadingBuilder class
  5. Software documentation for the ETXHTMLWriter class
  6. Software documentation for the ETXHTMLWriterDelegate protocol

Software documentation for the ETReferenceBuilder class

ETReferenceBuilder : NSObject

Declared in:
ETTextHTML.h
Conforms to:
ETTextVisitor

Class that resolves references in an EtoileText tree.


Instance Variables

Method summary

finishVisiting 

- (void) finishVisiting;
Description forthcoming.

linkTitleForTarget: inChapter: 

- (NSString*) linkTitleForTarget: (NSString*)linkTarget inChapter: (NSString*)currentChapter;
Description forthcoming.

writeIndexWithXMLWriter: 

- (void) writeIndexWithXMLWriter: (ETXMLWriter*)writer;
Description forthcoming.

writeTableOfContentsWithXMLWriter: 

- (void) writeTableOfContentsWithXMLWriter: (ETXMLWriter*)writer;
Description forthcoming.



Instance Variables for ETReferenceBuilder Class

chapter

@protected NSString* chapter;
Description forthcoming.

crossReferences

@protected NSMutableDictionary* crossReferences;
Description forthcoming.

headingCounter

@protected int headingCounter;
Description forthcoming.

headings

@protected NSMutableArray* headings;
Description forthcoming.

indexEntries

@protected NSMutableDictionary* indexEntries;

Index entries.


linkNames

@protected NSMutableDictionary* linkNames;
Description forthcoming.

linkTargets

@protected NSMutableDictionary* linkTargets;

Link targets.


referenceNodes

@protected NSMutableArray* referenceNodes;

Text nodes referring to other elements.


sectionCounter

@protected int sectionCounter;
Description forthcoming.

sectionCounterDepth

@protected int sectionCounterDepth;
Description forthcoming.




Software documentation for the ETXHTMLAutolinkingHeadingBuilder class

ETXHTMLAutolinkingHeadingBuilder : ETXHTMLHeadingBuilder

Declared in:
ETTextHTML.h

Version of the heading builder that generates a link target for every heading. This is used when generating a table of contents.


Instance Variables



Instance Variables for ETXHTMLAutolinkingHeadingBuilder Class

headingNumber

@protected int headingNumber;

The number to use for the next heading.





Software documentation for the ETXHTMLFootnoteBuilder class

ETXHTMLFootnoteBuilder : NSObject

Declared in:
ETTextHTML.h
Conforms to:
ETXHTMLWriterDelegate

Class used for generating footnotes in XHTML output.


Instance Variables

Method summary

writeCollectedFootnotesForXHTMLWriter: 

- (void) writeCollectedFootnotesForXHTMLWriter: (ETXHTMLWriter*)aWriter;

Writes the collected footnote bodies to the provided writer.




Instance Variables for ETXHTMLFootnoteBuilder Class

footnotes

@protected NSMutableArray* footnotes;

Array of footnotes collected so far.





Software documentation for the ETXHTMLHeadingBuilder class

ETXHTMLHeadingBuilder : NSObject

Declared in:
ETTextHTML.h
Conforms to:
ETXHTMLWriterDelegate

Class used for outputting headings as XHTML. Maps EtoileText heading levels to h1, h2, and so on.

Software documentation for the ETXHTMLWriter class

ETXHTMLWriter : NSObject

Declared in:
ETTextHTML.h
Conforms to:
ETTextVisitor

ETXHTMLWriter is a visitor class that walks an EtoileText tree and generates an XHTML document from it.


Instance Variables

Method summary

endDocument 

- (NSString*) endDocument;

Ends the document and returns a string containing the XHTML rendition of it.


generateHTMLForDocument: 

- (NSString*) generateHTMLForDocument: (id<ETText>)aDocument;
Description forthcoming.

setAttributes: forTextType: 

- (void) setAttributes: (NSDictionary*)attributes forTextType: (NSString*)aType;

Sets the default attributes to use for a specified EtoileText type. If no attributes are specified for a tag type, the class attribute is set to the EtoileText type.


setDelegate: forTextType: 

- (void) setDelegate: (id<ETXHTMLWriterDelegate>)aDelegate forTextType: (NSString*)aType;

Specifies a delegate to use for a specified EtoileText type.


setTagName: forTextType: 

- (void) setTagName: (NSString*)aString forTextType: (NSString*)aType;

Sets the HTML tag name to use for a specified EtoileText type. Ignored if a delegate is set for this type. If no tag name is specified for a type, span is used.




Instance Variables for ETXHTMLWriter Class

chapterTitle

@protected NSString* chapterTitle;

Title of the current chapter.


customHandlers

@protected NSMutableDictionary* customHandlers;

Mapping from EtoileText types to delegates for custom handling.


defaultAttributes

@protected NSMutableDictionary* defaultAttributes;

Mapping from EtoileText type to tag attributes.


footnotes

@protected ETXHTMLFootnoteBuilder* footnotes;

Footnote builder.


isWritingFootnotes

@protected BOOL isWritingFootnotes;

Flag indicating that the writer is current outputting footnotes.


referenceBuilder

@protected ETReferenceBuilder* referenceBuilder;

Cross-reference builder.


types

@protected NSMutableDictionary* types;

Mapping from EtoileText types to XHTML tag names. Used for one-to-one mappings. More complex mappings require a delegate.





Software documentation for the ETXHTMLWriterDelegate protocol

ETXHTMLWriterDelegate

Declared in:
ETTextHTML.h

Protocol used for element handlers when writing XHTML. This is similar to the visitor protocol, but takes an ETXHTMLWriter as the first argument.

Method summary

writer: endTextNode: 

- (void) writer: (ETXHTMLWriter*)aWriter endTextNode: (id<ETText>)aNode;

Method called after visiting this node and all of its children.


writer: startTextNode: 

- (void) writer: (ETXHTMLWriter*)aWriter startTextNode: (id<ETText>)aNode;

Method called when entering a node for which this delegate is registered.


writer: visitTextNode: 

- (void) writer: (ETXHTMLWriter*)aWriter visitTextNode: (id<ETText>)aNode;

Method called when traversing a leaf node for which this delegate is registered.