[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
On Thursday 09 December 2004 6:09 pm, Jon Lawrence wrote:
Given this scenario, can you tell me what styletype and subtype are being used? This would still (I believe) conform to being XML.OK. I thought that the DTD was supposed to describe the tags used within an XML document. ie describe the framework that the document conforms to.
It does, but this only describes the TAGS and the structure not how to relate the data to existing structures in memory. You've missed the key stage in any import - how to relate object A to entity 1 in memory. When it is not the native XML of that application, a conversion is ALWAYS required. There is no universal import format, just as there is no universal data format or universal data structure of any kind.
If this isn't the case, then how can xml be a good way of interchanging data - I thought it was supposed to the muttsnuts wen it comes to exchanging data between programs.
It is, because there is a clear separation between structure and data. You can change the structure of the XML without affecting the data. CodeHelp has a classic example of this. The XML on the site is used to convert into XHTML using XSLT. The data has not changed but the use of specialised tags means that I reduced the overall file size of the site by 50%. XML and XSLT allow easy use of defaults, shortcuts and other processing tools that reduce the amount of code needing to be debugged. Once in XML, if anyone writes an XSL stylesheet, all XML files of that type can be converted. The XSL is a one-off task, write it once and because XML is so easy to validate, the XSL will continue operating on the original XML structure, no matter what data is held in the XML. Separation of structure from data. Easy. Stop carping and see if you can't learn XML and a little XSL. Maybe you could write an XSL stylesheet where Microsoft obviously can't be bothered. :-) Full tutorials at www.codehelp.co.uk so don't say you don't know how.
I thought the whole idea of xml documents was the you wouldn't have to write filters to read in the data.
No. The whole point with XML is that it can VALIDATE the incoming data stream so that the application can THEN apply the logic without coming across something broken, stupid or dangerous. The application STILL has to employ logic to assign the data from the right tag to the right memory structure. The application has to know what to do with each piece of data defined by XML - the XML cannot do that. It can be made easy or hard, but the application must do the work, not the XML. There is no way XML or any format can make data available to all applications, no matter what the type of data. It's easy to write an XML format for your own data, it gets harder to import a format written for another application. The advantage with XML is that it is plain text, it can be easily validated to reject simple errors and the naming of the tags helps developers adapt the data to their own application. That work still needs to be done - every application has to process the XML to work out how to relate the data to what it understands. There is no way application X can understand the XML from application Y unless this vital step is done. It can be done in XSL, so that the application developers don't have to make a new release, but writing an XSL stylesheet requires an understanding of BOTH XML formats - the original one and the one that the application already understands. XML makes this a whole lot easier, that's all. It's not magic.
If one program can't read the xml created by another program then the format is a complete an utter waste of time (imho) it might as well be a proprietry format for all the good it would do.
Rubbish. Re-examine your assumptions. XML is a superb format for data exchange, simply because it can be anything you need. It is easy to convert - but that's the crucial point - it still NEEDS to be converted at times. Read my XML tutorial at codehelp and set yourself straight on your faulty assumptions.
Completely as a side issue, if Mike Andrews happens to read this in an
...
the list. Thank god for procmail and /dev/null.
Enough of that. Do this off list by asking a friend to communicate with someone who has blocked your emails - rightly or wrongly. DO NOT irritate the rest of us! -- Neil Williams ============= http://www.dclug.org.uk/ http://www.nosoftwarepatents.com/ http://sourceforge.net/projects/isbnsearch/ http://www.williamsleesmill.me.uk/ http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3
Attachment:
pgp00018.pgp
Description: PGP signature