[libvirt] [PATCH] xml: Clean up rest of virtual XML document names for XML strings

Peter Krempa pkrempa at redhat.com
Wed Sep 14 14:22:54 UTC 2011

On 09/14/2011 03:55 PM, Daniel Veillard wrote:
>    Considering the previous patch this one makes sense, but I realize
> that the string passed is supposed to be an URI, doesn't have to be
> absolute but the principle of that argument passed to the parser, beside
> giving a name for the 'entity' (basically a file in XML terminology)
> is used to resolve URI-References done from within the XML content.
>   Since we don't use any DTD, this should not affect parsing, but users
> might be tempted to add this for fun or validation, and that would not
> be wrong. Simply replacing the spaces by underscore in the string would
> be sufficient to make them correct URIs (I doubt %escape of the space
> would be any nicer for the users...)
>    So in one hand, yes this makes sense, but I wonder if we shouldn't
> clean this up ...
I agree. Making them valid URI's and still telling the user:
"I am not a file you should look for!" is a good approach and the
underscores are a fine way to do it.

v2 incomming.

> Daniel

More information about the libvir-list mailing list