Changeset 42 for trunk/Common/UHtmlClasses.pas
- Timestamp:
- Nov 21, 2010, 8:49:46 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/UHtmlClasses.pas
r40 r42 6 6 7 7 uses 8 UXmlClasses, Classes, SysUtils, UStringListEx, SpecializedObjectList;8 UXmlClasses, Classes, SysUtils, SpecializedList, SpecializedObjectList; 9 9 10 10 type … … 257 257 with TXmlTag(SubElements[SubElements.Add(TXmlTag.Create)]) do begin 258 258 Name := 'meta'; 259 Attributes.Add NameValue('http-equiv', 'Content-Language');260 Attributes.Add NameValue('content', ContentLanguage);259 Attributes.Add('http-equiv', 'Content-Language'); 260 Attributes.Add('content', ContentLanguage); 261 261 end; 262 262 with TXmlTag(SubElements[SubElements.Add(TXmlTag.Create)]) do begin 263 263 Name := 'meta'; 264 Attributes.Add NameValue('http-equiv', 'Content-Type');265 Attributes.Add NameValue('content', 'text/html; charset=' + ContentEncoding);264 Attributes.Add('http-equiv', 'Content-Type'); 265 Attributes.Add('content', 'text/html; charset=' + ContentEncoding); 266 266 end; 267 267 for I := 0 to Styles.Count - 1 do 268 268 with TXmlTag(SubElements[SubElements.Add(TXmlTag.Create)]) do begin 269 269 Name := 'link'; 270 Attributes.Add NameValue('rel', 'stylesheet');271 Attributes.Add NameValue('href', Styles[I]);272 Attributes.Add NameValue('type', 'text/css');273 Attributes.Add NameValue('media', 'all');270 Attributes.Add('rel', 'stylesheet'); 271 Attributes.Add('href', Styles[I]); 272 Attributes.Add('type', 'text/css'); 273 Attributes.Add('media', 'all'); 274 274 end; 275 275 for I := 0 to Scripts.Count - 1 do … … 277 277 Name := 'script'; 278 278 ShringEmpty := False; 279 Attributes.Add NameValue('type', 'text/javascript');280 Attributes.Add NameValue('src', Scripts[I]);279 Attributes.Add('type', 'text/javascript'); 280 Attributes.Add('src', Scripts[I]); 281 281 end; 282 282 end; … … 381 381 procedure TIpAddress.SetAsString(const Value: string); 382 382 var 383 Parts: T StringListEx;383 Parts: TListString; 384 384 begin 385 385 try 386 Parts := T StringListEx.Create;387 Parts.Explode( '.', Value);386 Parts := TListString.Create; 387 Parts.Explode(Value, '.', StrToStr); 388 388 try 389 389 // if Length(Parts) = 4 then begin … … 465 465 procedure TDomainAddress.SetAsString(const Value: string); 466 466 var 467 StrArray: T StringListEx;467 StrArray: TListString; 468 468 I: Integer; 469 469 begin 470 470 try 471 StrArray := T StringListEx.Create;472 StrArray.Explode( '.', Value);471 StrArray := TListString.Create; 472 StrArray.Explode(Value, '.', StrToStr); 473 473 SetLength(Levels, StrArray.Count); 474 474 for I := 0 to StrArray.Count do … … 497 497 with TXmlTag(Result) do begin 498 498 Name := 'a'; 499 Attributes.Add('href ='+Target.AsString);499 Attributes.Add('href', Target.AsString); 500 500 if Assigned(Content) then SubElements.Add(Content.AsXmlElement); 501 501 end; … … 564 564 with TXmlTag(Result) do begin 565 565 Name := 'img'; 566 Attributes.Add NameValue('src', Source.AsString);567 Attributes.Add NameValue('width', IntToStr(Size.Width));568 Attributes.Add NameValue('height', IntToStr(Size.Height));569 Attributes.Add NameValue('alt', AlternateText);566 Attributes.Add('src', Source.AsString); 567 Attributes.Add('width', IntToStr(Size.Width)); 568 Attributes.Add('height', IntToStr(Size.Height)); 569 Attributes.Add('alt', AlternateText); 570 570 end; 571 571 end;
Note:
See TracChangeset
for help on using the changeset viewer.