org.eclipse.mylyn.wikitext.core.parser.builder
Class AbstractXmlDocumentBuilder
java.lang.Object
org.eclipse.mylyn.wikitext.core.parser.DocumentBuilder
org.eclipse.mylyn.wikitext.core.parser.builder.AbstractXmlDocumentBuilder
- Direct Known Subclasses:
- DitaBookMapDocumentBuilder, DitaTopicDocumentBuilder, DocBookDocumentBuilder, HtmlDocumentBuilder, XslfoDocumentBuilder
public abstract class AbstractXmlDocumentBuilder
- extends DocumentBuilder
- Author:
- David Green
Methods inherited from class org.eclipse.mylyn.wikitext.core.parser.DocumentBuilder |
acronym, annotation, beginBlock, beginDocument, beginHeading, beginLink, beginSpan, charactersUnescaped, endBlock, endDocument, endHeading, endLink, endSpan, entityReference, getLocator, image, imageLink, imageLink, imageLink, lineBreak, link, link, setLocator |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
writer
protected XmlStreamWriter writer
base
protected URI base
baseInHead
protected boolean baseInHead
AbstractXmlDocumentBuilder
public AbstractXmlDocumentBuilder(Writer out)
AbstractXmlDocumentBuilder
public AbstractXmlDocumentBuilder(XmlStreamWriter writer)
createXmlStreamWriter
protected XmlStreamWriter createXmlStreamWriter(Writer out)
getElementNestLevel
public int getElementNestLevel()
characters
public void characters(String text)
- Description copied from class:
DocumentBuilder
- Emit the given text as characters where special characters are encoded according to the output format rules.
- Specified by:
characters
in class DocumentBuilder
- Parameters:
text
- the text to emit.
makeUrlAbsolute
protected String makeUrlAbsolute(String url)
isExternalLink
protected boolean isExternalLink(String url)
- indicate if the given URL is a link to an external source
- Parameters:
url
- the URL
- Returns:
- true if the given URL links to an external source
setBase
public void setBase(URI uri)
- Set the base URI of the HTML document. Causes all relative URLs to be prefixed with the base URI. The base URI is
assumed to refer to a folder-like resource.
- Parameters:
uri
- the URI, or null
getBase
public URI getBase()
- Get the base URI of the HTML document. A not-null value causes all relative URLs to be prefixed with the base
URI. The base URI is assumed to refer to a folder-like resource.
isBaseInHead
public boolean isBaseInHead()
- Indicate if the
base URI
should be emitted into the <head> of the document. The default
value is false. Ignored unless #isEmitAsDocument()
setBaseInHead
public void setBaseInHead(boolean baseInHead)
- Indicate if the
base URI
should be emitted into the <head> of the document. The default
value is false. Ignored unless #isEmitAsDocument()
Copyright © 2011 FuseSource, Corp.. All Rights Reserved.