Around 8 o'clock on Feb 20, [EMAIL PROTECTED] wrote:
> As a format, XML is fine. I would prefer S-expressions, but a > restricted XML schema is merely S-expressions with pointy delimiters > instead of curved delimiters. If you squint, and format your XML properly, you can easily pretend that it is S-expressions... In developing the fontconfig DTD, I discovered that the XML proponents involved directed me to a more s-expression like syntax. > ... I think that S-expressions are a good choice for configuration files. > Giving them pointy delimiters does not change that. XML has one advantage over S-exprs -- the existing parsers can capture and retain formatting information so that the writer can precisely reproduce what the reader was given. > If the schema is designed and specified so that none of the XML > extensions beyond the S-expression analogues are permitted, then we can > also consider using a tiny customized XML parser when we want to reduce > the footprint of X. Yes, the existing XML parsers are relatively large -- 100K for expat, 600K for libxml2. I'm not willing to write a custom parser, but certainly would accept contributions along such lines. However, if XML-based configuration becomes popular in other areas, it may be that the 100K library will be shared among many applications mitigating it's memory impact somewhat. > I am using the term schema deliberately. I think that the schema is the > proper route, not the DTD. The differences are small but important. > Schema give you a little more rope with which to hang yourself, but the > DTD already gave you more than enough to get in real trouble. Schema > permit you to document the contents and constraints much more clearly > than DTDs and that is important. I haven't explored the world of schema yet; if using those would help make the configuration file somewhat more self-documenting, and provide tools that can verify the contents more accurately, then we should probably use them. I also don't know the state of existing tools wrt schema-based XML. I took the cautious approach when designing the fontconfig mechanism. Keith Packard XFree86 Core Team Compaq Cambridge Research Lab _______________________________________________ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert