Open
Description
When an XML file starts like this:
<?xml-stylesheet type='text/xsl' href='https://zzz.xsl' alternate='no' title='Default'?>
<rootTag>
<tag1>
<tag2>
since there is no xml declaration, it gives a warning:
:1:6: whitespace expectedstylesheet type='text/xsl' href='https://zzz.xsl' alternate='no' title='Default'?> ^
:1:6: '?' expected instead of '-'<rootTag xmlns="something" xmlns:xsi="http://www.w3.org/something"> ^
:1:6: '>' expected instead of '-' <tag1 code="QQ" /> ^
And then it processes normally as if tag2 is the first tag. It does not give any error, but parse the file wrongly. If an xml declaration is added it works fine:
<?xml version = "1.0" ?>
<?xml-stylesheet type='text/xsl' href='https://zzz.xsl' alternate='no' title='Default'?>
<rootTag>
<tag1>
<tag2>
Shouldn't it be giving an error, if xml declaration was the issue?
Metadata
Metadata
Assignees
Labels
No labels