Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

XML comments >> implications for R3

 [1/13] from: jasonic::nomadics::org at: 9-Sep-2007 11:27


Carl's points about XML are all quite valid and pertinent- but the story does not end there, and he left some important things out... a ~ Like it or not XML is widely used as a structuring markup for transport between systems, languages etc. It's the interoperability that counts. REBOL is glorious but thus far little known or used in the world. The smartest most elegant best solution is not the only criteria we need to consider. Sorry {truly} b ~ It may be boring and verbose, but it is also easy to understand, especially for machines and scripts written by humans for programs and machines. Cool uses of XML in the world ? RSS syndication, XMLRPC and Jabber [XMPP]... en.wikipedia.org/wiki/*RSS*_(file_format) en.wikipedia.org/wiki/XML-RPC www.jabber.org/ en.*wikipedia*.org/wiki/Extensible_Messaging_and_Presence_Protocol c ~ There are numerous libraries now for passing using XML more easily and more efficiently. And there are some superb XML editors which quite transform the job -- OXYGEN, XMLSpy, Stylus Studio for example: www.*oxygenxml*.com www.Altova.com/*XML*Spy www.stylusstudio.com/*XML-Tools* To really enjoy the benefits one must try out the the advanced pro versions of these [not free but can download demos]. Awesome in these are the schema and XSLT handling functions. For example open an XML file and immediately parse and generate a valid Schema. Save. Now go write a new XML file using that schema -- et voila -- really nice in-line prompts make this a joy. Now switch to another view like a grid or hide the <tag> structured part of the code.. ahha yes yes this makes sense and takes the pain away to reveal the gains. d ~ Trends are clearly towards much more powerful friendly intelligent ways to handle it - XML object serialization, JSON, E4X. http://www.json.org/ For example E4X is the new ECMAscript [Javascript] extension which at last provides a sane and sensible alternative.. * |<order id="1234"> <customer><name>Joe Green</name> <address><street>410 Main</street> <city>York</city><state>VT</state> </address> </customer> <item>. . .</item> <item> <make>Acme</make> <model>Framistat</model> <price>2.50</price> <qty>30</qty> </item> </order>| * |var address = order.customer.address;| * |var second = order.item[1];| * |second.total = second.qty * second.price;| * * |var order = <order><customer>. . .</customer> <item><price>5</price><qty>10</qty></item> <item level="rush"> <price>2.5</price> <qty>30</qty> </item> <item level="rush"> <price>1.5</price> <qty>50</qty> </item> </order>;| * |var items = order.item; // XMLList of item el'ts | * |var prices = order..price;| * |var urgentItems = order.item.(-level == "rush");| * |var itemAttrs = order.item[0].-*;| yes linear dotted notation parses the structure by NAMEs - symbol accesses XML attributes cleanly [hooray] .. double dots get multiples [] access array items by index * wildcards do what you need them to inclusion of variables etc etc use E4X to read and write :-) http://en.wikipedia.org/wiki/E4X Nice slide show at http://developer.mozilla.org/presentations/xtech2005/e4x/ e ~ AS3 Actionscript 3 now includes E4X . Flash and Flex, AIR programmers can all benefit. Good news is that Adobe after buying Macromedia built it into the free cross platform Flash9 runtime player and then open sourced it :-) So this important gift-back by Adobe is now called TAMARIN, open source implementation of ECMAscript, a free virtual machine and just in time compiler http://www.mozilla.org/projects/tamarin/ http://en.wikipedia.org/wiki/Tamarin_(JIT) f ~ Those hideous XML tags vs. Attributes In most examples people provide of how horrible is XML, they show only nested tags for ever and from hell. This makes a point, but in reality using XML attributes _appropriately_ instead of tags in the XML source makes it much easier to understand, and far less verbose. g ~ XSLT and REBOL Although it is not very pretty XSLT actually has a *lot* in common with rebol h ~ What's next ? Well I hope that R3 provides a really smooth path for XML input and output - truly compatible with the new E4X approach ** Finally Adobe 'Tamarin' and open sourcing of Flash/Flex opens up the game for Rebol graphic options. I'm thinking it might be a modest investment now which could update Oldes brilliant Rebol/Flash dialect and integrate it into the R3 official GUI toolbox ** http://oldes.multimedia.cz/swf/ Jason

 [2/13] from: ale870::gmail::com at: 9-Sep-2007 17:58


Hello, regarding XML. Even if I think XML support can be important, I hope that Rebol will never concentrate its functioning over xml self. Since Rebol blocks are more flexible, easier to read, etc... Furthermore, there is no need to use a special editor to edit Rebol blocks ;-). Many editors exist for XML even because XML is not so easy to be red when contains a lot of data. Javascript? Well, if you compare Rebol and Javascript, it means you did not get the full power of Rebol. Furthermore is difficult to compare an imperative language with a functional language. (just my opinion. If I understood what you said. Sorry, I'm italian and sometimes I have problems to read English). On 9/9/07, Jason Cunliffe <jasonic-nomadics.org> wrote:
> Carl's points about XML are all quite valid and pertinent- but the story > does not end there, and he left some important things out...
<<quoted lines omitted: 106>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- //Alessandro http://sguish.wordpress.com http://laccio.wordpress.com

 [3/13] from: moliad:gm:ail at: 9-Sep-2007 22:15


I fully support Jason's views. he is not trying to say XML is good or better than anything... only that its actually being used. Its dumb enough that any idiot can grasp an XML file itself, and in fact a good reason why its like it is. any thing not XML compatible in 2007, is well, pretty irrelevent in the larger world of computing. having XML i/o in REBOL is something which should be addressed natively, but as an external module. link to any xml lib out there, and just abuse it freely. any one doing large scale developpment, cares 0% for the transport, they just want it to get in and get out. what happens in between is REBOL's strength. right now... implementing REAL xml is a MAJOR pain in REBOL. I know cause I spent 3 months reading the xml w3c 80 page "summary" implementing a schema validator natively in REBOL (private, closed source effort) and its a HELLISH endeavour. it works, but not everything is included, simply cause there is SO MUCH to implement and because half of the spec is useless ... you can just structure your schema differently to get the same xml document in many cases. just namespacing is enough to keep you from keeping 100% of your sanity. -MAx On 9/9/07, Alessandro Manotti <ale870-gmail.com> wrote:

 [4/13] from: moliad:gm:ail at: 9-Sep-2007 22:16


Hi Jason, what post or html doc are you referring to? -MAx On 9/9/07, Jason Cunliffe <jasonic-nomadics.org> wrote:

 [5/13] from: moliad::gmail::com at: 9-Sep-2007 22:21


no botter, I just read through the postcript/pdf/xml bout :-) -MAx On 9/9/07, Maxim Olivier-Adlhoch <moliad-gmail.com> wrote:

 [6/13] from: ale870:gmai:l at: 10-Sep-2007 7:49


he is not trying to say XML is good or better than anything... only that its actually being used. Its dumb enough that any idiot can grasp an XML file itself, and in fact a good reason why its like it is. Yes I know what you say, but I think XML is not "famous" only because anybody can work with it. I think XML is famous because the BIG companies decided that it had to be famous. Furthermore because Ms$ used it in SOAP technology. XML is used everywhere, even in places where it is not needed (instead sometimes it creates some more problems). XML is not easy (if used using it's true power), and the programs spend many resources to compose or parse it. Sometimes XML could be substituted by simply ini files or JSon metalanguage. But the BIG companies did not make publicity about it. That's the problem. I want to tell you a small story (a true story, you can find it at my site http://sguish.wordpress.com (sorry but it is in Italian language) ). Some times ago a friend of mine told me that he wanted to try to make an application using Rebol (I suggested to use it, and I'm helping him to reach his target). He told me he wanted to create an accounting application but he wanted to use a db made in xml. The problem was that Rebol does not support XML. So I suggested him to use native Rebol ways (blocks, hash, lists, series, RebDB, etc...). If Rebol would support xml, maybe he started to create his application without tell me anything (regarding xml) using a wrong approach (it could happen since BIG companies told us that xml is good for everything). I'm happy that Rebol does not support full xml (Rebol support tags management): in this way this boy now is using the correct tool! So I don't want to say that xml is the devil, but many people use it in the wrong way. And in this scenario I think Rebol is going in the right way (the same thing is true for rebol services and web services). On 9/10/07, Maxim Olivier-Adlhoch <moliad-gmail.com> wrote:
> no botter, I just read through the postcript/pdf/xml bout :-) > -MAx
<<quoted lines omitted: 19>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- //Alessandro http://sguish.wordpress.com http://laccio.wordpress.com

 [7/13] from: moliad::gmail::com at: 10-Sep-2007 2:49


xml is just a file format. file as in "data" (not actual hardcopies). the fact that some idiots made DB which is accessed and stored totaly in XML is well, laughable... but let them. I store some data in xml (cause its used as such internally by all systems, so its more efficient not to convert it all the time), but not in an XML db as such. people have a right to be slow, inefficient, costly, it lets us be quick and run around them. but xml is about one common format for everyone and any tool. and as jason described, the tools which work with xml really are starting to deliver. many people don't even "see" the actual xml files, anymore. I know how you feel, really I do. In my own tests, xml can be double to 10 times the size of the same data with no compression, using rebol blocks. but in the real world, we need to speak to other systems. and I can tell you that it could be a hell of a lot worse than XML. :-) For me, the bad side is when people see xml as something else than a format , a way to interchange. unfortunately, xml has become a golden hammer. its an end-all buzz word for many of those un-skilled and non-programmer managers, who buy stuff from clueless salesmen who know only that they have to push this "thing" their boss tells them to. remember, the known evil is infinitely less dangerous than the unknown itself. -MAx On 9/10/07, Alessandro Manotti <ale870-gmail.com> wrote:

 [8/13] from: carlos:lorenz::gmail at: 10-Sep-2007 10:12


For me, the bad side is when people see xml as something else than a
> "format", a way to interchange. unfortunately, xml has become a golden > hammer. its an end-all buzz word for many of those un-skilled and > non-programmer managers, who buy stuff from clueless salesmen who know > only > that they have to push this "thing" their boss tells them to.
I agree with you. XML is in most CV/Resumes I have seen lately. Itīs quite a *MUST*. And sadly there is a lot of people that also consider it as a programming language :( -- Carlos Lorenz www.revistaeletronica.com.br Unidade Lorenz Ltda (11) 4034 1971

 [9/13] from: greg:schofield:iinet:au at: 10-Sep-2007 22:19


Carlos: And sadly there is a lot of people that also consider it as a programming language I very much agree, from the opposite point of view , that is via XML as a format. Originally processor instructions were allowed in XML, but more or less discouraged. As a web substitute for adhoc HTML scripts were introduced haphazardly. In my opinion script has no place in a XML format, unless of course it is used to render scripts into an editable and passive form. Where REBOL may have an important and simplifying contribution is in taking scripts out of XML altogether. It depends very much on how a REBOL plugin might work in alien browsers. Whether REBOL might become a rendering engine, or stylesheet processor of some kind. I don't know if such a thing is even possible (well everything is possible, but money and time might be excessive). Script actions belong not in XML but in a stylesheet that describes how the XML will be displayed and used. It is that simple. The stylesheet is a script, XML is a structural map. It should be used as a map, and the script should identify where things might happen. Consider simple hypertext jumps. At the moment a URL is placed within the XML as an button, which is handy, but in terms of structure does a reference really need to be implanted, is it good practice? I don't think so, not when we have an established system of footnoting which places the references typographically separate from the reference point. It makes little difference to the web, but try printing it out while preserving the references =96 they disappear! Yet they could all be grouped traditionally within their own structure (hidden in web use, but made visible when printing (perhaps at the bottom of the page, end of the section or end of the document =96 but not disappearing as is the case now). Put the code that attaches a reference to a web address in a stylesheet and the link activation does exactly what a present href does, but the reference itself is elsewhere =96 structurally separate. Same with ActiveX type controls =96 they don't have to be, and make little sense in being in a printed version, inserted directly into the XML itself they are a mess to be placed in the rendered XML through a script makes more sense, at least to me. REBOL might provide the means of keeping data format clean and separate from rendering and for many web pages no XML is really required (though I believe any text, beyond a sentence, or label, should be properly marked-up for typographical use at least =96 that does not need a full XML document however) Cleaning-up XML as a format may seem a modest enough objective, but separating data from process is an important thing, data permanency may not be important to 9/10ths of the web, but it is damn important for preserving literature in digital form =96 processing instructions of any kind corrupt this potential. Clean REBOL XML may be an approach that may meet with some niche interest, but I think the implications are greater than that. Plus with dialecting being such a strong part of REBOL, integrating minimal structural markup is not such a big issue (it does not corrupt more efficient scripting methods in normal REBOL). Just some thoughts sorry for the long post. Greg Schofield Perth Australia --- Message Received --- From: Carlos Lorenz <carlos.lorenz-gmail.com> To: rebolist-rebol.com Reply-To: rebolist-rebol.com Date: Mon, 10 Sep 2007 10:12:44 -0300 Subject: [REBOL] Re: XML comments >> implications for R3 For me, the bad side is when people see xml as something else than a
> "format", a way to interchange. unfortunately, xml has become a golden > hammer. its an end-all buzz word for many of those un-skilled and > non-programmer managers, who buy stuff from clueless salesmen who know > only > that they have to push this "thing" their boss tells them to.
I agree with you. XML is in most CV/Resumes I have seen lately. It=B4s quite a *MUST*. And sadly there is a lot of people that also consider it as a programming language :( -- Carlos Lorenz www.revistaeletronica.com.br Unidade Lorenz Ltda (11) 4034 1971

 [10/13] from: edoconnor:g:mail at: 10-Sep-2007 11:01


If the Rebol community grows significantly, the technical problems between XML and Rebol can probably be solved. Rebol has issues that XML does not have (adoption, licensing, not 100% open source), and XML has issues that Rebol does not have (bloat, complexity, technical shortcomings). Despite XML's problems, however, its future is secure. Rebol could benefit by helping programmers minimize XML's flaws. This is in total alignment with Rebol's role of helping programmers minimize complexity across the spectrum of today's IT environment (cross network/enterprise, heterogenous platforms, highly customized systems, federated applications/platforms). In my opinion, citicizing XML and/or pushing Rebol as a disruptor or potential replacement for XML is not likely to produce a positive, pro-solution message for Rebol. My $.02. Ed

 [11/13] from: rasmussen::bryan::gmail::com at: 10-Sep-2007 20:06


well I basically gave rebol up because I have to do XML related tasks all day long. If Rebol had hooks to the LibXML, LibXSL libraries http://xmlsoft.org/ all these problems with using XML in the language disappear. I don't want to get in a flame war about it, but this is my basic requirement, and that there are other languages that provide my basic requirement out of the box means that I go with them (not libxml integration but XML/Namespaces/XPath/XSL-T/DOM/Streaming API of some sort). I'm also something of an anomaly among working programmers because I am luckily allowed to choose languages suitable to tasks - most of the time at any rate. Best Regards, Bryan Rasmussen On 9/10/07, Ed O'Connor <edoconnor-gmail.com> wrote:

 [12/13] from: ale870:g:mail at: 11-Sep-2007 7:33


Do you know if Isn't there any DLL (or .a lib) to be used from Rebol to fully parse XML using DOM or SAX style? On 9/10/07, bryan rasmussen <rasmussen.bryan-gmail.com> wrote:
> well I basically gave rebol up because I have to do XML related tasks > all day long. If Rebol had hooks to the LibXML, LibXSL libraries
<<quoted lines omitted: 37>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- //Alessandro http://sguish.wordpress.com http://laccio.wordpress.com

 [13/13] from: rasmussen::bryan::gmail::com at: 11-Sep-2007 7:51


well DLL would be MSXML. It provides DOM, XSL-T 1.0, XPath 1.0, and XML Schema access. LibXML is the predominant C solution, but Expat comes a close second: http://expat.sourceforge.net/ The apache project provides C++ versions of some of their XML tools, so for example Xerces C++. Cheers, Bryan Rasmussen On 9/11/07, Alessandro Manotti <ale870-gmail.com> wrote:

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted