[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: genx - abstract output


using .sub files
On Jan 21, 2004, at 11:03 PM, Adam Turoff wrote:

> On Wed, Jan 21, 2004 at 09:55:34PM -0800, Tim Bray wrote:
>> So, *why* do you want to serialize it?  To write it to a file or down 
>> a
>> pipe to some other process, I'd say.
>
> Or a remote process through a socket.  Or stuffing into a database/DBM 
> file.

The DBMS case I grant.  Several people have said that there's an 
impedance mismatch between FILE * and sockets.  Weird, I try to talk to 
sockets through files whenever possible, and with fflush(), FILE * 
works fine.

>> Unless you're going to send it to
>> someone else, why don't you leave it in a data structure where it's
>> handy to traverse, manipulate, throw XPaths at, etc...
>
> Maybe I want to compress and/or base64 encode the data before I'm done.
> Maybe I want to transcode the output before writing it to a file.

The notion of transcoding XML *away* from UTF-8 seems highly bizarre.  
But don't pipes provide a high-quality solution to 80% of the small 
proportion of cases where you want to do further processing on the XML 
on the way out?

> FILE * is a perfect, simple interface that hits upwards of 80% of the
> usage scenarios.  My point is that it's not 100% of those scenarios, 
> and
> I don't think genx should make a value judgement that these situations
> shouldn't be able to serialize to valid XML.

If I were convinced of the 80% number, the argument would be over.  
Because if genx hits an 80/20 point, I'll be more than happy.  David 
Tolpin & others have got me worried that the non-FILE * use cases are 
more than that.

> So here's the $64 question: is it more important that genx be useful in
> a wide range of situations, or is it more important that genx 
> absolutely
> guarantee that it always produces valid XML or fails?

I want both of course :)

> Unless I'm missing something totally obvious, using FILE * creates an
> impedence mismatch with raw sockets.

So, now I've heard two real arguments against FILE *: preparing the 
text for storing into a DBMS, and using sub-file-level socket 
operations.  Hmph. -Tim


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.