W3C home > Mailing lists > Public > www-validator@w3.org > June 2007

Re: Problems validating XML

From: Ville Skyttä <ville.skytta@iki.fi>
Date: Tue, 19 Jun 2007 21:02:47 +0300
To: www-validator@w3.org
Message-Id: <200706192102.47601.ville.skytta@iki.fi>

On Tuesday 19 June 2007, olivier Thereaux wrote:
>
> /^<\?xml[\x20|\x9|\xD|\xA]+(version=("1.0"|"1.1"|'1.0'|'1.1')[\x20|
> \x9|\xD|\xA]+)?(encoding=("[A-Za-z][a-zA-Z0-9-_]+"|'[A-Za-z][a-zA-
> Z0-9-_]+')\x20|\x9|\xD|\xA]+)?(standalone=("yes"|"no"|'yes'|'no')
> [\x20|\x9|\xD|\xA]+)?[\x20|\x9|\xD|\xA]*\?>[\x20|\x9|\xD|\xA]*$/
>
> It should match XML declarations as defined by XML 1.0 and 1.1 specs,
> and not be too greedy.

A couple of questions about the regexp:  Does it work if there's a BOM?  
Doesn't it need the multiline modifier?
Received on Tuesday, 19 June 2007 18:03:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:24 GMT