|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Proper extension for XML files?
At 10:50 AM 5/17/00 -0700, Charles Wiltgen wrote: >Hello, > >(Apologies if this is so simple to be a stupid question!) Please be reassured that we welcome all sorts of questions on XML-DEV, and this certainly isn't stupid! And often the apparently simple questions are deceptively deep - as I suspect this one might be. > >We're using XML in a couple ways in an application we're doing. Is the >preferred convention to use .xml as the file suffix, or our own suffix >depending on the flavor? The XML family of languages each has its own suffix - e,g, *.xsl, *.svg, *.rdf, *.xsd, etc. I am not sure when and how these are registered - I assume that any which are registered as MIME types are submitted with possible extensions. [BTW is there a definitive list of all XML suffixes, MIME types, etc.?] The suffix has at least the following possible purposes: - to specify which DTD is being used (remember that <!DOCTYPE statements are optional for well-formed-only - to specify behaviour (e.g. a helper application). Thus activating *.svg files on my machine now bring up the Adobe SVG plugin, with the SVG content wrapped in HTML. I never instructed the machine to do this - I assume that the act of downloading the plugin added this to my file type and their behaviour. [I'm not complaining - in this case - because it's a very nice plugin!] Therefore the file extension matters - especially if there are possible name collisions and you are using local files - where MIME types are not attached to the file. There comes a problem when a file contains elements from more than one DTD. Thus SVG files can contain non-SVG elements and attributes - at least in the last draft I read. This is a useful idea and one that will be increasingly common. I suspect that many XML files representing "documents" rather than "messages" will have content conforming to more than one DTD. I already mix CML (chemistry) and SVG because that's the way chemists think. So I have to look inside the file to find out what is in there - and I use *.xml rather thane *.svg or *.cml. If I have nothing except chemistry in a file, should I call it *.cml? Difficult. [There is already a non-XML file type called CML - nothing to do with chemistry]. It is very useful for chemical software packages which rely on suffixes to (try to) work out behaviour. But it isn't much use in the XML community which is looking for better mechanisms. The dream of many of us is that we can feed a *.xml file (or bundle of files) into any XML engine and have it work out the semantics from the files themselves - ideally just the content. That relates exactly to another discussion which is taking place on XML-DEV at present. So no - I didn't laugh! But I smiled. P. *************************************************************************** This is xml-dev, the mailing list for XML developers. To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev List archives are available at http://xml.org/archives/xml-dev/ ***************************************************************************
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








