Skip to content

Commit

Permalink
Basic DTD handling added to DOM
Browse files Browse the repository at this point in the history
  • Loading branch information
ZILtoid1991 committed Sep 17, 2022
1 parent ddf1a8f commit 9654461
Show file tree
Hide file tree
Showing 7 changed files with 362 additions and 92 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
* Added function `newxml.parseXMLString()` for easy XML parsing.
* Code readability improvements.
* Basic Doctype handling added to the SAX parser.
* Basic Doctype handling added to the DOM, with internal entity handling.

### Known issues

* Namespace URIs are not handled currently.

# v0.2.1

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ parsing XML. e.g. you really need that extra memory and speed.

# To do list

* Implement missing DOM functions.
* Implement missing DOM functions. Basic DTD and internal entities now work.
* Improve error handling. (Currently it doesn't seem to work well with the DOM parser for some reason)
* Write even more testcases.
* gather input on library and adjust things accordingly.
* Gather input on library and adjust things accordingly.
* Implement namespace URI handling (currently it's unimplemented with many supporting functions potentially broken).
6 changes: 6 additions & 0 deletions source/newxml/dom.d
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,10 @@ interface NamedNodeMap {
return 0;
}

final Node opIndex(size_t index) {
return item(index);
}

/// Retrieves a node specified by name.
Node getNamedItem(DOMString name);
/++
Expand Down Expand Up @@ -1190,6 +1194,8 @@ interface Notation : Node {
+ and then the desired changes must be made to each of those clones instead.
+ `Entity` nodes and all their descendants are readonly.
+
+ DOM Level 4 has deprecated the use of entities, but kept for DTD processing reasons.
+
+ An `Entity` node does not have any parent.
+/
interface Entity : Node {
Expand Down
Loading

0 comments on commit 9654461

Please sign in to comment.