|
@@ -348,8 +348,13 @@ type
|
|
|
property Value: DOMString read FValue;
|
|
|
end;
|
|
|
|
|
|
-
|
|
|
- TXPathNSResolver = TDOMNode {!!! experimental};
|
|
|
+ TXPathNSResolver = class
|
|
|
+ protected
|
|
|
+ FNode: TDOMNode;
|
|
|
+ public
|
|
|
+ constructor Create(aNode: TDOMNode);
|
|
|
+ function LookupNamespaceURI(const aPrefix: DOMString): DOMString; virtual;
|
|
|
+ end;
|
|
|
|
|
|
{ XPath lexical scanner }
|
|
|
|
|
@@ -2815,7 +2820,21 @@ begin
|
|
|
Result := TXPathNumberVariable.Create(num);
|
|
|
end;
|
|
|
|
|
|
+{ TXPathNSResolver }
|
|
|
|
|
|
+constructor TXPathNSResolver.Create(aNode: TDOMNode);
|
|
|
+begin
|
|
|
+ inherited Create;
|
|
|
+ FNode := aNode;
|
|
|
+end;
|
|
|
+
|
|
|
+function TXPathNSResolver.LookupNamespaceURI(const aPrefix: DOMString): DOMString;
|
|
|
+begin
|
|
|
+ if assigned(FNode) then
|
|
|
+ result := FNode.LookupNamespaceURI(aPrefix)
|
|
|
+ else
|
|
|
+ result := '';
|
|
|
+end;
|
|
|
|
|
|
{ TXPathExpression }
|
|
|
|