That is probably true, and it would be my mistake. It probably works in
99.9% of all cases, which is why its not been caught. But yes, you could
have <?xml[tab]version="1.0"?> and that would indeed fail. So it should skip
just the <?xml and then check explicitly for whitespace. I assume that this
would be a trivial fix becuase it already knows that more whitespace can
follow that initial trailing one so the code is already there to eat any
subsequent whitespace. The primary reason for doing that check was to make
sure that its not something like "<?xmlfoo", which is a completely different
thing. So it still needs to do a check for at least one whitespace char and
eat any others.
--------------
Dean Roddey
Software Geek Extraordinaire
Portal, Inc
[EMAIL PROTECTED]
-----Original Message-----
From: Chris Hill [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 30, 2001 2:24 PM
To: [EMAIL PROTECTED]
Subject: Bug in scanner
(Bugzilla appears to be down)
In XMLScanner::scanProlog(), to detect an xml decl, the following code is
used:
fReaderMgr.skippedString(XMLUni::fgXMLDeclStringSpace)
I believe this is incorrect. If there is a whitespace other than the space
character 0x20 following "<?xml", it will not be recognized as the
beginning of an xml decl. (The other valid white space characters are 0x9
0xA 0xD)
A test case would be (with no trailing space on the first line)
<?xml
version='1.0'?><a/>
XMLUni::fgXMLDeclStringSpace seems like a dangerous thing to have around, I
don't know if it is used anywhere else, but it probably shouldn't be.
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]