|
@@ -239,6 +239,7 @@ type
|
|
FIsAbsolutePath: Boolean;
|
|
FIsAbsolutePath: Boolean;
|
|
public
|
|
public
|
|
constructor Create(AIsAbsolutePath: Boolean);
|
|
constructor Create(AIsAbsolutePath: Boolean);
|
|
|
|
+ destructor destroy;override;
|
|
function Evaluate(AContext: TXPathContext;
|
|
function Evaluate(AContext: TXPathContext;
|
|
AEnvironment: TXPathEnvironment): TXPathVariable; override;
|
|
AEnvironment: TXPathEnvironment): TXPathVariable; override;
|
|
end;
|
|
end;
|
|
@@ -439,6 +440,7 @@ type
|
|
{ CompleteExpresion specifies wether the parser should check for gargabe
|
|
{ CompleteExpresion specifies wether the parser should check for gargabe
|
|
after the recognised part. True => Throw exception if there is garbage }
|
|
after the recognised part. True => Throw exception if there is garbage }
|
|
constructor Create(AScanner: TXPathScanner; CompleteExpression: Boolean);
|
|
constructor Create(AScanner: TXPathScanner; CompleteExpression: Boolean);
|
|
|
|
+ destructor destroy;override;
|
|
function Evaluate(AContextNode: TDOMNode): TXPathVariable;
|
|
function Evaluate(AContextNode: TDOMNode): TXPathVariable;
|
|
function Evaluate(AContextNode: TDOMNode;
|
|
function Evaluate(AContextNode: TDOMNode;
|
|
AEnvironment: TXPathEnvironment): TXPathVariable;
|
|
AEnvironment: TXPathEnvironment): TXPathVariable;
|
|
@@ -893,7 +895,7 @@ begin
|
|
for i := 0 to Predicates.Count - 1 do
|
|
for i := 0 to Predicates.Count - 1 do
|
|
TXPathExprNode(Predicates[i]).Free;
|
|
TXPathExprNode(Predicates[i]).Free;
|
|
Predicates.Free;
|
|
Predicates.Free;
|
|
- inherited Free;
|
|
|
|
|
|
+ inherited destroy;
|
|
end;
|
|
end;
|
|
|
|
|
|
constructor TXPathLocationPathNode.Create(AIsAbsolutePath: Boolean);
|
|
constructor TXPathLocationPathNode.Create(AIsAbsolutePath: Boolean);
|
|
@@ -1163,6 +1165,15 @@ begin
|
|
Result := TXPathNodeSetVariable.Create(ResultNodeSet);
|
|
Result := TXPathNodeSetVariable.Create(ResultNodeSet);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+destructor TXPathLocationPathNode.destroy;
|
|
|
|
+var tmp:TStep;
|
|
|
|
+begin
|
|
|
|
+ while FFirstStep<>nil do begin
|
|
|
|
+ tmp:=FFirstStep.NextStep;
|
|
|
|
+ FFirstStep.free;
|
|
|
|
+ FFirstStep:=tmp;
|
|
|
|
+ end;
|
|
|
|
+end;
|
|
|
|
|
|
{ Exceptions }
|
|
{ Exceptions }
|
|
|
|
|
|
@@ -2483,6 +2494,11 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+destructor TXPathExpression.destroy;
|
|
|
|
+begin
|
|
|
|
+ FRootNode.free;
|
|
|
|
+end;
|
|
|
|
+
|
|
function TXPathExpression.Evaluate(AContextNode: TDOMNode;
|
|
function TXPathExpression.Evaluate(AContextNode: TDOMNode;
|
|
AEnvironment: TXPathEnvironment): TXPathVariable;
|
|
AEnvironment: TXPathEnvironment): TXPathVariable;
|
|
var
|
|
var
|