[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [desktop] Unix configuration nightmare



On Tue, Oct 22, 2002 at 03:46:40PM +0200, Andrew Fowler wrote:
> On Tue, 2002-10-22 at 10:22, Luca - De Whiskey's - De Vitis wrote:
> > IMHO it's time to go trough an XML/XSLT solution.
> 
> Definitely the way to go.  Libs already out there to parse them,
> validation available via e.g. XMLSchema, XPath for looking up info, XSLT
> for transforming to legacy formats (although back the other way is a
> little harder :-() ....

XSLT is *not* meant for transforming to "legacy formats". The only thing
it's good at is transforming trees to other trees, with those trees
closely mimicking the XML information set.

I have no idea what use you would want to make of XSLT, but if it is to
write config files in their native formats, then you need something
else: something which takes a tree (more likely a list for most formats)
and writes using whatever syntax that file has, including funny escaping
of special characters.

If you write it as a SAX filter and you define an XML vocabulary that
maps one-to-one to features in your file format and you use XSLT to
transform your super-duper-master-XML into that, then you're using XSLT
and other XML tools the right way.

If you try to do everything using XSLT's text output format, you're
doomed.

But I'm perplexed to see a question roughly of the same order as "how do
we get world peace?" being answered with a simple "just use XML/XSLT".

-- 
Bart.



Reply to: