mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 01:29:29 +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);
|
||||
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
|
||||
function LoadAttribute(doc: TDOMDocument; src: PNodeData): TDOMAttr;
|
||||
|
||||
|
@ -26,6 +26,7 @@ type
|
||||
TXMLVersion = (xmlVersionUnknown, xmlVersion10, xmlVersion11);
|
||||
TSetOfChar = set of Char;
|
||||
XMLString = WideString;
|
||||
PXMLString = ^XMLString;
|
||||
PXMLChar = PWideChar;
|
||||
|
||||
function IsXmlName(const Value: XMLString; Xml11: Boolean = False): Boolean; overload;
|
||||
@ -45,6 +46,9 @@ procedure WStrLower(var S: XMLString);
|
||||
|
||||
const
|
||||
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
|
||||
TXMLNodeType = (ntNone, ntElement, ntAttribute, ntText,
|
||||
@ -119,7 +123,7 @@ type
|
||||
TExpHashEntry = record
|
||||
rev: LongWord;
|
||||
hash: LongWord;
|
||||
uriPtr: PWideString;
|
||||
uriPtr: PXMLString;
|
||||
lname: PWideChar;
|
||||
lnameLen: Integer;
|
||||
end;
|
||||
@ -133,7 +137,7 @@ type
|
||||
FData: PExpHashEntryArray;
|
||||
public
|
||||
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;
|
||||
end;
|
||||
|
||||
@ -672,7 +676,7 @@ begin
|
||||
Dec(FRevision);
|
||||
end;
|
||||
|
||||
function TDblHashArray.Locate(uri: PWideString; localName: PWideChar; localLength: Integer): Boolean;
|
||||
function TDblHashArray.Locate(uri: PXMLString; localName: PWideChar; localLength: Integer): Boolean;
|
||||
var
|
||||
step: Byte;
|
||||
mask: LongWord;
|
||||
@ -720,8 +724,7 @@ begin
|
||||
SetLength(FBindingStack, 16);
|
||||
|
||||
{ provide implicit binding for the 'xml' prefix }
|
||||
// TODO: move stduri_xml, etc. to this unit, so they are reused.
|
||||
DefineBinding('xml', 'http://www.w3.org/XML/1998/namespace', b);
|
||||
DefineBinding('xml', stduri_xml, b);
|
||||
end;
|
||||
|
||||
destructor TNSSupport.Destroy;
|
||||
|
Loading…
Reference in New Issue
Block a user