
On 07/01/2015 07:36 PM, Daniel P. Berrange wrote:
On Wed, Jul 01, 2015 at 07:22:33PM +0300, Dmitry Guryanov wrote:
Hello,
There is an absFilePatch type in docs/schemas/basictypes.rng rng schema:
<define name="absFilePath"> <data type="string"> <param name="pattern">/[a-zA-Z0-9_\.\+\-\\&"'<>/%,:]+</param> </data> </define>
There are quite few symbols in this set of the ones, which linux allows to have in file paths. For example spaces or curly braces are not allowed. There are a lot of elements of this type in other rng schems, for example: [snip]
So the question is, where did this path pattern come from? Is it possible to use file paths with another symbols or there will be some problems? I think this regex pattern is a bit of a misguided attempt to perform semantic validation on the XML content. I'd probably be inclined to simplify it to '/.*' and just delegate all other validation to drivers as they desire.
Thanks, Daniel. I've sent a patch, which changes rng scheme.
Regards, Daniel