From: Philip E. <pe...@li...> - 2001-10-26 15:21:05
|
Cameron Laird wrote: > > The internal format has nice things like this: > > > > (line has been wrapped) > > > > <int_4s compression='9' format='base64' name='my_data' > > comment='this is my data'> ... </int_4s> > > > > So, I guess XML is to prevent us from writing non-portable > > but more readable formats. But I, for one, think maybe > > it's got a bit out of hand. > > . > > . > > . > > I, for a second, sure can't figure out some > > of the marketing perpetrated on XML's behalf. > > > > Back to technical matters: Phil, I don't > > understand of what the above is an example. > > Why can't it be XML? > > It is an example of a format that anybody involved in processing > numerical data can intuitively understand. The myth about XML is > that it is immediately interpretable by some magical interpreter, > and no magical interpreter will interpret the above example. > > QOTW? > . > . > . > Sure. > > The fragment above: it *can* be well-formed XML, right? > I still don't get your claim that your group invented a > syntax which is not XML. I understand that to mean there's > some syntax which violates XML, but which your group finds > better-than-XML. What's an example of that? Because there is no DTD. It is XML-like, but XML is just HTML-like, which is just like something else, etc. I guess it is nice to latch on to something and to say it can be all things to all people, but other than Tcl, I have yet to see any such thing. The XML people here screamed bloody murder about the "internal lightweight format" because their visual interpreter could not color syntaxify it. |
From: <Ste...@zv...> - 2001-10-25 23:52:45
|
Please use the SourceForge mailing list in future: tcl...@li... "Rajapurohit, Sunil" wrote: > I need to generate an XML document using a tcl script, how do i > go about generating the same ? When creating XML, I generally use TclDOM. Create a DOM tree in memory, and then use 'dom::DOMImplementation serialize $doc' to generate the XML. The TclDOM package will make sure that the generated XML is well-formed. Alternatively, XML is just text so there's no reason why you can't just create the string directly. Eg: puts "<document>$content</document>" The problem with this is that (a) you have to worrying about the XML syntax nitty-gritty and (b) the content variable may contain special characters which you have to deal with. There are also some generation packages available, like the 'html' package in tcllib (this will be added to TclXML RSN, when my workload permits). Hope that helps, Steve Ball -- Steve Ball | XSLT Standard Library | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Ste...@zv... +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 |
From: ski <sk...@eD...> - 2001-10-26 00:07:48
|
> > I need to generate an XML document using a tcl script, how do i > > go about generating the same ? as i read Sunil's post [and Steve's answer] i wondered out loud: "why XML?" Sunil talks of inventory data, can i assume a RDBMS holds this information? Sunil suggests [reading between the lines] the end result is to view this inventory data with a browser. so again, "why XML?" i have yet to write one line of XML. i use PHP to extract the proper data from any RDBMS and dispaly it in a browser. there is no 'middle' step. there is only [almost] real time access to the REAL data in the database. how does tcl and XML help in this scenario? -ski p.s. i am a huge fan of tcl... and do use it often in my PHP solutions. i just do not see the value of XML here. |
From: Philip E. <pe...@li...> - 2001-10-26 00:34:30
|
Without defending XML itself, it is trivially easy to convert XML to HTML ;^) That said, I would like to tell a little story. On our project, we intended to adopt XML as our lightweight data format, because it is supposed to be human readable. Unfortunately, our imagined idea of what XML looks like was naive; XML is not very readable!! We wound up adopting a special "internal" lightweight format that looks like we wished XML looked, and everybody who sees it can read it almost from the get-go. We also wrote conversion libraries that convert our internal format to XML, but it comes out so ugly that nobody ever does it. The internal format has nice things like this: (line has been wrapped) <int_4s compression='9' format='base64' name='my_data' comment='this is my data'> ... </int_4s> So, I guess XML is to prevent us from writing non-portable but more readable formats. But I, for one, think maybe it's got a bit out of hand. ski wrote: > > Sunil suggests [reading between the lines] the end result is to > view this inventory data with a browser. so again, "why XML?" |
From: Cameron L. <cl...@st...> - 2001-10-26 01:44:48
|
From tcl...@li... Thu Oct 25 19:45:53 2001 From: Philip Ehrens <pe...@li...> . . . The internal format has nice things like this: (line has been wrapped) <int_4s compression='9' format='base64' name='my_data' comment='this is my data'> ... </int_4s> So, I guess XML is to prevent us from writing non-portable but more readable formats. But I, for one, think maybe it's got a bit out of hand. . . . I, for a second, sure can't figure out some of the marketing perpetrated on XML's behalf. Back to technical matters: Phil, I don't understand of what the above is an example. Why can't it be XML? |
From: Steve C. <ste...@mq...> - 2001-10-26 03:26:17
|
On Fri, 26 Oct 2001 10:33, Philip Ehrens wrote: > Without defending XML itself, it is trivially easy to convert XML > to HTML ;^) > > That said, I would like to tell a little story. > > On our project, we intended to adopt XML as our lightweight > data format, because it is supposed to be human readable. > > Unfortunately, our imagined idea of what XML looks like was > naive; XML is not very readable!! Human readability isn't really one of XML's properties -- more like 'potential human decodeability' in that it's possible to use XML in such a way that the meaning of the structure is transparent. Of course it's also possible to use it to make data formats just as opaque as MSWord's binary format. One of my main motivations for using XML as a serialisation format is that it removes the need to invent a new format and write a parser for it. I'm bad at inventing new formats and when I've done it I've always found a little later that I need to extend it in some way that I didn't forsee. XML makes it much more likely that I'll be able to do that. It also means that I don't need to write the parser (of course this argument doesn't hold if you're Steve Ball :-) Steve |
From: Peter F. <pet...@zv...> - 2001-10-26 06:02:26
|
Steve Cassidy wrote: > > > Human readability isn't really one of XML's properties -- more like > 'potential human decodeability' in that it's possible to use XML in such a > way that the meaning of the structure is transparent. very true. > Of course it's also > possible to use it to make data formats just as opaque as MSWord's binary > format. sorry i have to disagree. I never seen xml from any source that was anywhere near obscure as MSWord's proprietary binary format .. Having said that, its true that anyone can make XML content more obscure than it needs to be by ignorance or lack of effort ... This leads me to some other benefits of XML - in an emergency I can _edit_ any arbitrary pieces of xml with just about any simple, ascii capable editor (i.e just about everything) on any platform without having to spend a cent. I doubt that you can compare MSW binary fmts and XML on any level. <PhilosophicalMode> For lots of reasons MSW document formats will never be ubiquitous, but XML has the chance to be. I think thats the key to improving our lot - ubiquitous technology </PhilosophicalMode>. > > One of my main motivations for using XML as a serialisation format is that it > removes the need to invent a new format and write a parser for it. I'm bad > at inventing new formats and when I've done it I've always found a little > later that I need to extend it in some way that I didn't forsee. XML makes it > much more likely that I'll be able to do that. a key feature - the promise of a ubiquitous array of standards based, extensible, portable tools for a wide range of document and data manipulation tasks. And dont get me started on the raft of applications and/or application instances that have expensive database backends (purchase cost / system resource or admin labour wise) when all they need is a decent filesystem and structured content .... > It also means that I don't > need to write the parser (of course this argument doesn't hold if you're > Steve Ball :-) All hail Steve "lets write our CMS in xslt" Ball - he is a guru 8-). I know he will gladly accept offerings at the TCLXML alter to ease his pain ;-) And I'd me amiss not to take this opportunity to remind everyone that as a Steve and I are very busy these days earning a quid with our company, so any help in writing parsers and assorted peripheral stuff is most welcome ... Peter Farmer | Custom XML software | Internet Engineering Zveno Pty Ltd | Website XML Solutions | Training & Seminars http://www.zveno.com/ | Open Source Tools | - XML XSL Tcl Pet...@zv... +------------------------+--------------------- Ph. +61 8 92036380 | Mobile +61 417 906 851 | Fax +61 8 92036380 |
From: ski <sk...@eD...> - 2001-10-26 11:52:51
|
> And dont get me started on the raft of applications and/or application > instances that have expensive database backends (purchase cost / system > resource or admin labour wise) when all they need is a decent filesystem > and structured content .... peter, if a small amount of time could be invested, and you think it of any value, please "do start" on a simple example of where you have used XML for an application. help me [and others?] understand its "calling" so to speak. my reseach has indicated that it can have value, but not in Sunil's scenario [and yes, i agree not enough info was given]. thanks -ski |
From: Philip E. <pe...@li...> - 2001-10-26 15:13:58
|
Steve Cassidy wrote: > > One of my main motivations for using XML as a serialisation format is that it > removes the need to invent a new format and write a parser for it. I'm bad > at inventing new formats and when I've done it I've always found a little > later that I need to extend it in some way that I didn't forsee. XML makes it > much more likely that I'll be able to do that. It also means that I don't > need to write the parser (of course this argument doesn't hold if you're > Steve Ball :-) Ah, but parsers are easy... interpreters are the hard part. |
From: <Ste...@zv...> - 2001-10-26 00:34:59
|
ski wrote: > > > > I need to generate an XML document using a tcl script, how do i > > > go about generating the same ? > > as i read Sunil's post [and Steve's answer] i wondered out loud: > "why XML?" Sunil talks of inventory data, can i assume a RDBMS > holds this information? > > Sunil suggests [reading between the lines] the end result is to > view this inventory data with a browser. so again, "why XML?" > > i have yet to write one line of XML. i use PHP to extract the > proper data from any RDBMS and dispaly it in a browser. there > is no 'middle' step. there is only [almost] real time access > to the REAL data in the database. > > how does tcl and XML help in this scenario? I don't think Sunil gives enough information about the application to answer this question (at least in a meaningful way - we can always debate the issues regardless ;-) The typical answer in this scenario is that the application is using XML as a data exchange language. XML is not necessarily the best way to *store* data (an RDBMS may be a better solution, my favourite DBMS would be MetaKit) but it is an excellent language for *transmitting* data. The benefits of using XML for data exchange are many, but include platform- and language-independence, structuring of data, etc, etc. The fact that Sunil wants to display the data in a browser does not preclude XML - you can do client-side transformations using XSL. Cheers, Steve Ball -- Steve Ball | XSLT Standard Library | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Ste...@zv... +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 |