W3C home > Mailing lists > Public > xproc-dev@w3.org > August 2011

Re: The XProc Quine

From: Mike Sokolov <sokolov@ifactory.com>
Date: Mon, 15 Aug 2011 09:42:00 -0400
Message-ID: <4E492228.3020305@ifactory.com>
To: David Lee <dlee@calldei.com>
CC: 'George Cristian Bina' <george@oxygenxml.com>, 'mozer' <xmlizer@gmail.com>, 'XProc Dev' <xproc-dev@w3.org>
I would have posted the shortest perl (and C) quine, but it's not 
printable.  Or from another perspective, it occurs infinitely many times 
in all these messages, being empty.  If only it were a valid XML 
document, sigh.


- Mike

On 08/11/2011 01:32 PM, David Lee wrote:
> Ok I had to put this in.  xmlsh Quine (providing it means what I think it
> does ...
>
> 	import commands posix
> 	cat "$0"
>
>
>
> ----------------------------------------
> David A. Lee
> dlee@calldei.com
> http://www.xmlsh.org
>
>
> -----Original Message-----
> From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] On Behalf
> Of George Cristian Bina
> Sent: Thursday, August 11, 2011 1:03 PM
> To: mozer
> Cc: XProc Dev
> Subject: Re: The XProc Quine
>
>
> Nice!
> Does this qualify as the second :) ?
>
> <?xml version="1.0" encoding="UTF-8"?>
> <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="1.0">
>       <p:documentation>
>           <p>(c) Syncro Soft / oXygen XML Editor 2011 - The second XProc
> Quine</p>
>       </p:documentation>
>       <p:output port="result"/>
>       <p:xslt template-name="main">
>           <p:input port="source"><p:empty/></p:input>
>           <p:input port="stylesheet">
>               <p:inline>
>                   <xsl:stylesheet
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
>                       <xsl:template name="main">
>                           <xsl:copy-of select="document('')"/>
>                       </xsl:template>
>                   </xsl:stylesheet>
>               </p:inline>
>           </p:input>
>           <p:input port="parameters"><p:empty/></p:input>
>       </p:xslt>
> </p:declare-step>
>
> Best Regards,
> George
>    
Received on Monday, 15 August 2011 13:42:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 15 August 2011 13:42:46 GMT