Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jul 2014 16:51:23 -0700
From:      "Simon J. Gerraty" <sjg@juniper.net>
To:        Alfred Perlstein <alfred@freebsd.org>, <freebsd-arch@freebsd.org>
Cc:        phil@juniper.net
Subject:   Re: XML Output: libxo - provide single API to output TXT, XML, JSON and HTML
Message-ID:  <20140730235123.AC944580A2@chaos.jnpr.net>
In-Reply-To: <20140730194522.B58FE580A2@chaos.jnpr.net>
References:  <20140725044921.9F0D3580A2@chaos.jnpr.net> <CAETOPp13H7kyLy-1VJRDOsDbOh8A1MWZDxw1xHUBsxTRtMfc7g@mail.gmail.com> <20140728054217.AC1A0580A2@chaos.jnpr.net> <20140728055336.GJ50802@ivaldir.etoilebsd.net> <CAETOPp3hJB8Gj%2BPMj3N951krnNqCYiAOY-cPHxMCBy1CQXWJaQ@mail.gmail.com> <A1E63A7A-BB38-4CC3-B5EC-B251BE990572@mail.turbofuzz.com> <20140729230345.31E9B580A2@chaos.jnpr.net> <53D85495.4050408@mu.org> <20140730053446.DCE8D580A2@chaos.jnpr.net> <53D944F5.7000207@freebsd.org> <20140730194522.B58FE580A2@chaos.jnpr.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On Wed, 30 Jul 2014 12:45:22 -0700, "Simon J. Gerraty" writes:
>>The code can be seen here:
>>   https://socsvn.freebsd.org/socsvn/soc2014/zkorchev/
>>
>>Since Juniper has many years of experience AND the GSOC project has 
>>many, many utils converted I'm suggesting that Juniper engage in the 
>>review process and help us get the best of both worlds in.
>
>That would of course depend on whether we like what has been done ;-)
>The library and API are more important than how many apps have been
>converted. 

Ok I took a look...

There's no nice way to say it I'm afraid;
This looks like the same sort of approach that Juniper used a
over a decade ago for the BSD apps to get XML out, and which we felt was
just too ugly to upstream, I don't see how we could support this.

Unfortunately it took me a couple of years to get a few hours of Phil's
time, to come up with a neat API to avoid that #ifdef and if/else mess.
On the plus side that means it covers a lot more than just XML.

We now have an API and library that can avoid the need to double the
cost of adding new output to apps, ie you only write to libxo's api
and it does plain TXT for you if needed.

Our only concern was how best to address the wide-char issue John-Mark
Gurney strongly favours just doing UTF-8, I and I believe Marcel and
Phil would tend to agree (since AFAICT it has little overhead for ASCII)

Based on this thread, it would seem there is still demand for this
functionality so I think we should proceed with putting libxo into our
internal tree and generate some diffs for folk to review...


Thanks
--sjg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140730235123.AC944580A2>