mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 03:39:28 +02:00
* Patch from Graeme Geldenhuys to check for XMLDocument before typecasting it
git-svn-id: trunk@16443 -
This commit is contained in:
parent
3650944d9e
commit
a8e4234aca
@ -681,14 +681,17 @@ begin
|
||||
wrtStr('?>');
|
||||
|
||||
// TODO: now handled as a regular PI, remove this?
|
||||
if Length(TXMLDocument(node).StylesheetType) > 0 then
|
||||
if node is TXMLDocument then
|
||||
begin
|
||||
wrtStr(FLineBreak);
|
||||
wrtStr('<?xml-stylesheet type="');
|
||||
wrtStr(TXMLDocument(node).StylesheetType);
|
||||
wrtStr('" href="');
|
||||
wrtStr(TXMLDocument(node).StylesheetHRef);
|
||||
wrtStr('"?>');
|
||||
if Length(TXMLDocument(node).StylesheetType) > 0 then
|
||||
begin
|
||||
wrtStr(FLineBreak);
|
||||
wrtStr('<?xml-stylesheet type="');
|
||||
wrtStr(TXMLDocument(node).StylesheetType);
|
||||
wrtStr('" href="');
|
||||
wrtStr(TXMLDocument(node).StylesheetHRef);
|
||||
wrtStr('"?>');
|
||||
end;
|
||||
end;
|
||||
|
||||
child := node.FirstChild;
|
||||
|
Loading…
Reference in New Issue
Block a user