[augeas-devel] XML lens parse_error with XML document using single quotes

Alan Evans alanwevans at gmail.com
Tue Nov 8 05:51:34 UTC 2011


Hahahaha I was staring at that file for 30 mins to figure out if it
was something else with my xml file or something in the schema and I
missed it right there in the notes.

This hasn't been addressed in any other schema that could be copied from?

-Alan

On Tue, Nov 8, 2011 at 12:40 AM, Francis Giraldeau
<francis.giraldeau at gmail.com> wrote:
> Le lundi 07 novembre 2011 à 21:53 -0500, Alan Evans a écrit :
>> I noticed the problem when parsing a document with a prolog like the
>> following augeas gives a parse_error.
>>
>> <?xml version='1.0'?>
>>
>> If I manually replace the single quotes with double quotes augeas
>> likes the document just fine.
>
> You're right. This is a limitation of the current lens. Here is the
> comment from the lens:
>
> (* if we hide the quotes, then we can only accept single or double
>   quotes otherwise a put ambiguity is raised *)
>
> The put ambiguity is raised because for the same tree, two lenses match.
> One way to overcome this would be to accept malformed files, where a
> quote may not be balanced i.e. att="var'.
>
> let example = [ key /[a-z]+/ . dels "=" . del /["']/ "\"" .
> store /[a-z]*/ . del /["']/ "\"" ]
>
> Maybe a lens like the square lens, but that acts as a del with
> characters at extremity? Or quotient lens?
>
> Francis
>
> _______________________________________________
> augeas-devel mailing list
> augeas-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/augeas-devel




More information about the augeas-devel mailing list