[augeas-devel] augtool is choking on xml - help!

Raphaël Pinson raphink at gmail.com
Fri Feb 17 13:26:00 UTC 2012


On Fri, Feb 17, 2012 at 2:02 PM, Dominic Cleal <dcleal at redhat.com> wrote:
> On 17/02/12 12:59, Biltong wrote:
>> On Fri, Feb 17, 2012, at 11:35 AM, Dominic Cleal wrote:
>>> On 17/02/12 11:24, Biltong wrote:
>>>> I can't see what I am doing wrong. Can anyone help?
>>>>
>>>> $ cat /tmp/web.xml
>>>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>> [snip]
>>>> augtool> print /augeas/files/tmp/web.xml/error
>>>> /augeas/files/tmp/web.xml/error = "parse_failed"
>>>> /augeas/files/tmp/web.xml/error/pos = "43"
>>>> /augeas/files/tmp/web.xml/error/line = "1"
>>>> /augeas/files/tmp/web.xml/error/char = "43"
>>>
>>> Does the file have Windows/DOS style line endings?  Try dos2unix?
>>
>> Aha! That was it - thanks! So I guess this is a bug on my side, since
>> XML files should use unix line endings?
>
> There's no requirement in XML that they do as far as I know, so it's
> just the Augeas lens that isn't permitting it.
>
>> Okay to file an RFE for a nicer error?
>
> Even better, please file an RFE to get them supported.
>
> https://fedorahosted.org/augeas/  (you need a Fedora/FAS account)
>
> I think the subject of Unix vs. Windows line endings has come up before,
> but since Augeas is primarily used for Unix file types then I don't
> think any lenses support Windows line endings.  XML seems like a good
> exception to the rule IMO.


To my knowledge, only wine.aug fully supports \r (for obvious
reasons). xml.aug lists \r in a few definitions, so it's probably
allowed in some places.


Raphaël




More information about the augeas-devel mailing list