OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] genx - abstract output

[ Lists Home | Date Index | Thread Index ]

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





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS