cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Collen <colle...@umn.edu>
Subject Re: [RT] The perfect repository might be just under your eyes
Date Tue, 15 Jul 2003 20:40:00 GMT
Stefano Mazzocchi wrote:

> NO! that's the beauty
> 
>  echo "application/xml" > /document/@mime-type
> 
> Voila' ;-)
> 
> Actually, even better
> 
>  echo "xml" > /document/@syntax
>  echo "text/xhtml" > /document/@mime-type
> 
> because MIME is getting it all wrong with this stupid +xml by mixing 
> concerns between the syntax and the semantics.
> 
> Do you see the potential?
> 
>> The obvious question is what happens when you try to do an xpath 
>> expression on a file that is not XML.  Perhaps the filesystem module 
>> would know enough to check for <?xml version="1.0"?> ?
> 
> 
> ARRRRRGGGG!
> 
>>
>> Lots of potential though :)  Maybe you could tie a service to a 
>> virtual device.  Like /dev/xupdate or /dev/xalan, and output to > STDOUT?
>>
> 
> That's much better talking, bro ;-)

More RTing:

Imagine having an XSL processor in the kernel:

You could "execute" .xsl files, bypassing having to run a processor manually.

prompt$ page2html.xsl < input.xml > output.html

Borrowing the pipeline concept from Cocoon:

prompt$ cat input.xml | page2foo.xsl | foo2bar.xsl | bar2html.xsl > output.html

One could even invent files which are actually transformation pipelines -- ones which you
might not 
be able to directly edit (or maybe be able to edit a transformation in the middle):

prompt$ make-virtual-file-pipeline virtual.xml --generator=input.xml 
--tranformers=page2foo.xsl;foo2html.xsl --serialize=text/xml

Now you can just go

prompt$ cat virtual.xml

And get the output of the pipeline defined above, which you can then link to other pipelines,
etc.

It's no wonder that this all fits in very well with what Cocoon does, since Cocoon is patterned

after this concept.  I'm sure if I stew on this concept enough I'll come up with more ideas
and uses.

Tony



Mime
View raw message