mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 18:25:58 +02:00
* Moved standard namespace URIs from dom.pp to xmlutils.pp
* Renamed another occurrence of PWideString to PXMLString git-svn-id: trunk@20436 -
This commit is contained in:
parent
f44734d1bc
commit
f9f6344d3a
@ -782,12 +782,6 @@ type
|
|||||||
procedure FreeNode(ANode: TDOMNode);
|
procedure FreeNode(ANode: TDOMNode);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
// URIs of predefined namespaces
|
|
||||||
const
|
|
||||||
stduri_xml: DOMString = 'http://www.w3.org/XML/1998/namespace';
|
|
||||||
stduri_xmlns: DOMString = 'http://www.w3.org/2000/xmlns/';
|
|
||||||
|
|
||||||
// temporary until things are settled
|
// temporary until things are settled
|
||||||
function LoadAttribute(doc: TDOMDocument; src: PNodeData): TDOMAttr;
|
function LoadAttribute(doc: TDOMDocument; src: PNodeData): TDOMAttr;
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ type
|
|||||||
TXMLVersion = (xmlVersionUnknown, xmlVersion10, xmlVersion11);
|
TXMLVersion = (xmlVersionUnknown, xmlVersion10, xmlVersion11);
|
||||||
TSetOfChar = set of Char;
|
TSetOfChar = set of Char;
|
||||||
XMLString = WideString;
|
XMLString = WideString;
|
||||||
|
PXMLString = ^XMLString;
|
||||||
PXMLChar = PWideChar;
|
PXMLChar = PWideChar;
|
||||||
|
|
||||||
function IsXmlName(const Value: XMLString; Xml11: Boolean = False): Boolean; overload;
|
function IsXmlName(const Value: XMLString; Xml11: Boolean = False): Boolean; overload;
|
||||||
@ -45,6 +46,9 @@ procedure WStrLower(var S: XMLString);
|
|||||||
|
|
||||||
const
|
const
|
||||||
xmlVersionStr: array[TXMLVersion] of XMLString = ('', '1.0', '1.1');
|
xmlVersionStr: array[TXMLVersion] of XMLString = ('', '1.0', '1.1');
|
||||||
|
// URIs of predefined namespaces
|
||||||
|
stduri_xml: XMLString = 'http://www.w3.org/XML/1998/namespace';
|
||||||
|
stduri_xmlns: XMLString = 'http://www.w3.org/2000/xmlns/';
|
||||||
|
|
||||||
type
|
type
|
||||||
TXMLNodeType = (ntNone, ntElement, ntAttribute, ntText,
|
TXMLNodeType = (ntNone, ntElement, ntAttribute, ntText,
|
||||||
@ -119,7 +123,7 @@ type
|
|||||||
TExpHashEntry = record
|
TExpHashEntry = record
|
||||||
rev: LongWord;
|
rev: LongWord;
|
||||||
hash: LongWord;
|
hash: LongWord;
|
||||||
uriPtr: PWideString;
|
uriPtr: PXMLString;
|
||||||
lname: PWideChar;
|
lname: PWideChar;
|
||||||
lnameLen: Integer;
|
lnameLen: Integer;
|
||||||
end;
|
end;
|
||||||
@ -133,7 +137,7 @@ type
|
|||||||
FData: PExpHashEntryArray;
|
FData: PExpHashEntryArray;
|
||||||
public
|
public
|
||||||
procedure Init(NumSlots: Integer);
|
procedure Init(NumSlots: Integer);
|
||||||
function Locate(uri: PWideString; localName: PWideChar; localLength: Integer): Boolean;
|
function Locate(uri: PXMLString; localName: PWideChar; localLength: Integer): Boolean;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -672,7 +676,7 @@ begin
|
|||||||
Dec(FRevision);
|
Dec(FRevision);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TDblHashArray.Locate(uri: PWideString; localName: PWideChar; localLength: Integer): Boolean;
|
function TDblHashArray.Locate(uri: PXMLString; localName: PWideChar; localLength: Integer): Boolean;
|
||||||
var
|
var
|
||||||
step: Byte;
|
step: Byte;
|
||||||
mask: LongWord;
|
mask: LongWord;
|
||||||
@ -720,8 +724,7 @@ begin
|
|||||||
SetLength(FBindingStack, 16);
|
SetLength(FBindingStack, 16);
|
||||||
|
|
||||||
{ provide implicit binding for the 'xml' prefix }
|
{ provide implicit binding for the 'xml' prefix }
|
||||||
// TODO: move stduri_xml, etc. to this unit, so they are reused.
|
DefineBinding('xml', stduri_xml, b);
|
||||||
DefineBinding('xml', 'http://www.w3.org/XML/1998/namespace', b);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TNSSupport.Destroy;
|
destructor TNSSupport.Destroy;
|
||||||
|
Loading…
Reference in New Issue
Block a user