Re: XML and XSLT Praise
"Peter Gummer" <p-gummer-bzGI/[email protected]> Thu, 29 May 2008 00:10:44 +1000
| Newsgroups | gmane.comp.lang.eiffel.gobo.general |
|---|---|
| Message-ID | <6B326E6B30E443ECB87D1EDD1686C211@PETERNOTEBOOK> |
Hi Brian, I'm not Colin or Eric (obviously), but I am a happy recent user of the Gobo XML classes. A couple of weeks ago I was asked to generate a simple, dumb report in the easiest possible way, just to excite some customers. It didn't have to be fancy, so I was told that plain text would be fine; but knowing that these customers make heavy use of XML, I figured it would be just as easy and a lot more impressive if I generated an XML report. So I set to it, never having used the Gobo XML classes before. I wanted to build an XML DOM in memory and then write it to a file: something I'd done before in other languages, so I knew it should be easy. The documentation at www.gobosoft.com is minimal, and didn't tell me how to do this task. So I looked at the examples, and I found enough clues to get me going. Within two hours, I had it all working: the user selected a menu option in our EiffelVision application, specified where to put the XML file via a File Save dialog, and the XML DOM was built and serialised. It even formatted the XML reasonably nicely. It was as easy as I had hoped! Since then I've spent another twenty hours adjusting the XML's formatting and getting it to display via an XSL transform in a web browser. Typical: the initial job takes almost no time, but tidying up the details takes forever! All through this, the XML classes have been nice to work with. Just a couple of days ago I figured out quite easily which class to use to add a processing instruction node at the top of the XML to specify the XSL stylesheet. It just worked. The only problem I had was with the Gobo XSLT classes. After I had produced the initial XML report, I decided to transform it into an HTML file via an XSLT script, with the help of the Gobo XSLT classes. The XSLT classes have a tutorial, and there was a good example for me to imitate, so with care I was able to get it working after two or three more hours. Nonetheless, using the Gobo XSLT classes was trickier than using the Gobo XML classes. Having done a similar job recently with the .NET XSLT classes, I have to say the .NET classes are easier to use. This is partly because the .NET documentation has better simple examples, but also because Gobo's XSLT requires more code to achieve the same result. But I was happy with the end result, except for one thing: as soon as I added the first reference to a Gobo XSLT class and hit F7, EiffelStudio went away for several minutes and sucked in a huge number of new classes. The build time for a finalized build tripled, and the size of the finalized executable blew out from 7 MB to 17 MB. Twenty lines of code costing 10 MB! This is almost as bad as EiffelCOM! I guess the convenience of having a full-blown XSLT interpreter inside my application comes at a big cost. I reconsidered this approach, and when I discovered that I could get the same end result simply by putting a processing instruction node at the top of the XML, with great relief I removed the Gobo XSLT classes from the application. They seem to do the job well, but they aren't cheap! I have no experience with gexslt, except that I used it when I was initially trying to write my XSLT script for this job, and it worked. It's not clear to me what the advantages of gexslt are. It doesn't seem to like XSLT 1.0: putting 2.0 in the XSLT script pacifies it. So that's one person's very recent introduction to Gobo XML and XSLT. I didn't push it hard, but it did what I needed :-) - Peter -------------------------------------------------- From: "Brian Heilig" <Brian.Heilig-tdt4z+Mb/[email protected]> Sent: Wednesday, May 28, 2008 11:15 PM To: <[email protected]> Subject: [gobo-eiffel] XML and XSLT Praise > Dear Colin and Eric, > > Next Friday I will be pitching Eiffel to a development team at ITT > Space Systems. They make heavy use of XML and I was hoping you could > send me a list of advantages for the Gobo Eiffel XML and XSLT > libraries and tools. Also, if you have any personal credentials please > list those too (I think you once said that you were a member of some > board). > > Thank you so much, > Brian