[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

is this a quine ?

Michael Kay mike at saxonica.com
Tue Jun 24 10:52:35 PDT 2008

  is this a quine ?
The result of your query is a sequence of three strings. When you run a
query from the Saxon command line it is by default serialized using the XML
output method. That's a feature of the Saxon command line interface, if you
use a different interface (or use different options) you can get different

Michael Kay

> -----Original Message-----
> From: http://x-query.com/mailman/listinfo/talk 
> [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf Of James Fuller
> Sent: 24 June 2008 09:27
> To: http://x-query.com/mailman/listinfo/talk
> Subject:  is this a quine ?
> Is this a quine ?
> ---------------------------------
> xquery version "1.0";
> declare variable $s:='xquery version "1.0"; declare variable 
> $s:="";fn:substring($s,1,44),$s,fn:substring($s,45)';
> fn:substring($s, 1,44),
> $s,
> fn:substring($s,45)
> ---------------------------------
> running this through saxon I get;
> ---------------------------------
> <?xml version="1.0" encoding="UTF-8"?>xquery version "1.0"; 
> declare variable $s:=" xquery version "1.0"; declare variable 
> $s:="";fn:substring($s,1,44),$s,fn:substring($s,45)
> ";fn:substring($s,1,44),$s,fn:substring($s,45)
> ---------------------------------
> so barring whitespace issues .. the only problem is the need 
> to use a processor specific option to control output of 
> version/encoding ....
> not very nice that.
> to the point; I am a little confused with this default 
> behavior; isn't the result of a query a sequence of nodes and 
> atomic values ... is this behavior specified or left to the 
> implementator to decide ?
> cheers, Jim Fuller
> _______________________________________________
> http://x-query.com/mailman/listinfo/talk
> http://x-query.com/mailman/listinfo/talk


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.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
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.