Skip to content

Commit

Permalink
Remove entity and notation events, not coming for 6.5.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
renggli committed Dec 2, 2023
1 parent ec05121 commit 83d07b4
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 101 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Add support for most XPath 1.0 variables and functions, including set-operations and ensuring document order in the result.
* Add `XmlNode.xpathGenerate` to create a readable XPath for all nodes.
* Add support for node comparison: `XmlNode.isEqualNode` and `XmlNode.compareNodePosition`.
* Add events and node types for _entity_ and _notation_ nodes.

## 6.4.0

Expand Down
12 changes: 0 additions & 12 deletions lib/src/xml_events/converters/node_decoder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import '../events/comment.dart';
import '../events/declaration.dart';
import '../events/doctype.dart';
import '../events/end_element.dart';
import '../events/entity.dart';
import '../events/notation.dart';
import '../events/processing.dart';
import '../events/start_element.dart';
import '../events/text.dart';
Expand Down Expand Up @@ -101,16 +99,6 @@ class _XmlNodeDecoderSink
}
}

@override
void visitEntityEvent(XmlEntityEvent event) {
// TODO: add node to DOM
}

@override
void visitNotationEvent(XmlNotationEvent event) {
// TODO: add node to DOM
}

@override
void visitProcessingEvent(XmlProcessingEvent event) =>
commit(XmlProcessing(event.target, event.value), event);
Expand Down
20 changes: 0 additions & 20 deletions lib/src/xml_events/events/entity.dart

This file was deleted.

20 changes: 0 additions & 20 deletions lib/src/xml_events/events/notation.dart

This file was deleted.

29 changes: 0 additions & 29 deletions lib/src/xml_events/streams/each_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import '../events/comment.dart';
import '../events/declaration.dart';
import '../events/doctype.dart';
import '../events/end_element.dart';
import '../events/entity.dart';
import '../events/notation.dart';
import '../events/processing.dart';
import '../events/start_element.dart';
import '../events/text.dart';
Expand All @@ -27,8 +25,6 @@ extension XmlEachEventStreamExtension on Stream<XmlEvent> {
EventHandler<XmlDeclarationEvent>? onDeclaration,
EventHandler<XmlDoctypeEvent>? onDoctype,
EventHandler<XmlEndElementEvent>? onEndElement,
EventHandler<XmlEntityEvent>? onEntityEvent,
EventHandler<XmlNotationEvent>? onNotationEvent,
EventHandler<XmlProcessingEvent>? onProcessing,
EventHandler<XmlStartElementEvent>? onStartElement,
EventHandler<XmlTextEvent>? onText,
Expand All @@ -39,8 +35,6 @@ extension XmlEachEventStreamExtension on Stream<XmlEvent> {
onDeclaration: onDeclaration,
onDoctype: onDoctype,
onEndElement: onEndElement,
onEntityEvent: onEntityEvent,
onNotationEvent: onNotationEvent,
onProcessing: onProcessing,
onStartElement: onStartElement,
onText: onText,
Expand All @@ -61,8 +55,6 @@ extension XmlEachEventStreamExtension on Stream<XmlEvent> {
EventHandler<XmlDeclarationEvent>? onDeclaration,
EventHandler<XmlDoctypeEvent>? onDoctype,
EventHandler<XmlEndElementEvent>? onEndElement,
EventHandler<XmlEntityEvent>? onEntityEvent,
EventHandler<XmlNotationEvent>? onNotationEvent,
EventHandler<XmlProcessingEvent>? onProcessing,
EventHandler<XmlStartElementEvent>? onStartElement,
EventHandler<XmlTextEvent>? onText,
Expand All @@ -73,8 +65,6 @@ extension XmlEachEventStreamExtension on Stream<XmlEvent> {
onDeclaration: onDeclaration,
onDoctype: onDoctype,
onEndElement: onEndElement,
onEntityEvent: onEntityEvent,
onNotationEvent: onNotationEvent,
onProcessing: onProcessing,
onStartElement: onStartElement,
onText: onText,
Expand All @@ -93,8 +83,6 @@ extension XmlEachEventStreamListExtension on Stream<List<XmlEvent>> {
EventHandler<XmlDeclarationEvent>? onDeclaration,
EventHandler<XmlDoctypeEvent>? onDoctype,
EventHandler<XmlEndElementEvent>? onEndElement,
EventHandler<XmlEntityEvent>? onEntityEvent,
EventHandler<XmlNotationEvent>? onNotationEvent,
EventHandler<XmlProcessingEvent>? onProcessing,
EventHandler<XmlStartElementEvent>? onStartElement,
EventHandler<XmlTextEvent>? onText,
Expand All @@ -105,8 +93,6 @@ extension XmlEachEventStreamListExtension on Stream<List<XmlEvent>> {
onDeclaration: onDeclaration,
onDoctype: onDoctype,
onEndElement: onEndElement,
onEntityEvent: onEntityEvent,
onNotationEvent: onNotationEvent,
onProcessing: onProcessing,
onStartElement: onStartElement,
onText: onText,
Expand All @@ -127,8 +113,6 @@ extension XmlEachEventStreamListExtension on Stream<List<XmlEvent>> {
EventHandler<XmlDeclarationEvent>? onDeclaration,
EventHandler<XmlDoctypeEvent>? onDoctype,
EventHandler<XmlEndElementEvent>? onEndElement,
EventHandler<XmlEntityEvent>? onEntityEvent,
EventHandler<XmlNotationEvent>? onNotationEvent,
EventHandler<XmlProcessingEvent>? onProcessing,
EventHandler<XmlStartElementEvent>? onStartElement,
EventHandler<XmlTextEvent>? onText,
Expand All @@ -139,8 +123,6 @@ extension XmlEachEventStreamListExtension on Stream<List<XmlEvent>> {
onDeclaration: onDeclaration,
onDoctype: onDoctype,
onEndElement: onEndElement,
onEntityEvent: onEntityEvent,
onNotationEvent: onNotationEvent,
onProcessing: onProcessing,
onStartElement: onStartElement,
onText: onText,
Expand All @@ -154,8 +136,6 @@ class XmlEventHandler with XmlEventVisitor {
this.onDeclaration,
this.onDoctype,
this.onEndElement,
this.onEntityEvent,
this.onNotationEvent,
this.onProcessing,
this.onStartElement,
this.onText,
Expand All @@ -166,8 +146,6 @@ class XmlEventHandler with XmlEventVisitor {
final EventHandler<XmlDeclarationEvent>? onDeclaration;
final EventHandler<XmlDoctypeEvent>? onDoctype;
final EventHandler<XmlEndElementEvent>? onEndElement;
final EventHandler<XmlEntityEvent>? onEntityEvent;
final EventHandler<XmlNotationEvent>? onNotationEvent;
final EventHandler<XmlProcessingEvent>? onProcessing;
final EventHandler<XmlStartElementEvent>? onStartElement;
final EventHandler<XmlTextEvent>? onText;
Expand All @@ -189,13 +167,6 @@ class XmlEventHandler with XmlEventVisitor {
void visitEndElementEvent(XmlEndElementEvent event) =>
onEndElement?.call(event);

@override
void visitEntityEvent(XmlEntityEvent event) => onEntityEvent?.call(event);

@override
void visitNotationEvent(XmlNotationEvent event) =>
onNotationEvent?.call(event);

@override
void visitProcessingEvent(XmlProcessingEvent event) =>
onProcessing?.call(event);
Expand Down
10 changes: 0 additions & 10 deletions lib/src/xml_events/streams/with_parent.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import '../events/comment.dart';
import '../events/declaration.dart';
import '../events/doctype.dart';
import '../events/end_element.dart';
import '../events/entity.dart';
import '../events/notation.dart';
import '../events/processing.dart';
import '../events/start_element.dart';
import '../events/text.dart';
Expand Down Expand Up @@ -91,14 +89,6 @@ class _XmlWithParentEventsSink
currentParent = parent.parent;
}

@override
void visitEntityEvent(XmlEntityEvent event) =>
event.attachParent(currentParent);

@override
void visitNotationEvent(XmlNotationEvent event) =>
event.attachParent(currentParent);

@override
void visitProcessingEvent(XmlProcessingEvent event) =>
event.attachParent(currentParent);
Expand Down
8 changes: 0 additions & 8 deletions lib/src/xml_events/visitor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import 'events/comment.dart';
import 'events/declaration.dart';
import 'events/doctype.dart';
import 'events/end_element.dart';
import 'events/entity.dart';
import 'events/notation.dart';
import 'events/processing.dart';
import 'events/start_element.dart';
import 'events/text.dart';
Expand All @@ -30,12 +28,6 @@ mixin XmlEventVisitor {
/// Visit an [XmlEndElementEvent] event.
void visitEndElementEvent(XmlEndElementEvent event) {}

/// Visit an [XmlEntityEvent] event.
void visitEntityEvent(XmlEntityEvent event) {}

/// Visit an [XmlNotationEvent] event.
void visitNotationEvent(XmlNotationEvent event) {}

/// Visit an [XmlCommentEvent] event.
void visitProcessingEvent(XmlProcessingEvent event) {}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: xml
version: 6.4.2
version: 6.5.0

description: A lightweight library for parsing, traversing, querying, transforming and building XML documents.
homepage: https://github.com/renggli/dart-xml
Expand Down

0 comments on commit 83d07b4

Please sign in to comment.