-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reimplementation of parser and tokeniser, to make jsoup a HTML5 confo…
…rmat parser, against the http://whatwg.org/html spec.
- Loading branch information
Showing
27 changed files
with
5,295 additions
and
816 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.jsoup.nodes; | ||
|
||
import org.jsoup.helper.StringUtil; | ||
|
||
/** | ||
* A {@code <!DOCTPYE>} node. | ||
*/ | ||
public class DocumentType extends Node { | ||
// todo: quirk mode from publicId and systemId | ||
|
||
private DocumentType() {} | ||
|
||
public DocumentType(String name, String publicId, String systemId, String baseUri) { | ||
super(baseUri); | ||
|
||
attr("name", name); | ||
attr("publicId", publicId); | ||
attr("systemId", systemId); | ||
} | ||
|
||
@Override | ||
public String nodeName() { | ||
return "#doctype"; | ||
} | ||
|
||
@Override | ||
void outerHtmlHead(StringBuilder accum, int depth, Document.OutputSettings out) { | ||
accum.append("<!DOCTYPE html"); | ||
if (!StringUtil.isBlank(attr("publicId"))) | ||
accum.append(" PUBLIC \"").append(attr("publicId")).append("\""); | ||
if (!StringUtil.isBlank(attr("systemId"))) | ||
accum.append(' ').append(attr("systemId")).append("\""); | ||
accum.append('>'); | ||
} | ||
|
||
@Override | ||
void outerHtmlTail(StringBuilder accum, int depth, Document.OutputSettings out) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.