Node Director
|
Parses phtml documents, adjusts their title levels and adds anchors. More...
Public Member Functions | |
DocPHTML () throws DirectorException | |
void | parse (File file) throws DirectorException |
void | parse (String xml) throws DirectorException |
String | text () |
returns the resulting document. | |
Vector | anchors () |
returns a Vector of anchor names in the parsed text. | |
Vector | headings () |
returns a Vector of headings. | |
Vector | headingLevels () |
returns a Vector of headingLevels (Integer objects). | |
void | startDocument () |
void | startElement (String uri, String name, String qName, Attributes atts) |
void | endElement (String uri, String name, String qName) |
void | characters (char ch[], int start, int length) |
void | fatalError (SAXParseException exception) |
String | anchorPrefix () |
Accessor for attribute anchorPrefix. | |
String | anchorPrefix (String anchorPrefix) |
Mutator for attribute anchorPrefix. | |
int | headingLevel () |
Accessor for attribute headingLevel. | |
int | headingLevel (int headingLevel) |
Mutator for attribute headingLevel. | |
Vector | subheadings () |
returns a Vector of subheadings. | |
Vector | references () |
returns a Vector of references (href) that were found in the parsed document. | |
Hashtable | refReplace () |
Accessor for attribute refReplace. | |
Hashtable | refReplace (Hashtable refReplace) |
Mutator for attribute refReplace. | |
void | injectInline () throws DirectorException |
Public Member Functions inherited from sfi.director.application.autodoc.DocXHTML | |
XMLReader | getXMLReader () throws DirectorException |
Try to find an appropriate XMLReader. | |
void | endDocument () throws SAXException |
boolean | isHeading (String name) |
check if an element with the given name is actually a HTML heading. | |
void | endPrefixMapping (java.lang.String prefix) |
void | ignorableWhitespace (char[] ch, int start, int length) |
void | processingInstruction (java.lang.String target, java.lang.String data) |
void | setDocumentLocator (Locator locator) |
void | skippedEntity (java.lang.String name) |
void | startPrefixMapping (java.lang.String prefix, java.lang.String uri) |
void | warning (SAXParseException exception) |
void | error (SAXParseException exception) |
Protected Member Functions | |
int | adjustedLevel (String name) |
Protected Attributes | |
XMLReader | reader |
XmlCreator | text |
Vector | anchors = new Vector() |
Vector | headings = new Vector() |
Vector | headingLevels = new Vector() |
Vector | subheadings = new Vector() |
Hashtable | referencesSeen = new Hashtable() |
Vector | references = new Vector() |
boolean | inInline = false |
int | errorLine = 0 |
int | errorColumn = 0 |
int | topHeadNode = 6 |
String | anchorPrefix = "" |
The string that is prepended to every anchor inserted for title elements. | |
int | headingLevel = 0 |
If set, the heading tags are adjusted, so that the top level heading of the parsed document is below the headingLevel. | |
Hashtable | refReplace = null |
replace hrefs by those |
Additional Inherited Members | |
Static Public Attributes inherited from sfi.director.application.autodoc.DocXHTML | |
final static String | XMLHeader = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE spec [ <!ENTITY nbsp \" \"> <!ENTITY deg \"°\"> <!ENTITY copy \"©\"> ] ><document>\n" |
The XML header to be used with an arbitrary, headerless xhtml fragment. | |
final static String | XMLFooter = "</document>" |
The XML footer to be used with an arbitrary, headerless xhtml fragment. |
Parses phtml documents, adjusts their title levels and adds anchors.
sfi.director.application.autodoc.DocPHTML.DocPHTML | ( | ) | throws DirectorException |
|
protected |
String sfi.director.application.autodoc.DocPHTML.anchorPrefix | ( | ) |
Accessor for attribute anchorPrefix.
The string that is prepended to every anchor inserted for title elements. If not set, no prefix is used.
Referenced by sfi.director.application.autodoc.DocPHTML.anchorPrefix(), and sfi.director.application.autodoc.DocPHTML.startElement().
String sfi.director.application.autodoc.DocPHTML.anchorPrefix | ( | String | anchorPrefix | ) |
Mutator for attribute anchorPrefix.
The string that is prepended to every anchor inserted for title elements. If not set, no prefix is used.
References sfi.director.application.autodoc.DocPHTML.anchorPrefix().
Vector sfi.director.application.autodoc.DocPHTML.anchors | ( | ) |
returns a Vector of anchor names in the parsed text.
Each anchor name corresponds with an entry in headings().
Referenced by sfi.director.application.autodoc.DocPHTML.startDocument(), and sfi.director.application.autodoc.DocPHTML.startElement().
void sfi.director.application.autodoc.DocPHTML.characters | ( | char | ch[], |
int | start, | ||
int | length | ||
) |
Reimplemented from sfi.director.application.autodoc.DocXHTML.
References sfi.director.application.autodoc.DocPHTML.inInline, and sfi.director.application.autodoc.DocPHTML.text().
void sfi.director.application.autodoc.DocPHTML.endElement | ( | String | uri, |
String | name, | ||
String | qName | ||
) |
Reimplemented from sfi.director.application.autodoc.DocXHTML.
References sfi.director.application.autodoc.DocPHTML.adjustedLevel(), sfi.director.application.autodoc.DocPHTML.headingLevel(), sfi.director.application.autodoc.DocPHTML.headings(), sfi.director.application.autodoc.DocPHTML.inInline, sfi.director.application.autodoc.DocXHTML.isHeading(), and sfi.director.application.autodoc.DocPHTML.text().
void sfi.director.application.autodoc.DocPHTML.fatalError | ( | SAXParseException | exception | ) |
Reimplemented from sfi.director.application.autodoc.DocXHTML.
References sfi.director.application.autodoc.DocPHTML.errorColumn, and sfi.director.application.autodoc.DocPHTML.errorLine.
int sfi.director.application.autodoc.DocPHTML.headingLevel | ( | ) |
Accessor for attribute headingLevel.
If set, the heading tags are adjusted, so that the top level heading of the parsed document is below the headingLevel.
Referenced by sfi.director.application.autodoc.DocPHTML.adjustedLevel(), sfi.director.application.autodoc.DocPHTML.endElement(), sfi.director.application.autodoc.DocPHTML.headingLevel(), and sfi.director.application.autodoc.DocPHTML.startElement().
int sfi.director.application.autodoc.DocPHTML.headingLevel | ( | int | headingLevel | ) |
Mutator for attribute headingLevel.
If set, the heading tags are adjusted, so that the top level heading of the parsed document is below the headingLevel.
References sfi.director.application.autodoc.DocPHTML.headingLevel().
Vector sfi.director.application.autodoc.DocPHTML.headingLevels | ( | ) |
returns a Vector of headingLevels (Integer objects).
Each entry corresponds with an entry in anchors() / headings()
Referenced by sfi.director.application.autodoc.DocPHTML.startDocument(), and sfi.director.application.autodoc.DocPHTML.startElement().
Vector sfi.director.application.autodoc.DocPHTML.headings | ( | ) |
returns a Vector of headings.
Each heading corresponds with an entry in anchors().
Referenced by sfi.director.application.autodoc.DocPHTML.endElement(), and sfi.director.application.autodoc.DocPHTML.startDocument().
void sfi.director.application.autodoc.DocPHTML.injectInline | ( | ) | throws DirectorException |
void sfi.director.application.autodoc.DocPHTML.parse | ( | File | file | ) | throws DirectorException |
void sfi.director.application.autodoc.DocPHTML.parse | ( | String | xml | ) | throws DirectorException |
References sfi.director.application.autodoc.DocPHTML.errorColumn, sfi.director.application.autodoc.DocPHTML.errorLine, sfi.director.application.autodoc.DocPHTML.reader, sfi.director.application.autodoc.DocPHTML.text(), sfi.director.application.autodoc.DocXHTML.XMLFooter, and sfi.director.application.autodoc.DocXHTML.XMLHeader.
Vector sfi.director.application.autodoc.DocPHTML.references | ( | ) |
returns a Vector of references (href) that were found in the parsed document.
Referenced by sfi.director.application.autodoc.DocPHTML.startElement().
Hashtable sfi.director.application.autodoc.DocPHTML.refReplace | ( | ) |
Accessor for attribute refReplace.
replace hrefs by those
Referenced by sfi.director.application.autodoc.DocPHTML.injectInline(), sfi.director.application.autodoc.DocPHTML.refReplace(), and sfi.director.application.autodoc.DocPHTML.startElement().
Hashtable sfi.director.application.autodoc.DocPHTML.refReplace | ( | Hashtable | refReplace | ) |
Mutator for attribute refReplace.
replace hrefs by those
References sfi.director.application.autodoc.DocPHTML.refReplace().
void sfi.director.application.autodoc.DocPHTML.startDocument | ( | ) |
void sfi.director.application.autodoc.DocPHTML.startElement | ( | String | uri, |
String | name, | ||
String | qName, | ||
Attributes | atts | ||
) |
Reimplemented from sfi.director.application.autodoc.DocXHTML.
References sfi.director.application.autodoc.DocPHTML.adjustedLevel(), sfi.director.application.autodoc.DocPHTML.anchorPrefix(), sfi.director.application.autodoc.DocPHTML.anchors(), sfi.director.application.autodoc.DocPHTML.headingLevel(), sfi.director.application.autodoc.DocPHTML.headingLevels(), sfi.director.application.autodoc.DocPHTML.inInline, sfi.director.application.autodoc.DocXHTML.isHeading(), sfi.director.application.autodoc.DocPHTML.references(), sfi.director.application.autodoc.DocPHTML.referencesSeen, sfi.director.application.autodoc.DocPHTML.refReplace(), sfi.director.application.autodoc.DocPHTML.subheadings(), and sfi.director.application.autodoc.DocPHTML.text().
Vector sfi.director.application.autodoc.DocPHTML.subheadings | ( | ) |
returns a Vector of subheadings.
Each entry corresponds with an entry
Referenced by sfi.director.application.autodoc.DocPHTML.startDocument(), and sfi.director.application.autodoc.DocPHTML.startElement().
String sfi.director.application.autodoc.DocPHTML.text | ( | ) |
returns the resulting document.
Referenced by sfi.director.application.autodoc.DocPHTML.characters(), sfi.director.application.autodoc.DocPHTML.DocPHTML(), sfi.director.application.autodoc.DocPHTML.endElement(), sfi.director.application.autodoc.DocPHTML.injectInline(), sfi.director.application.autodoc.DocPHTML.parse(), and sfi.director.application.autodoc.DocPHTML.startElement().
|
protected |
The string that is prepended to every anchor inserted for title elements.
If not set, no prefix is used.
Referenced by sfi.director.application.autodoc.DocBuilder.slurpExternalDocs().
|
protected |
|
protected |
|
protected |
|
protected |
If set, the heading tags are adjusted, so that the top level heading of the parsed document is below the headingLevel.
Referenced by sfi.director.application.autodoc.DocBuilder.slurpExternalDocs().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by sfi.director.application.autodoc.DocPHTML.startElement().
|
protected |
replace hrefs by those
Referenced by sfi.director.application.autodoc.DocBuilder.slurpExternalDocs().
|
protected |
|
protected |
|
protected |
Referenced by sfi.director.application.autodoc.DocPHTML.adjustedLevel().