﻿<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">XQuery Talk Mailing List</title><subtitle>A mailing list for practical discussion about XQuery: a place to work together to learn a new language, talk about problem solutions, discuss engines and implementations, chat about the latest announcements, and so on.</subtitle><rights>Copyright 2004-2006 Progress Software Corporation. All Rights Reserved.</rights><link rel="alternate" type="text/html" hreflang="en" href="http://www.stylusstudio.com/blogs/xquerytalk/" /><link rel="self" type="text/xml" href="http://www.stylusstudio.com/feeds/atom/?f=2" /><id>http://www.stylusstudio.com/feeds/atom/?f=2</id><author><name>Stylus Studio</name><email>stylusstudio@stylusstudio.com</email></author><updated>2009-11-20T18:16:00Z</updated><entry><title>  [Announce] Poll for hands-on XML training offerings
 in Europe Q1'2010 (XQuery Talk)
   </title><id>http://www.stylusstudio.com/xquerytalk/200911/003627.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200911/003627.html" /><updated>2009-11-19T10:05:37Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Please ignore the following if you have no interest in XML-related training.

In Q1'2010 I will be in Europe a couple of times for some standards 
meetings (<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/super_catalogs.html">OASIS</a> and ISO) and conferences ( http://www.XMLPrague.cz 
and PEPPOL) and I like to take advantage of my presence there by 
offering Crane's hands-on training classes in the week before or 
after each of the events, open to public subscription.

I'll be in Copenhagen in February and in Prague and Stockholm in March.

But it is a gamble to decide on which training class to offer and 
find no-one is interested in that particular topic, because of hotel 
and event obligations that need to be paid in advance or reserved 
with the risk of forfeit.  We realize not many people in these 
economic times have money for training, so we are now trying to 
target our offerings specifically where we learn there is demand and 
availability of students.

Last year's http://www.XMLPrague.cz conference was great and we did 
our training adjacent to the conference and our students were 
conference attendees.  The venue we have chosen again in Prague next 
year has room for only 6 students (a large 14th century hotel room), 
so if <a title="Sign up for The Stylus Studio Webinar" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/quickstart/">XML training</a> at this time of year and in conjunction with the 
conference is of interest to you, it would be important to sign up 
your interest soon.

To address this urgency to start making plans, I am polling the 
various XML lists for any interest in training in these cities early 
next year.  If you are interested in hands-on training on any of 
XSLT, XQuery, <a title="XSL-FO" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xsl_fo.html">XSL-FO</a>, the <a title="Universal Business Language" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/ubl/index.html">Universal Business Language</a> or <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/edifact/">code lists</a> 
in XML, and you would be interested in attending, please let us know 
and we will figure out what we can do.  To see the proposed dates, 
please visit:

   http://www.CraneSoftwrights.com/forms/interest.php
   (the page has links to syllabi)

On the form, please indicate all of the offered dates that you would 
be interested in, and we'll make a decision based on the response 
level we get for each class and date.

Thanks!  Please direct any questions to me off-list.

. . . . . . . . . Ken

p.s. it hasn't been decided but I might be in Perth Australia in 
January or February, so you won't see it on the form, but if you are 
in that area, please let me know in a mail message if you are 
interested in training on any of our subjects and we'll see about 
setting up a publicly-subscribed class.

cc: XML-Dev, XSL List, XQuery Talk, XML-Doc, UBL Dev, CLR Dev, 
Antenna House list, <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/renderx/xep.html">RenderX</a> list, MarkLogic list

--
Vote for your XML training:   http://www.CraneSoftwrights.com/q/i/
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/q/
Training tools: Comprehensive interactive XSLT/<a title="XML XPath Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath 1.0</a>/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&amp;fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&amp;fmt=18
G. Ken Holman                 mailto:http://x-query.com/mailman/listinfo/talk
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/q/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

</PRE>
]]></content></entry><entry><title>  XQuery in Web 2.0 Expo in NY
   </title><id>http://www.stylusstudio.com/xquerytalk/200911/003626.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200911/003626.html" /><updated>2009-11-10T17:04:13Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Dear all,

there is a BOF session organized in the Web 2.0 Expo in New York
next week about the role of <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> in the architecture for
new Web .20 applications.

If you are interested, please join.

Information bellow:


  Nov 16-19  at the Javits center for the Web 2.0 expo and conference :
             There is an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> BOF (Birds of a Feather) at the Westin  
Times Square (270 West 43rd Street) on Tuesday evening at 8pm in room  
Nederlander - see
                   http://www.web2expo.com/webexny2009/public/schedule/stype/BoF
                  http://www.web2expo.com/webexny2009/public/schedule/detail/11318


There is a free registration for this Web 2.0 event - see:
                   http://www.web2expo.com/webexny2009/public/content/whats-free 
    - EXPOPASS



Best regards
Dana
</PRE>
]]></content></entry><entry><title>  XQuery count()
   </title><id>http://www.stylusstudio.com/xquerytalk/200911/003624.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200911/003624.html" /><updated>2009-11-09T20:09:39Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,

&gt;<i> I need to count the total number of distinct collections in my db (eXist <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a>
</I>&gt;<i> Database).
</I>&gt;<i> How can i do this in a compact way using <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>?
</I>
This won't be possible without <a title="Using Saxon and EXSLT" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt/exslt.html">using extension functions</a>. Different
systems will have different ideas of what constitutes a &quot;collection&quot;
(which can be queried with fn:collection). In eXist, you could use a
recursive approach:

import module namespace xdb=&quot;http://exist-db.org/xquery/xmldb&quot;;

declare function local:scan-collection($collection) {
  $collection,
  for $child in xdb:get-child-collections($collection) return
local:scan-collection(concat($collection, &quot;/&quot;, $child))
};

local:scan-collection(&quot;/db&quot;)

The following solution is much shorter, but it might be slower:

distinct-values(
  for $doc in collection(&quot;/db&quot;)
  return util:collection-name($doc)
)

Wolfgang
</PRE>
]]></content></entry><entry><title>  XQuery count()
   </title><id>http://www.stylusstudio.com/xquerytalk/200911/003625.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200911/003625.html" /><updated>2009-11-09T19:24:51Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Thanks to all.
Both Wolfgang approaches work well.

Regards!

2009/11/9 G. Ken Holman &lt;http://x-query.com/mailman/listinfo/talk&gt;

&gt;<i> At 2009-11-09 18:55 +0000, Ricardo Queir&#243;s wrote:
</I>&gt;<i>
</I>&gt;&gt;<i> I need to count the total number of distinct collections in my db (eXist
</I>&gt;&gt;<i> XML Database).
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i> How are you defining &quot;distinct&quot; in your situation?  There are many possible
</I>&gt;<i> ways:  string value, tree structure, tree structure of string values, etc.
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>  How can i do this in a compact way using <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>?
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Consider using deep-equal() ... if you have two root nodes, say in $a and
</I>&gt;<i> $b, you can get true/false with deep-equal( $a, $b ) and it will check the
</I>&gt;<i> tree structure and the node values in the tree structure and things like
</I>&gt;<i> attributes will be checked regardless of their order (because attributes in
</I>&gt;<i> XML documents are unordered).
</I>&gt;<i>
</I>&gt;<i> But be aware this is an &quot;expensive&quot; function, and could take up a lot of
</I>&gt;<i> processing resources to accomplish the comparison.
</I>&gt;<i>
</I>&gt;<i> I hope this helps.
</I>&gt;<i>
</I>&gt;<i> . . . . . . . . . . . Ken
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> Upcoming:  hands-on <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>, XQuery and <a title="XSL-FO" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xsl_fo.html">XSL-FO</a> Washington DC Nov 2009
</I>&gt;<i> Interested in other classes?  http://www.CraneSoftwrights.com/q/i/
</I>&gt;<i> Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/q/
</I>&gt;<i> Training <a title="tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a>: Comprehensive interactive XSLT/<a title="XML XPath Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath 1.0</a>/2.0 <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_videos.html">video</a>
</I>&gt;<i> Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&amp;fmt=18
</I>&gt;<i> Video <a title="overview" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_feature_overview.html">overview</a>:  http://www.youtube.com/watch?v=VTiodiij6gE&amp;fmt=18
</I>&gt;<i> G. Ken Holman                 mailto:http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/q/bc
</I>&gt;<i> Legal business disclaimers:  http://www.CraneSoftwrights.com/legal
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>


-- 
Ricardo Queir&#243;s
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091109/48f7cd3a/attachment.htm
</PRE>
]]></content></entry><entry><title>  XQuery count()
   </title><id>http://www.stylusstudio.com/xquerytalk/200911/003622.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200911/003622.html" /><updated>2009-11-09T18:55:18Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,

I need to count the total number of distinct collections in my db (eXist <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a>
Database).
How can i do this in a compact way using <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>?

Thanks!


-- 
Ricardo Queir&#243;s
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091109/43319729/attachment.htm
</PRE>
]]></content></entry><entry><title>  XQuery count()
   </title><id>http://www.stylusstudio.com/xquerytalk/200911/003623.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200911/003623.html" /><updated>2009-11-09T14:07:10Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>At 2009-11-09 18:55 +0000, Ricardo Queir&#243;s wrote:
&gt;<i>I need to count the total number of distinct 
</I>&gt;<i>collections in my db (eXist XML Database).
</I>
How are you defining &quot;distinct&quot; in your 
situation?  There are many possible ways:  string 
value, tree structure, tree structure of string values, etc.

&gt;<i>How can i do this in a compact way using <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>?
</I>
Consider using deep-equal() ... if you have two 
root nodes, say in $a and $b, you can get 
true/false with deep-equal( $a, $b ) and it will 
check the tree structure and the node values in 
the tree structure and things like attributes 
will be checked regardless of their order 
(because attributes in XML documents are unordered).

But be aware this is an &quot;expensive&quot; function, and 
could take up a lot of processing resources to accomplish the comparison.

I hope this helps.

. . . . . . . . . . . Ken


--
Upcoming:  hands-on <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>, XQuery and <a title="XSL-FO" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xsl_fo.html">XSL-FO</a> Washington DC Nov 2009
Interested in other classes?  http://www.CraneSoftwrights.com/q/i/
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/q/
Training <a title="tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a>: Comprehensive interactive XSLT/<a title="XML XPath Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath 1.0</a>/2.0 <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_videos.html">video</a>
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&amp;fmt=18
Video <a title="overview" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_feature_overview.html">overview</a>:  http://www.youtube.com/watch?v=VTiodiij6gE&amp;fmt=18
G. Ken Holman                 mailto:http://x-query.com/mailman/listinfo/talk
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/q/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


</PRE>
]]></content></entry><entry><title>  XQuery Implementation for PHP
   </title><id>http://www.stylusstudio.com/xquerytalk/200911/003621.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200911/003621.html" /><updated>2009-11-04T10:03:02Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>look like &quot;soup from stone&quot; (or nails or axe - depend from country)  -
php should leave our lives at all

Stephen Leacock  - &quot;I detest life-insurance agents: they always argue
that I shall some day die, which is not so.&quot; -
http://www.brainyquote.com/quotes/authors/s/stephen_leacock.html


2009/11/4 William Candillon &lt;http://x-query.com/mailman/listinfo/talk&gt;:
&gt;<i> Hello,
</I>&gt;<i>
</I>&gt;<i> The PHP <a title="bindings" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a> are featured in an IBM developerWorks article:
</I>&gt;<i> http://www.ibm.com/developerworks/<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>/library/x-zorba/index.html.
</I>&gt;<i>
</I>&gt;<i> Best regards,
</I>&gt;<i>
</I>&gt;<i> William
</I>&gt;<i>
</I>&gt;<i> On Fri, Oct 16, 2009 at 7:17 AM, Matthias Brantner
</I>&gt;<i> &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
</I>&gt;&gt;<i> Hello,
</I>&gt;&gt;<i> the Zorba <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> processor (zorba-xquery.org) provides language bindings for
</I>&gt;&gt;<i> PHP.
</I>&gt;&gt;<i> Matthias
</I>&gt;&gt;<i> On 16.10.2009, at 05:00, Wely Live wrote:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Hello,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I am new in XQuery.
</I>&gt;&gt;<i> Could somebody suggest is there any free implementation of XQuery for PHP?
</I>&gt;&gt;<i> Thanks.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Regards,
</I>&gt;&gt;<i> Wely
</I>&gt;&gt;<i> _______________________________________________
</I>&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I></PRE>
]]></content></entry><entry><title>  XQuery Implementation for PHP
   </title><id>http://www.stylusstudio.com/xquerytalk/200911/003620.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200911/003620.html" /><updated>2009-11-03T22:34:54Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello,

The PHP <a title="bindings" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a> are featured in an IBM developerWorks article:
http://www.ibm.com/developerworks/<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>/library/x-zorba/index.html.

Best regards,

William

On Fri, Oct 16, 2009 at 7:17 AM, Matthias Brantner
&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Hello,
</I>&gt;<i> the Zorba <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> processor (zorba-xquery.org) provides language bindings for
</I>&gt;<i> PHP.
</I>&gt;<i> Matthias
</I>&gt;<i> On 16.10.2009, at 05:00, Wely Live wrote:
</I>&gt;<i>
</I>&gt;<i> Hello,
</I>&gt;<i>
</I>&gt;<i> I am new in XQuery.
</I>&gt;<i> Could somebody suggest is there any free implementation of XQuery for PHP?
</I>&gt;<i> Thanks.
</I>&gt;<i>
</I>&gt;<i> Regards,
</I>&gt;<i> Wely
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I></PRE>
]]></content></entry><entry><title>  Implementations of XQuery Update Facility requested
   </title><id>http://www.stylusstudio.com/xquerytalk/200911/003619.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200911/003619.html" /><updated>2009-11-02T18:14:07Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Back in August, the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> Query Working Group announced the availability of 
version 1.0.0 of the <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> Update Facility Test Suite [1]. This test 
suite reflects the XQuery Update Facility 1.0 Candidate Recommendation [2] 
that was published on June 9. 

We are pleased to have received results from <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">Saxonica</a>. We'd like to 
encourage other implementators to submit their results to us, so that we 
can advance XQuery Update Facility to <a title="W3C" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">W3C</a> Recommendation.

                                                -- Andrew

[1] XQuery Update Facility Test Suite
http://dev.w3.org/2007/xquery-update-10-test-suite/

[2] XQuery Update Facility 1.0 
http://www.w3.org/TR/2009/CR-xquery-update-10-20090609/ 

--------------------
Andrew Eisenberg
IBM
4 Technology Park Drive
Westford, MA  01886

http://x-query.com/mailman/listinfo/talk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091102/6d65e159/attachment.htm
</PRE>
]]></content></entry><entry><title>  data camp and apps competition in SF
   </title><id>http://www.stylusstudio.com/xquerytalk/200911/003618.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200911/003618.html" /><updated>2009-11-01T13:16:01Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> fans,

I am just curious, are there any XQuery fans participating in this  
competition,
and using it as an app development language ?

http://datacamp.eventbrite.com/

If yes, it would be really interesting to know how XQuery performed
given the task.

Let us know !

Dana


Other related links:

http://datasf.org/

http://datasf.org/showcase/

http://www.sfexaminer.com/opinion/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/blogs/">blogs</a>/under-the-dome/Get-ready-for-an-apps-battle-63159797.html
</PRE>
]]></content></entry><entry><title>  First XQuery Meetup at Paris, La Cantine,
	December 3rd 2009
   </title><id>http://www.stylusstudio.com/xquerytalk/200911/003617.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200911/003617.html" /><updated>2009-11-01T09:39:32Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> lovers!

A couple of weeks ago we started a <a title="The Stylus Studio Wiki" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://wiki.stylusstudio.com/">wiki</a> at http://xquery.pbworks.com
in order to help XQuery enthusiasts from the same area to gather
around a snack and a beer. The aim is to promote knowledge sharing and
best practice amongst <a title="XQuery developers" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquerytalk/">XQuery developers</a> and business professionals
around the world by organizing local meetups.

Anyone can participate and/or organize a meetup, the wiki contains
some guidelines, please feel free to contact me for more info.

The first Paris XQuery Meetup will be held at la Cantine, December 3rd
2009. More details at http://xquery.pbworks.com/Paris-Meetup.
This event is restricted to 20 people maximum, registration is done on the wiki.
Please tell your friends about it!

Best regards,

William
</PRE>
]]></content></entry><entry><title>  [ANN] Altova announces v2010 of the MissionKit tool
	suite
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003616.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003616.html" /><updated>2009-10-29T17:11:40Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Altova is pleased to announce general availability version 2010 of its
MissionKit XML, database, and UML tools. v2010 is our MOST WANTED
release and includes over 70 new customer-requested features. Just a few
of these include: 

 

* Support <a title="WSDL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/webservices/wsdl_editor.html">for WSDL 2.0</a>, <a title="JSON vs XML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.xmlconverters.com/tutorials/json-and-xquery.html">JSON</a>, and SysML technologies

* Database <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> comparison

* New <a title="How To Design Stylesheets" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/publisher1/publisher1.html">stylesheet design</a> paradigm with advanced support for electronic
form design

* Enhanced <a title="The eXtensible Business Reporting Language (XBRL)" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/xbrl/index.html">XBRL</a> <a title="functionality" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/buy/compare.html">functionality</a>

* And much more 

 

More info and <a title="screenshots" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_screenshots.html">screenshots</a> are available at
&lt;http://www.altova.com/whatsnew.html&gt; 

 

Download a fully functional free trial at
&lt;http://www.altova.com/download.html&gt; 

Best regards,

Liz

 

Liz Andrews

Technical Marketing Manager
Altova, Inc.

www.altova.com

 

________________________________

This e-mail and any attachments are intended only for the person/entity
to which they are addressed and may contain confidential and/or
privileged material. If you received this in error, please notify the
sender and delete the message.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091029/1898d618/attachment.htm
</PRE>
]]></content></entry><entry><title>  Andy K Chang is on Business Trip with Limited
	Availability
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003615.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003615.html" /><updated>2009-10-29T14:02:44Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
I will be out of the office starting  10/25/2009 and will not return until
10/30/2009.

I am in Las Vegas for 2009 IBM IOD Conference.  My availability is limited but
am available to any important or emergent matters.  I will check my emails a
few times a day and be available from my cell.  If you need help, please
contact Sundi Mahadevan first


American Express made the following annotations on Thu Oct 29 2009 15:02:46
------------------------------------------------------------------------------
&quot;This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.&quot;

American Express a ajout&#233; le commentaire suivant le Thu Oct 29 2009 15:02:46

Ce courrier et toute pi&#232;ce jointe qu'il contient sont r&#233;serv&#233;s au seul destinataire indiqu&#233; et peuvent renfermer des renseignements confidentiels et privil&#233;gi&#233;s. Si vous n'&#234;tes pas le destinataire pr&#233;vu, toute divulgation, duplication, utilisation ou distribution du courrier ou de toute pi&#232;ce jointe est interdite. Si vous avez re&#231;u cette communication par erreur, veuillez nous en aviser par courrier et d&#233;truire imm&#233;diatement le courrier et les pi&#232;ces jointes. Merci. 

******************************************************************************
-------------------------------------------------------------------------------


</PRE>
]]></content></entry><entry><title>  Benchmarking on XQuery Implementation in DBMS
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003611.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003611.html" /><updated>2009-10-29T10:56:45Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,

I am planning to research the comparison and benchmarking <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> Implementation in DBMS (<a title="SQL Server XML Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/sqlserver.html">SQL Server</a>, <a title="Oracle" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/oracle.html">Oracle</a>, <a title="DB2 Database" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/ibm_db2.html">DB2</a>). There are a few question to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discuss</a> as following:
1. I wonder if anybody has ever done the similar research?
    I would be appreciate if anybody could provide my any related source or document.
2. To do the benchmarking, we of course need a sample dataset. Anybody has reference where can I find a good dataset sample?

Thanks!

Regards,
Wely
Post Graduate Student
Nanyang Technological University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091029/1e01edd0/attachment.htm
</PRE>
]]></content></entry><entry><title>  Benchmarking on XQuery Implementation in DBMS
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003614.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003614.html" /><updated>2009-10-29T10:37:16Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,

There is also the TPoX Benchmark suite that might be worth taking a look at..

http://tpox.sourceforge.net/

Kind regards,
Geert

&gt;<i>
</I>

Drs. G.P.H. Josten
Consultant


http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.


&gt;<i> From: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf Of Ronald Bourret
</I>&gt;<i> Sent: donderdag 29 oktober 2009 6:18
</I>&gt;<i> To: Wely Live
</I>&gt;<i> Cc: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject: Re:  Benchmarking on <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>
</I>&gt;<i> Implementation in DBMS
</I>&gt;<i>
</I>&gt;<i> Hello,
</I>&gt;<i>
</I>&gt;<i> You can find a partial list of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> query benchmarks at [1].
</I>&gt;<i> You should also search DBLP [2] for XML and benchmark, as
</I>&gt;<i> there may be more recent research in this area. Finally, be
</I>&gt;<i> sure to read your license agreements carefully.
</I>&gt;<i> Unfortunately, many databases do not allow you to publish the
</I>&gt;<i> results of benchmarks.
</I>&gt;<i>
</I>&gt;<i> -- Ron
</I>&gt;<i>
</I>&gt;<i> [1] http://www.rpbourret.com/xml/XMLDBLinks.htm#Benchmarks
</I>&gt;<i> [2] http://www.informatik.uni-trier.de/~ley/db/indices/t-form.html
</I>&gt;<i>
</I>&gt;<i> Wely Live wrote:
</I>&gt;<i> &gt; Hi,
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; I am planning to research the comparison and benchmarking
</I>&gt;<i> XQuery Implementation in DBMS (<a title="SQL Server XML Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/sqlserver.html">SQL Server</a>, <a title="Oracle" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/oracle.html">Oracle</a>, <a title="DB2 Database" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/ibm_db2.html">DB2</a>).
</I>&gt;<i> There are a few question to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discuss</a> as following:
</I>&gt;<i> &gt; 1. I wonder if anybody has ever done the similar research?
</I>&gt;<i> &gt;     I would be appreciate if anybody could provide my any
</I>&gt;<i> related source or document.
</I>&gt;<i> &gt; 2. To do the benchmarking, we of course need a sample
</I>&gt;<i> dataset. Anybody has reference where can I find a good dataset sample?
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Thanks!
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Regards,
</I>&gt;<i> &gt; Wely
</I>&gt;<i> &gt; Post Graduate Student
</I>&gt;<i> &gt; Nanyang Technological University
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>

</PRE>
]]></content></entry><entry><title>  Benchmarking on XQuery Implementation in DBMS
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003613.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003613.html" /><updated>2009-10-29T09:09:48Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>A fair bit of work has been done but more is always needed.
 
I think you need to start out with very clear objectives, especially in the
following areas:
 
* are you going to try and measure how well the products handle something
close to a &quot;real-life&quot; workload (including factors such as updating,
database loading, etc), or are you going to measure a small number of
synthetic queries?
 
* are you going to make strenuous efforts to get the best possible
performance out of each product that you test, or are you simply going to
measure what it achieves &quot;out of the box&quot;?
 
* do you just want to produce some numbers, or do you want to use those
numbers to test some theories or hypotheses?
 
Most of the papers I've seen on XSLT, <a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a>, or XQuery benchmarks over the
years suffer from one or more of the following drawbacks:
 
* Some of the queries they measure are totally unrepresentative of real
life, for example IIRC one benchmark has a query like
/descendant::*/ancestor::*/descendant::*. Who cares whether that performs
well? (But it can be useful, of course, if your objective is to find out how
path expressions are implemented internally).
 
* Simple flaws in the measurement methodology, for example failing to take
account of Java VM startup time, or to distinguish query compilation,
document parsing, and query evaluation costs. Such flaws can make your
numbers meaningless, but they are surprisingly common in published papers.
 
* Running products in a sub-optimal way. This might say something about the
product's usability or documentation, but if you run with the wrong
configuration options, it tells you very little about the product's true
performance capabilities. This is especially true where your knowledge of
one of the products is much better than your knowledge of others: a factor
that taints all comparative benchmarks produced by vendors.
 
* Making incorrect inferences from the measurements (for example, the
authors of one paper drew inferences about the internal workings of <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a>
which were completely and bizarrely wrong, and they didn't check them with
me before publication.)
 
It's worth remembering that in real life, the performance you achieve
depends much more on your skills as a developer and your knowledge and
experience of the technology you are using than on the absolute capabilities
of the chosen product. Performance problems in real life don't occur because
the technology is intrinsically slow, they occur because it is misused. This
places a severe limitation on the usefulness of benchmark numbers.
 
Regards,

<a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/
http://twitter.com/michaelhkay 


  _____  

From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf
Of Wely Live
Sent: 29 October 2009 02:57
To: http://x-query.com/mailman/listinfo/talk
Subject:  Benchmarking on XQuery Implementation in DBMS


Hi,
 
I am planning to research the comparison and benchmarking XQuery
Implementation in DBMS (<a title="SQL Server XML Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/sqlserver.html">SQL Server</a>, <a title="Oracle" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/oracle.html">Oracle</a>, <a title="DB2 Database" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/ibm_db2.html">DB2</a>). There are a few question
to discuss as following:
1. I wonder if anybody has ever done the similar research?
    I would be appreciate if anybody could provide my any related source or
document.
2. To do the benchmarking, we of course need a sample dataset. Anybody has
reference where can I find a good dataset sample?
 
Thanks!
 
Regards,
Wely
Post Graduate Student
Nanyang Technological University

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091029/babab73b/attachment.htm
</PRE>
]]></content></entry><entry><title>  Benchmarking on XQuery Implementation in DBMS
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003612.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003612.html" /><updated>2009-10-28T22:18:02Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello,

You can find a partial list of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> query benchmarks at [1]. You should 
also search DBLP [2] for XML and benchmark, as there may be more recent 
research in this area. Finally, be sure to read your license agreements 
carefully. Unfortunately, many databases do not allow you to publish the 
results of benchmarks.

-- Ron

[1] http://www.rpbourret.com/xml/XMLDBLinks.htm#Benchmarks
[2] http://www.informatik.uni-trier.de/~ley/db/indices/t-form.html

Wely Live wrote:
&gt;<i> Hi,
</I>&gt;<i> 
</I>&gt;<i> I am planning to research the comparison and benchmarking <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> Implementation in DBMS (<a title="SQL Server XML Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/sqlserver.html">SQL Server</a>, <a title="Oracle" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/oracle.html">Oracle</a>, <a title="DB2 Database" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/ibm_db2.html">DB2</a>). There are a few question to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discuss</a> as following:
</I>&gt;<i> 1. I wonder if anybody has ever done the similar research?
</I>&gt;<i>     I would be appreciate if anybody could provide my any related source or document.
</I>&gt;<i> 2. To do the benchmarking, we of course need a sample dataset. Anybody has reference where can I find a good dataset sample?
</I>&gt;<i> 
</I>&gt;<i> Thanks!
</I>&gt;<i> 
</I>&gt;<i> Regards,
</I>&gt;<i> Wely
</I>&gt;<i> Post Graduate Student
</I>&gt;<i> Nanyang Technological University
</I></PRE>
]]></content></entry><entry><title>  XQuery Implementation for PHP
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003608.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003608.html" /><updated>2009-10-16T12:00:29Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello,

I am new in <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>.
Could somebody suggest is there any free implementation of XQuery for PHP?
Thanks.

Regards,
Wely
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091016/f9a8ce3f/attachment.htm
</PRE>
]]></content></entry><entry><title>  XQuery Implementation for PHP
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003610.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003610.html" /><updated>2009-10-16T09:17:20Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello,

the Zorba <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> processor (zorba-xquery.org) provides language  
<a title="bindings" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a> for PHP.

Matthias

On 16.10.2009, at 05:00, Wely Live wrote:

&gt;<i> Hello,
</I>&gt;<i>
</I>&gt;<i> I am new in XQuery.
</I>&gt;<i> Could somebody suggest is there any free implementation of XQuery  
</I>&gt;<i> for PHP?
</I>&gt;<i> Thanks.
</I>&gt;<i>
</I>&gt;<i> Regards,
</I>&gt;<i> Wely
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091016/31feb47c/attachment.htm
</PRE>
]]></content></entry><entry><title>  XQuery Implementation for PHP
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003609.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003609.html" /><updated>2009-10-16T09:02:03Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>with eXist (http://exist-db.org) you don`t need php anymore (and even
nor Apache and nor <a title="XQuery MySQL" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/mysql.html">MySQL</a>)

On Fri, Oct 16, 2009 at 7:00 AM, Wely Live &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Hello,
</I>&gt;<i>
</I>&gt;<i> I am new in XQuery.
</I>&gt;<i> Could somebody suggest is there any free implementation of XQuery for PHP?
</I>&gt;<i> Thanks.
</I>&gt;<i>
</I>&gt;<i> Regards,
</I>&gt;<i> Wely
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I></PRE>
]]></content></entry><entry><title>  Fwd: How you can help promote the Developer Gathering
 (part of TPAC 2009)
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003607.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003607.html" /><updated>2009-10-07T09:46:33Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Maybe this is of interest to the <a title="XQuery developers" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquerytalk/">XQuery developers</a> in the Bay Area.

http://www.<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/2009/11/TPAC/DevMeeting.html

Best regards
Dana


&gt;<i>
</I>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091007/e529d039/attachment.htm
</PRE>
]]></content></entry><entry><title>  parsing dates
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003606.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003606.html" /><updated>2009-10-06T21:21:03Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> 
</I>&gt;<i> I think that's not quite correct. Typeswitch case clauses 
</I>&gt;<i> expect a <a title="SequenceType" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">SequenceType</a>, which includes ItemType. So the tests 
</I>&gt;<i> can be any node type or any <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> type (see 
</I>&gt;<i> http://www.<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/TR/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>/#id-typeswitch and 
</I>&gt;<i> http://www.w3.org/TR/xquery/#doc-xquery-SequenceType).
</I>&gt;<i> 
</I>&gt;<i> Here's an example: note that the order of the 'case' clauses 
</I>&gt;<i> is important. Since xs:ID is derived from xs:string, it must 
</I>&gt;<i> be tested before any xs:string test case.
</I>&gt;<i> 
</I>&gt;<i> xquery version &quot;1.0-ml&quot;;
</I>&gt;<i> 
</I>&gt;<i> let $i := &quot;test&quot;
</I>&gt;<i> return
</I>&gt;<i>    typeswitch ($i)
</I>&gt;<i>     case xs:integer return &quot;integer&quot;
</I>&gt;<i>     case xs:ID return &quot;id&quot;
</I>&gt;<i>     case xs:string return &quot;string&quot;
</I>&gt;<i>     default return error((), &quot;UNEXPECTED&quot;, $i)
</I>&gt;<i> 
</I>
But we aren't starting with an xs:date or xs:gYearMonth; we are starting
with a string that is capable of being converted to an xs:date or
xs:gYearMonth. So &quot;castable as&quot; is indeed the right solution.

Except that matches() would be more flexible, because it can also test for
formats that don't happen to correspond to any known schema-defined type.

&gt;<i>Is that because xs:integer is considered an AtomicType?
</I>
xs:integer is most definitely an AtomicType, there's no &quot;considered to be&quot;
about it.

Regards,

<a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/
http://twitter.com/michaelhkay 

</PRE>
]]></content></entry><entry><title>  parsing dates
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003605.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003605.html" /><updated>2009-10-06T20:09:09Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> I think that's not quite correct. Typeswitch case clauses
</I>&gt;<i> expect a <a title="SequenceType" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">SequenceType</a>, which includes ItemType. So the tests
</I>&gt;<i> can be any node type or any <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> type (see
</I>&gt;<i> http://www.<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/TR/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>/#id-typeswitch and
</I>&gt;<i> http://www.w3.org/TR/xquery/#doc-xquery-SequenceType).
</I>&gt;<i>
</I>&gt;<i> Here's an example: note that the order of the 'case' clauses
</I>&gt;<i> is important. Since xs:ID is derived from xs:string, it must
</I>&gt;<i> be tested before any xs:string test case.
</I>&gt;<i>
</I>&gt;<i> xquery version &quot;1.0-ml&quot;;
</I>&gt;<i>
</I>&gt;<i> let $i := &quot;test&quot;
</I>&gt;<i> return
</I>&gt;<i>    typeswitch ($i)
</I>&gt;<i>     case xs:integer return &quot;integer&quot;
</I>&gt;<i>     case xs:ID return &quot;id&quot;
</I>&gt;<i>     case xs:string return &quot;string&quot;
</I>&gt;<i>     default return error((), &quot;UNEXPECTED&quot;, $i)
</I>&gt;<i>
</I>&gt;<i> -- Mike
</I>
Is that because xs:integer is considered an AtomicType?

Kind regards,
Geert





Drs. G.P.H. Josten
Consultant


http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.




</PRE>
]]></content></entry><entry><title>  parsing dates
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003602.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003602.html" /><updated>2009-10-06T16:34:35Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Tue, Oct 6, 2009 at 14:44, David Sewell &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> On Mon, 5 Oct 2009, Joe Wicentowski wrote:
</I>&gt;<i>
</I>&gt;&gt;<i> As far as your specific question, you could run a series of &quot;if ($date
</I>&gt;&gt;<i> castable as ...) then ... else&quot; statements on the following <a title="datatypes" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">datatypes</a>:
</I>&gt;<i> typeswitch tests for node kinds, not data types, so the &quot;if castable&quot;
</I>&gt;<i> approach is probably the way to go (barring the custom data type
</I>&gt;<i> solution that Michael mentioned).
</I>
Thanks Joe, Mike, and David,

I think you are right that the &quot;if castable as&quot; approach will work the
best. Mike's suggestion (while perhaps more reliable) is probably
overkill.  I don't actually care to validate the dates as a date,
since if someone is putting in funny non-dates in this case, then they
probably deserve the error message they'll get.  The files are a
historical diary and I just want to give users (well, and my
processing) the option of looking at it by day, by month, or by year
through a simple change in a hackable human-readable URL. All the real
date/@when in the files are YYYY-MM-DD but want to let them do
/diary/1788-04-07.html (or .<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>) and get that one day's entry or
/diary/1788-04.html to get the month or /diary/1788.html to get the
year.  Obviously in 99% of the time the urls will be generated from
some link they are clicking on but it gives me an easy way to move
from day to month to year if desired.

I suppose another way would be not to treat these as dates at all, but
in canonicalizing the data before loading it into eXist, I could give
unique @xml:ids to each day, month and year, that were in the form of
somethingYYYY on the enclosing element for the year's entries,
somethingYYYY-MM for the element enclosing a month, and
somethingYYYY-MM-DD for the element enclosing a day.  That way when
then ask for /diary/YYYY-MM-DD I would just go get the element with
somethingYYYY-MM-DD as an @xml:id.  I guess that the drawbacks of that
are that I can't really do an date-arithmetic, but that said at this
stage I'm not sure I need to. I was just assuming I should be doing it
by date (rather than ID) because the whole work is date oriented.

Thanks for the help, as I'm now working feverishly on this I'm sure
I'll be asking for help again soon! ;-)

-James
</PRE>
]]></content></entry><entry><title>  parsing dates
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003603.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003603.html" /><updated>2009-10-06T12:59:37Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi James,

Got it - now I understand.

Well, if your dates are normalized to yyyy-mm-dd, I'd suggest keeping
them as is in date/@when.  This way, you can set up a range index on
@when, and you can do date comparisons (&lt;, &gt;, =) based on the
searches.  See eXist's documentation on setting up indexing, but I'd
use something like:

&lt;create qname=&quot;@when&quot; type=&quot;xs:date&quot;/&gt;

This would enable comparison queries like:

let $date := request:get-parameter(&quot;date&quot;, (&quot;1789-01-01&quot;))
let $query-start-date :=
  if ($date castable as xs:date) then $date cast as xs:date
  else if ($date castable as xs:gYearMonth) then concat($date, '-01')
cast as xs:date
  else concat($date, '-01-01') cast as xs:date
let $query-end-date :=
  if ($date castable as xs:date) then $date cast as xs:date
  else if ($date castable as xs:gYearMonth) then concat($date,
functx:days-in-month($month)) cast as xs:date
  else concat($date, '-12-31') cast as xs:date
for $hit in $docs[tei:date/@when ge $query-start-date and
tei:date/@when le $query-end-date]
...

(for the functx days-in-month function, see
http://www.<a title="xqueryfunctions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/xquery_functions.html">xqueryfunctions</a>.com/xq/functx_days-in-month.html)

Joe
</PRE>
]]></content></entry><entry><title>  parsing dates
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003601.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003601.html" /><updated>2009-10-06T10:44:09Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Mon, 5 Oct 2009, Joe Wicentowski wrote:

&gt;<i> As far as your specific question, you could run a series of &quot;if ($date
</I>&gt;<i> castable as ...) then ... else&quot; statements on the following <a title="datatypes" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">datatypes</a>:
</I>
[...]

&gt;<i> As an alternative to conditional expressions, I'm not sure if
</I>&gt;<i> typeswitch would work for this?
</I>
typeswitch tests for node kinds, not data types, so the &quot;if castable&quot;
approach is probably the way to go (barring the custom data type
solution that Michael mentioned).

-- 
David Sewell, Editorial and Technical Manager
ROTUNDA, The University of Virginia <a title="Press" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_news.html">Press</a>
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: http://x-query.com/mailman/listinfo/talk   Tel: +1 434 924 9973
Web: http://rotunda.upress.virginia.edu/
</PRE>
]]></content></entry><entry><title>  parsing dates
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003604.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003604.html" /><updated>2009-10-06T10:39:32Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On 2009-10-06 06:44, David Sewell wrote:
&gt;<i> On Mon, 5 Oct 2009, Joe Wicentowski wrote:
</I>&gt;<i>
</I>&gt;&gt;<i> As far as your specific question, you could run a series of &quot;if ($date
</I>&gt;&gt;<i> castable as ...) then ... else&quot; statements on the following <a title="datatypes" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">datatypes</a>:
</I>&gt;<i>
</I>&gt;<i> [...]
</I>&gt;<i>
</I>&gt;&gt;<i> As an alternative to conditional expressions, I'm not sure if
</I>&gt;&gt;<i> typeswitch would work for this?
</I>&gt;<i>
</I>&gt;<i> typeswitch tests for node kinds, not data types, so the &quot;if castable&quot;
</I>&gt;<i> approach is probably the way to go (barring the custom data type
</I>&gt;<i> solution that Michael mentioned).
</I>
I think that's not quite correct. Typeswitch case clauses expect a 
SequenceType, which includes ItemType. So the tests can be any node type 
or any <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> type (see http://www.<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/TR/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>/#id-typeswitch and 
http://www.w3.org/TR/xquery/#doc-xquery-SequenceType).

Here's an example: note that the order of the 'case' clauses is 
important. Since xs:ID is derived from xs:string, it must be tested 
before any xs:string test case.

xquery version &quot;1.0-ml&quot;;

let $i := &quot;test&quot;
return
   typeswitch ($i)
    case xs:integer return &quot;integer&quot;
    case xs:ID return &quot;id&quot;
    case xs:string return &quot;string&quot;
    default return error((), &quot;UNEXPECTED&quot;, $i)

-- Mike
</PRE>
]]></content></entry><entry><title>  parsing dates
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003600.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003600.html" /><updated>2009-10-06T08:09:56Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
I don't know if eXist has any <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> support. If it does, you can define a
type genericDate that is a union of xs:date, xs:gYearMonth, and xs:gYear.
You can't cast to the union type (sadly) but you can construct an element
and <a title="How To Build XML Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">validate against a schema</a> that defines the element as a union type, and
then atomize.

OK, that's a bit longwinded. Sorry!

Regards,

<a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/
http://twitter.com/michaelhkay 
 

&gt;<i> -----Original Message-----
</I>&gt;<i> From: http://x-query.com/mailman/listinfo/talk 
</I>&gt;<i> [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf Of James Cummings
</I>&gt;<i> Sent: 06 October 2009 00:05
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject:  parsing dates
</I>&gt;<i> 
</I>&gt;<i> Hi there,
</I>&gt;<i> 
</I>&gt;<i> I've a silly question about the best way to parse dates.  I'm 
</I>&gt;<i> passing a parameter (in eXist) that is part of the URL for an 
</I>&gt;<i> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> and I want to separate it into its individual parts of 
</I>&gt;<i> year month and day. I could test the string and do 
</I>&gt;<i> substring-before and after and such, or create my own 
</I>&gt;<i> function, but it seemed better practice to use the functions 
</I>&gt;<i> like year-from-date and month-from-date.  So I tried:
</I>&gt;<i> 
</I>&gt;<i> let $date := request:get-parameter(&quot;date&quot;, (&quot;1789-01-01&quot;)) 
</I>&gt;<i> cast as xs:date let $year := fn:year-from-date($date) let 
</I>&gt;<i> $month := fn:month-from-date($date) let $day := 
</I>&gt;<i> fn:day-from-date($date)
</I>&gt;<i> 
</I>&gt;<i> which works fine when the date is YYYY-MM-DD.  But what I 
</I>&gt;<i> want to achieve is being able to handle YYYY-MM-DD, YYYY-MM 
</I>&gt;<i> or just YYYY.  The last two give me an error of &quot;xs:date must 
</I>&gt;<i> not have hour, minute or second fields set&quot; (erm... which it 
</I>&gt;<i> doesn't, which is why I'm confused). I'm happy for $month and 
</I>&gt;<i> $day to be empty if they don't exist.
</I>&gt;<i> 
</I>&gt;<i> I'm sure it is something terribly obvious with the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">datatype</a>.  
</I>&gt;<i> Should I just be breaking it down to its component parts 
</I>&gt;<i> myself?  It just seemed like I was reinventing the wheel.
</I>&gt;<i> 
</I>&gt;<i> Thanks for any suggestions.
</I>&gt;<i> 
</I>&gt;<i> -James
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>
</PRE>
]]></content></entry><entry><title>  parsing dates
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003598.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003598.html" /><updated>2009-10-06T01:05:27Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi there,

I've a silly question about the best way to parse dates.  I'm passing
a parameter (in eXist) that is part of the URL for an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> and I
want to separate it into its individual parts of year month and day. I
could test the string and do substring-before and after and such, or
create my own function, but it seemed better practice to use the
functions like year-from-date and month-from-date.  So I tried:

let $date := request:get-parameter(&quot;date&quot;, (&quot;1789-01-01&quot;)) cast as xs:date
let $year := fn:year-from-date($date)
let $month := fn:month-from-date($date)
let $day := fn:day-from-date($date)

which works fine when the date is YYYY-MM-DD.  But what I want to
achieve is being able to handle YYYY-MM-DD, YYYY-MM or just YYYY.  The
last two give me an error of &quot;xs:date must not have hour, minute or
second fields set&quot; (erm... which it doesn't, which is why I'm
confused). I'm happy for $month and $day to be empty if they don't
exist.

I'm sure it is something terribly obvious with the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">datatype</a>.  Should I
just be breaking it down to its component parts myself?  It just
seemed like I was reinventing the wheel.

Thanks for any suggestions.

-James
</PRE>
]]></content></entry><entry><title>  parsing dates
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003599.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003599.html" /><updated>2009-10-05T21:16:57Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>James,

I've encountered the same issue with dates in TEI documents.  What
follows are some thoughts/suggestions about using TEI dates in eXist.

I think the issue is The TEI Guidelines allows/encourages one to mix
date <a title="datatypes" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">datatypes</a>, thereby conflating data with precision in dates
(http://www.tei-c.org/release/doc/tei-p5-doc/en/html/CO.html#CONADA):

------
&quot;Partial dates or times (e.g. 1990, September 1990, twelvish) can be
expressed in the when attribute by simply omitting a part of the value
supplied. Imprecise dates or times (for example early August, some
time after ten and before twelve) may be expressed as date or time
ranges...  The @when attribute always supplies a normalized
representation of the date given as content of the date element. The
format used should be a valid <a title="W3C" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">W3C</a> <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> datatype. Some typical
examples follow:

* &lt;date when=&quot;2001&quot;&gt;The year 2001&lt;/date&gt;
* &lt;date when=&quot;2001-09&quot;&gt;September 2001&lt;/date&gt;
* &lt;date when=&quot;2001-09-11&quot;&gt;11 Sept 01&lt;/date&gt;
* &lt;date when=&quot;--09-11&quot;&gt;9/11&lt;/date&gt;
* &lt;date when=&quot;--09&quot;&gt;September&lt;/date&gt;
* &lt;date when=&quot;---11&quot;&gt;Eleventh of the month&lt;/date&gt;
* &lt;time when=&quot;08:48:00&quot;&gt;8:48&lt;/time&gt;
* &lt;date when=&quot;2001-09-11T12:48:00&quot;&gt;Sept 11th, 12 minutes before 9 am&lt;/date&gt;

Note in the last example the use of a normalized representation for
the date string which includes a time: this example could thus equally
well be tagged using the time element.
The following examples demonstrate the use of the date element to mark
a period of time:
* &lt;p&gt;Those five years &#8212; &lt;date from=&quot;1918&quot; to=&quot;1923&quot;&gt;1918 to
1923&lt;/date&gt; &#8212; had been, he suspected, somehow very important.&lt;/p&gt;&quot;
-----

If you mix 2+ date datatypes, you will encounter some difficulties
when doing what you asked about.  Setting range indexes in eXist is
impossible if you mix datatypes, as far as I know.  I think we might
encode TEI texts more effectively to make processing easier by (1)
either using a consistent datatype or (2) replacing the generic @when
with a new way of <a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a> which implies the datatype.

As far as your specific question, you could run a series of &quot;if ($date
castable as ...) then ... else&quot; statements on the following datatypes:

* date
* gYear
* gMonth
* gDay
* gYearMonth
* gMonthDay
* time
* dateTime

As an alternative to conditional expressions, I'm not sure if
typeswitch would work for this?

- Joe



On Mon, Oct 5, 2009 at 7:05 PM, James Cummings
&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Hi there,
</I>&gt;<i>
</I>&gt;<i> I've a silly question about the best way to parse dates. &#160;I'm passing
</I>&gt;<i> a parameter (in eXist) that is part of the URL for an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> and I
</I>&gt;<i> want to separate it into its individual parts of year month and day. I
</I>&gt;<i> could test the string and do substring-before and after and such, or
</I>&gt;<i> create my own function, but it seemed better practice to use the
</I>&gt;<i> functions like year-from-date and month-from-date. &#160;So I tried:
</I>&gt;<i>
</I>&gt;<i> let $date := request:get-parameter(&quot;date&quot;, (&quot;1789-01-01&quot;)) cast as xs:date
</I>&gt;<i> let $year := fn:year-from-date($date)
</I>&gt;<i> let $month := fn:month-from-date($date)
</I>&gt;<i> let $day := fn:day-from-date($date)
</I>&gt;<i>
</I>&gt;<i> which works fine when the date is YYYY-MM-DD. &#160;But what I want to
</I>&gt;<i> achieve is being able to handle YYYY-MM-DD, YYYY-MM or just YYYY. &#160;The
</I>&gt;<i> last two give me an error of &quot;xs:date must not have hour, minute or
</I>&gt;<i> second fields set&quot; (erm... which it doesn't, which is why I'm
</I>&gt;<i> confused). I'm happy for $month and $day to be empty if they don't
</I>&gt;<i> exist.
</I>&gt;<i>
</I>&gt;<i> I'm sure it is something terribly obvious with the datatype. &#160;Should I
</I>&gt;<i> just be breaking it down to its component parts myself? &#160;It just
</I>&gt;<i> seemed like I was reinventing the wheel.
</I>&gt;<i>
</I>&gt;<i> Thanks for any suggestions.
</I>&gt;<i>
</I>&gt;<i> -James
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>
</PRE>
]]></content></entry><entry><title>  In search of sample data ...
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003597.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003597.html" /><updated>2009-10-03T11:53:14Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,

How about online articles, <a title="news" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_news.html">news</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">feeds</a>, <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/blogs/">blogs</a>? Though these are typically relatively short in length..

Kind regards,
Geert

&gt;<i>
</I>

Drs. G.P.H. Josten
Consultant


http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.


&gt;<i> From: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf Of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/daniela_florescu.html">daniela florescu</a>
</I>&gt;<i> Sent: zaterdag 3 oktober 2009 0:42
</I>&gt;<i> To: Hans-Juergen Rennau
</I>&gt;<i> Cc: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject: Re:  In search of sample data ...
</I>&gt;<i>
</I>&gt;<i> Hans Juergen,
</I>&gt;<i>
</I>&gt;<i> I only have three words of advise, given your request:
</I>&gt;<i>
</I>&gt;<i> www.data.gov
</I>&gt;<i> http://www.recovery.gov/
</I>&gt;<i> www.programmableweb.com/
</I>&gt;<i>
</I>&gt;<i> Best regards
</I>&gt;<i> Dana
</I>&gt;<i>
</I>&gt;<i> On Oct 2, 2009, at 3:03 PM, Hans-Juergen Rennau wrote:
</I>&gt;<i>
</I>&gt;<i> &gt; Hello People,
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; preparing an extensive <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> workshop, I am looking for
</I>&gt;<i> interesting
</I>&gt;<i> &gt; sample data. What I have in mind is data that
</I>&gt;<i> &gt; - are public and available online via URL (either static or
</I>&gt;<i> as REST-
</I>&gt;<i> &gt; ful webservice)
</I>&gt;<i> &gt; - have intermediate complexity (&gt; 50 data items, &lt;= 5 MB)
</I>&gt;<i> &gt; - must be in English (both tags and contents)
</I>&gt;<i> &gt; - may be dynamic, but not too ephemeral
</I>&gt;<i> &gt; - <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> data welcome
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Should anybody have suggestions, I would be grateful!
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; With kind regards,
</I>&gt;<i> &gt; Hans-Juergen
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; _______________________________________________
</I>&gt;<i> &gt; http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> &gt; http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>

</PRE>
]]></content></entry><entry><title>  In search of sample data ...
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003595.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003595.html" /><updated>2009-10-02T23:03:46Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello People,

preparing an extensive <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> workshop, I am looking for interesting sample data. What I have in mind is data that
- are public and available online via URL (either static or as REST-ful webservice)
- have intermediate complexity (&gt; 50 data items, &lt;= 5 MB)
- must be in English (both tags and contents)
- may be dynamic, but not too ephemeral
- <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> data welcome

Should anybody have suggestions, I would be grateful!

With kind regards,
Hans-Juergen


      

</PRE>
]]></content></entry><entry><title>  In search of sample data ...
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003596.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003596.html" /><updated>2009-10-02T16:41:31Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hans Juergen,

I only have three words of advise, given your request:

www.data.gov
http://www.recovery.gov/
www.programmableweb.com/

Best regards
Dana

On Oct 2, 2009, at 3:03 PM, Hans-Juergen Rennau wrote:

&gt;<i> Hello People,
</I>&gt;<i>
</I>&gt;<i> preparing an extensive <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> workshop, I am looking for interesting  
</I>&gt;<i> sample data. What I have in mind is data that
</I>&gt;<i> - are public and available online via URL (either static or as REST- 
</I>&gt;<i> ful webservice)
</I>&gt;<i> - have intermediate complexity (&gt; 50 data items, &lt;= 5 MB)
</I>&gt;<i> - must be in English (both tags and contents)
</I>&gt;<i> - may be dynamic, but not too ephemeral
</I>&gt;<i> - <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> data welcome
</I>&gt;<i>
</I>&gt;<i> Should anybody have suggestions, I would be grateful!
</I>&gt;<i>
</I>&gt;<i> With kind regards,
</I>&gt;<i> Hans-Juergen
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>
</PRE>
]]></content></entry><entry><title>  [ANN] eXcel Function Library
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003594.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003594.html" /><updated>2009-10-02T14:19:00Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,

the <a title="Understanding FLWOR Expressions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery_flwor.html">FLWOR</a> Foundation has developed a set of library modules written in <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>.
These modules currently consist of 217 functions that provide a <a title="functionality" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/buy/compare.html">functionality</a> similar to the
functionality (e.g. statistic or logic functions) provided in today's <a title="spreadsheet" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_grid_view.html">spreadsheet</a> applications
(e.g. Microsoft Excel).

All the modules are written entirely in XQuery 1.0 (i.e. without external functions) and have
been tested to work with Zorba, <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a>, and eXist.

You can find more information, documentation, and download links at:
http://sourceforge.net/apps/mediawiki/zorba/index.php?title=EXcel_Function_Library

Best,
Sorin Nasoi

---
Sorin Nasoi
Senior Software Engineer
Enea Romania
Trust Center 319C Splaiul Independentei
District 6, Bucharest, Romania, 060044
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091002/98629469/attachment.htm
</PRE>
]]></content></entry><entry><title>  using a variable within a regexp pattern in XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003593.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003593.html" /><updated>2009-10-02T02:38:04Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi Michael,

Thanks a lot for your reply. Sorry about not being more explicit or clear.
I'll bear that in mind for my future emails.

What I meant with &quot;works&quot; is that the search expression and the term did
match. When they matched, the output was the term searched for. When they
didn't match, there was no output.

Thanks a lot for your suggestion. I certainly needed to use concat, but the
expression that eventually did the trick was:

matches(., concat('^', $q, '.*$'))

What I'd like is to control whether the search term matched the entire term,
part of it at the beginning, or part of it at the end, part of it in the
middle, etc.

Thanks again, and good night!
Manuel

2009/10/2 <a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> &lt;http://x-query.com/mailman/listinfo/talk&gt;

&gt;<i>  It's very unhelpful to report that something &quot;doesn't work&quot; without
</I>&gt;<i> saying how it failed. And if you expected the expression to do something
</I>&gt;<i> useful, it's useful to say what you expected it to do: you can't expect us
</I>&gt;<i> to guess the intention behind incorrect code.
</I>&gt;<i>
</I>&gt;<i> If $q is a variable containing part of a <a title="regular expression" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">regular expression</a>, then you can
</I>&gt;<i> include it in a regex using the concat function:
</I>&gt;<i>
</I>&gt;<i> matches(., concat('(', $q, ')*')
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Regards,
</I>&gt;<i>
</I>&gt;<i> Michael Kay
</I>&gt;<i> http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/
</I>&gt;<i> http://twitter.com/michaelhkay
</I>&gt;<i>
</I>&gt;<i>  ------------------------------
</I>&gt;<i> *From:* http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] *On
</I>&gt;<i> Behalf Of *Manuel Souto Pico
</I>&gt;<i> *Sent:* 01 October 2009 19:53
</I>&gt;<i> *To:* http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> *Subject:*  using a variable within a regexp pattern in
</I>&gt;<i> <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>
</I>&gt;<i>
</I>&gt;<i> Hi,
</I>&gt;<i>
</I>&gt;<i> I'm a bit stuck trying to run a regexp pattern in a XQuery search file.
</I>&gt;<i>
</I>&gt;<i> (1) where $record/langSet[@<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>:lang=&quot;en&quot;]/tig/term[matches(., $q)]
</I>&gt;<i> works
</I>&gt;<i> (2) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(.,
</I>&gt;<i> &quot;$q&quot;)]            doesn't work
</I>&gt;<i> (3) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(.,
</I>&gt;<i> &quot;^$q.*$&quot;)]         doesn't work
</I>&gt;<i> (4) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(.,
</I>&gt;<i> &quot;^bu.+$&quot;)]          works!
</I>&gt;<i>
</I>&gt;<i> Any ideas about how I can get to use regular expressions in this query?
</I>&gt;<i>
</I>&gt;<i> (4) retrieves 'bufer', 'bug' and 'bus'. If $q is 'bu', (1) retrieves as
</I>&gt;<i> well 'attri*bu*te', 'contrast *bu*tton', etc.
</I>&gt;<i>
</I>&gt;<i> Thanks a lot!
</I>&gt;<i>
</I>&gt;<i> Cheers, Manuel
</I>&gt;<i>
</I>&gt;<i>
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091002/d6025020/attachment.htm
</PRE>
]]></content></entry><entry><title> RE  using a variable within a regexp pattern
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003589.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003589.html" /><updated>2009-10-02T00:39:34Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Dear David and Hans-Juergen,

Thanks a lot for your replies and, notably, for Jans-Juergen's explanation.
Very useful indeed!

This is a bit more complex than perl's <a title="regular expressions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">regular expressions</a> but still quite
straightforward at the end of the day. The solution had crossed my mind very
fast, but then I got distracted and I forgot. But indeed this is what I
needed:

        where $record/langSet[@<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>:lang=&quot;en&quot;]/tig/term[matches(.,
concat('^', $q, '.*$'))]

Thanks a lot! And keep well :))
Chees, Manuel


2009/10/1 Hans-Juergen Rennau &lt;http://x-query.com/mailman/listinfo/talk&gt;

&gt;<i> Hi Manual,
</I>&gt;<i>
</I>&gt;<i> if I understand you correctly, you wonder how you can compose a match
</I>&gt;<i> pattern from variable and fixed  parts, e.g. framing a variable term by an
</I>&gt;<i> initial ^ and a trailing $, right?
</I>&gt;<i>
</I>&gt;<i> The solution is simple: use an _expression_ whose string value is the
</I>&gt;<i> desired sequence of characters. Often this will be achieved using the concat
</I>&gt;<i> function, whose arguments in turn may be literals, variable references,
</I>&gt;<i> function calls, path expressions.... Examples:
</I>&gt;<i>
</I>&gt;<i> matches(., concat('^', $q, '$'))
</I>&gt;<i> matches(., concat($prefix, $q, $postfix))
</I>&gt;<i> matches(., concat('^', 'ID', position()))
</I>&gt;<i> matches(., concat('^', $n/@criterion, '.*s'))
</I>&gt;<i>
</I>&gt;<i> So the task becomes very simple if you remember that the way an expression
</I>&gt;<i> is resolved to a value is independent on the context where the value is
</I>&gt;<i> used. Therefore, you need not any special knowledge about the matches
</I>&gt;<i> function - all you need is the general understanding how to build an
</I>&gt;<i> expression that resolves to the intended string.
</I>&gt;<i>
</I>&gt;<i> With kind regards,
</I>&gt;<i> Hans-Juergen
</I>&gt;<i>
</I>&gt;<i> ------------------------------
</I>&gt;<i>
</I>&gt;<i> Message: 4
</I>&gt;<i> Date: Thu, 1 Oct 2009 20:53:29 +0200
</I>&gt;<i> From: Manuel Souto Pico &lt;http://x-query.com/mailman/listinfo/talk&gt;
</I>&gt;<i> Subject:  using a variable within a regexp pattern in
</I>&gt;<i>    <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Message-ID:
</I>&gt;<i>    &lt;http://x-query.com/mailman/listinfo/talk&gt;
</I>&gt;<i> Content-Type: text/plain; charset=&quot;iso-8859-1&quot;
</I>&gt;<i>
</I>&gt;<i> Hi,
</I>&gt;<i>
</I>&gt;<i> I'm a bit stuck trying to run a regexp pattern in a XQuery search file.
</I>&gt;<i>
</I>&gt;<i> (1) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(., $q)]
</I>&gt;<i> works
</I>&gt;<i> (2) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(.,
</I>&gt;<i> &quot;$q&quot;)]            doesn't work
</I>&gt;<i> (3) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(.,
</I>&gt;<i> &quot;^$q.*$&quot;)]         doesn't work
</I>&gt;<i> (4) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(.,
</I>&gt;<i> &quot;^bu.+$&quot;)]          works!
</I>&gt;<i>
</I>&gt;<i> Any ideas about how I can get to use regular expressions in this query?
</I>&gt;<i>
</I>&gt;<i> (4) retrieves 'bufer', 'bug' and 'bus'. If $q is 'bu', (1) retrieves as
</I>&gt;<i> well
</I>&gt;<i> 'attri*bu*te', 'contrast *bu*tton', etc.
</I>&gt;<i>
</I>&gt;<i> Thanks a lot!
</I>&gt;<i>
</I>&gt;<i> Cheers, Manuel
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091001/728a81e2/attachment.htm
</PRE>
]]></content></entry><entry><title>  using a variable within a regexp pattern in XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003592.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003592.html" /><updated>2009-10-02T00:39:10Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>It's very unhelpful to report that something &quot;doesn't work&quot; without saying
how it failed. And if you expected the expression to do something useful,
it's useful to say what you expected it to do: you can't expect us to guess
the intention behind incorrect code.
 
If $q is a variable containing part of a <a title="regular expression" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">regular expression</a>, then you can
include it in a regex using the concat function:
 
matches(., concat('(', $q, ')*')
 
Regards,

<a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/
http://twitter.com/michaelhkay 


  _____  

From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf
Of Manuel Souto Pico
Sent: 01 October 2009 19:53
To: http://x-query.com/mailman/listinfo/talk
Subject:  using a variable within a regexp pattern in <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>


Hi, 

I'm a bit stuck trying to run a regexp pattern in a XQuery search file.

(1) where $record/langSet[@<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>:lang=&quot;en&quot;]/tig/term[matches(., $q)]
works
(2) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(., &quot;$q&quot;)]
doesn't work
(3) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(., &quot;^$q.*$&quot;)]
doesn't work
(4) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(., &quot;^bu.+$&quot;)]
works!

Any ideas about how I can get to use regular expressions in this query? 

(4) retrieves 'bufer', 'bug' and 'bus'. If $q is 'bu', (1) retrieves as well
'attribute', 'contrast button', etc.

Thanks a lot! 

Cheers, Manuel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091001/22c0df09/attachment.htm
</PRE>
]]></content></entry><entry><title> RE  using a variable within a regexp pattern
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003588.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003588.html" /><updated>2009-10-01T22:13:38Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi Manual,

if I understand you correctly, you wonder how you can compose a match pattern from variable and fixed  parts, e.g. framing a variable term by an initial ^ and a trailing $, right?

The solution is simple: use an _expression_ whose string value is the desired sequence of characters. Often this will be achieved using the concat function, whose arguments in turn may be literals, variable references, function calls, path expressions.... Examples: 

matches(., concat('^', $q, '$'))
matches(., concat($prefix, $q, $postfix))
matches(., concat('^', 'ID', position()))
matches(., concat('^', $n/@criterion, '.*s'))

So the task becomes very simple if you remember that the way an expression is resolved to a value is independent on the context where the value is used. Therefore, you need not any special knowledge about the matches function - all you need is the general understanding how to build an expression that resolves to the intended string.

With kind regards,
Hans-Juergen

------------------------------

Message: 4
Date: Thu, 1 Oct 2009 20:53:29 +0200
From: Manuel Souto Pico &lt;http://x-query.com/mailman/listinfo/talk&gt;
Subject:  using a variable within a regexp pattern in
    <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>
To: http://x-query.com/mailman/listinfo/talk
Message-ID:
    &lt;http://x-query.com/mailman/listinfo/talk&gt;
Content-Type: text/plain; charset=&quot;<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">iso-8859-1</a>&quot;

Hi,

I'm a bit stuck trying to run a regexp pattern in a XQuery search file.

(1) where $record/langSet[@<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>:lang=&quot;en&quot;]/tig/term[matches(., $q)]
works
(2) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(.,
&quot;$q&quot;)]            doesn't work
(3) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(.,
&quot;^$q.*$&quot;)]         doesn't work
(4) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(.,
&quot;^bu.+$&quot;)]          works!

Any ideas about how I can get to use regular expressions in this query?

(4) retrieves 'bufer', 'bug' and 'bus'. If $q is 'bu', (1) retrieves as well
'attri*bu*te', 'contrast *bu*tton', etc.

Thanks a lot!

Cheers, Manuel


      

</PRE>
]]></content></entry><entry><title>  using a variable within a regexp pattern in XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003586.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003586.html" /><updated>2009-10-01T21:53:29Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,

I'm a bit stuck trying to run a regexp pattern in a <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> search file.

(1) where $record/langSet[@<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>:lang=&quot;en&quot;]/tig/term[matches(., $q)]
works
(2) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(.,
&quot;$q&quot;)]            doesn't work
(3) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(.,
&quot;^$q.*$&quot;)]         doesn't work
(4) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(.,
&quot;^bu.+$&quot;)]          works!

Any ideas about how I can get to use <a title="regular expressions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">regular expressions</a> in this query?

(4) retrieves 'bufer', 'bug' and 'bus'. If $q is 'bu', (1) retrieves as well
'attri*bu*te', 'contrast *bu*tton', etc.

Thanks a lot!

Cheers, Manuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091001/f1af370d/attachment.htm
</PRE>
]]></content></entry><entry><title> FW:  Unexpected token syntax error,
	unexpected DeclareFunction_
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003591.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003591.html" /><updated>2009-10-01T19:29:31Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>At 2009-10-01 15:18 -0700, Anil Shekhar wrote:
&gt;<i>Thanks Ken.  It worked.  I did <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/learn_xml.html">learn</a> something new today.
</I>&gt;<i>
</I>&gt;<i>I am able to successfully read from a database.  However if I add the argum=
</I>&gt;<i>ent to doc() to read files from the file system I do not see anything being=
</I>&gt;<i>  displayed - blank page.
</I>&gt;<i>
</I>&gt;<i>for $d in doc(&quot;<A HREF="file:///C:/Users/ashekhar/Desktop/Mark">file:///C:/Users/ashekhar/Desktop/Mark</A> Logic/Shakespeare/*.x=
</I>&gt;<i>ml&quot;)
</I>&gt;<i>
</I>&gt;<i>Can you please help me understand?
</I>
Perhaps it is because you've used a singleton access function (the 
doc() function returns a single root node for the one document you 
are addressing) with a wildcard &quot;*.xml&quot; URI implying multiple documents.

If you want multiple documents returned with a single call, use the 
collection() function, but ensure first that the syntax you use in 
your URI is supported by the vendor of the <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> tool.  All URI 
strings for accessing resources are implementation defined and not 
standardized.

I hope this helps.

. . . . . . . . . . . . Ken


--
Upcoming hands-on code list, <a title="UBL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/ubl/index.html">UBL</a>, <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>, XQuery and <a title="XSL-FO" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xsl_fo.html">XSL-FO</a> classes.
Interested in other classes?  http://www.CraneSoftwrights.com/q/i/
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/q/
Training tools: Comprehensive interactive XSLT/<a title="XML XPath Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath 1.0</a>/2.0 <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_videos.html">video</a>
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&amp;fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&amp;fmt=18
G. Ken Holman                 mailto:http://x-query.com/mailman/listinfo/talk
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/q/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

</PRE>
]]></content></entry><entry><title>  using a variable within a regexp pattern in XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003587.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003587.html" /><updated>2009-10-01T16:40:28Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>you haven't said what you want to occur.
But I am guessing maybe this is what you are looking for

*    where $record/langSet[@<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>:lang=&quot;en&quot;]/tig/term[matches(., 
fn:concat(&quot;^&quot;,$q,&quot;.*$&quot;))] *

David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224



Manuel Souto Pico wrote:
&gt;<i> Hi,
</I>&gt;<i>
</I>&gt;<i> I'm a bit stuck trying to run a regexp pattern in a <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> search file.
</I>&gt;<i>
</I>&gt;<i> (1) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(., 
</I>&gt;<i> $q)]          works
</I>&gt;<i> (2) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(., 
</I>&gt;<i> &quot;$q&quot;)]            doesn't work
</I>&gt;<i> (3) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(., 
</I>&gt;<i> &quot;^$q.*$&quot;)]         doesn't work
</I>&gt;<i> (4) where $record/langSet[@xml:lang=&quot;en&quot;]/tig/term[matches(., 
</I>&gt;<i> &quot;^bu.+$&quot;)]          works!
</I>&gt;<i>
</I>&gt;<i> Any ideas about how I can get to use <a title="regular expressions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">regular expressions</a> in this query?
</I>&gt;<i>
</I>&gt;<i> (4) retrieves 'bufer', 'bug' and 'bus'. If $q is 'bu', (1) retrieves 
</I>&gt;<i> as well 'attri*bu*te', 'contrast *bu*tton', etc.
</I>&gt;<i>
</I>&gt;<i> Thanks a lot!
</I>&gt;<i>
</I>&gt;<i> Cheers, Manuel
</I>&gt;<i> ------------------------------------------------------------------------
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091001/861229e5/attachment.htm
</PRE>
]]></content></entry><entry><title> FW:  Unexpected token syntax error, unexpected
	DeclareFunction_
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003590.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003590.html" /><updated>2009-10-01T16:18:09Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
Thanks Ken.  It worked.  I did <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/learn_xml.html">learn</a> something new today.

I am able to successfully read from a database.  However if I add the argument to doc() to read files from the file system I do not see anything being displayed - blank page.

for $d in doc(&quot;<A HREF="file:///C:/Users/ashekhar/Desktop/Mark">file:///C:/Users/ashekhar/Desktop/Mark</A> Logic/Shakespeare/*.xml&quot;)

Can you please help me understand?
 Thanks
Anil






&gt;<i> Date: Wed, 30 Sep 2009 21:53:30 -0400
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> From: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject: Re:  Unexpected token syntax error, unexpected	DeclareFunction_
</I>&gt;<i> CC: 
</I>&gt;<i> 
</I>&gt;<i> At 2009-09-30 18:13 -0700, Anil Shekhar wrote:
</I>&gt;<i> &gt;XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, 
</I>&gt;<i> &gt;unexpected DeclareFunction_
</I>&gt;<i> 
</I>&gt;<i> The message says that your declaration of a function is unexpected.
</I>&gt;<i> 
</I>&gt;<i> &gt;in /shakespeare.xqy, on line 8 [1.0-ml]Line 8 is where I have 
</I>&gt;<i> &gt;defined the function.
</I>&gt;<i> 
</I>&gt;<i> Sure enough, that isn't an expected place for a function definition.
</I>&gt;<i> 
</I>&gt;<i> Reviewing:  http://www.w3.org/TR/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>/#id-function-calls
</I>&gt;<i> 
</I>&gt;<i> &gt;3.1.5 Function Calls
</I>&gt;<i> &gt;[Definition: The built-in functions supported by XQuery are defined 
</I>&gt;<i> &gt;in [XQuery 1.0 and <a title="XPath 1.0" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath 2.0</a> Functions and Operators].] Additional 
</I>&gt;<i> &gt;functions may be declared in a Prolog, imported from a library 
</I>&gt;<i> &gt;module, or provided by the external environment as part of the static context.
</I>&gt;<i> 
</I>&gt;<i> And that is pretty explicit that functions can only be declared in the prolog.
</I>&gt;<i> 
</I>&gt;<i> You have:
</I>&gt;<i> 
</I>&gt;<i> &gt;&lt;html&gt;
</I>&gt;<i> &gt;     &lt;head&gt;
</I>&gt;<i> &gt;         &lt;title&gt;Shakespeare ...&lt;/title&gt;
</I>&gt;<i> &gt;     &lt;/head&gt;
</I>&gt;<i> &gt;     &lt;body&gt;
</I>&gt;<i> &gt;         &lt;p&gt;
</I>&gt;<i> &gt;         {
</I>&gt;<i> &gt;             declare function local:handle-doc(
</I>&gt;<i> &gt;                 $doc      as document-node(),
</I>&gt;<i> &gt;                 $speeches as element(SPEECH)+
</I>&gt;<i> &gt;             )
</I>&gt;<i> 
</I>&gt;<i> .... which doesn't have the declaration in the prolog, but in the 
</I>&gt;<i> middle of the query.
</I>&gt;<i> 
</I>&gt;<i> So I think the error message is quite justified.
</I>&gt;<i> 
</I>&gt;<i> I hope this helps.
</I>&gt;<i> 
</I>&gt;<i> . . . . . . . . . . Ken
</I>&gt;<i> 
</I>&gt;<i> --
</I>&gt;<i> Upcoming hands-on code list, <a title="UBL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/ubl/index.html">UBL</a>, <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>, XQuery and <a title="XSL-FO" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xsl_fo.html">XSL-FO</a> classes.
</I>&gt;<i> Interested in other classes?  http://www.CraneSoftwrights.com/q/i/
</I>&gt;<i> Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/q/
</I>&gt;<i> Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_videos.html">video</a>
</I>&gt;<i> Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&amp;fmt=18
</I>&gt;<i> Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&amp;fmt=18
</I>&gt;<i> G. Ken Holman                 mailto:http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/q/bc
</I>&gt;<i> Legal business disclaimers:  http://www.CraneSoftwrights.com/legal
</I>&gt;<i> 
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I> 		 	   		  
_________________________________________________________________
Insert movie times and more without leaving Hotmail&#174;.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091001/eb054f0b/attachment.htm
</PRE>
]]></content></entry><entry><title>  Unexpected token syntax error,
	unexpected DeclareFunction_
   </title><id>http://www.stylusstudio.com/xquerytalk/200910/003585.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200910/003585.html" /><updated>2009-10-01T12:50:41Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Anil,

Since this is a question specific to MarkLogic Server, I recommend 
joining the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing list</a> at 
http://developer.marklogic.com/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discuss</a>/subscribe.xqy?list=general

You can also search the list: for example, try 
http://marklogic.markmail.org/search/?q=XDMP-UNEXPECTED+1.0-ml (the 
second hit is relevant: http://markmail.org/thread/2nuwbppxeemsrpjs).

The problem you're running into is that the shakespeare <a title="demo" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_videos.html">demo</a> code is 
somewhat old, and was written in a custom dialect that is not quite 
<a title="XQuery 1.0" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery 1.0</a>. To use this older demo code, set the &quot;default xquery 
version&quot; for your app server (the one configured to listen on port 8010) 
to &quot;0.9-ml&quot;.

-- Mike

On 2009-09-30 18:13, Anil Shekhar wrote:
&gt;<i> Dear Experts,
</I>&gt;<i>
</I>&gt;<i> I am new to XQuery and I need your help.  I am getting the following error when accessed ...
</I>&gt;<i>
</I>&gt;<i> http://127.0.0.1:8010/shakespeare.xqy
</I>&gt;<i> 500 Internal Server Error
</I>&gt;<i>
</I>&gt;<i> XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, unexpected DeclareFunction_
</I>&gt;<i>
</I>&gt;<i> in /shakespeare.xqy, on line 8 [1.0-ml]
</I>&gt;<i>
</I>&gt;<i> Line 8 is where I have defined the function.
</I>&gt;<i>
</I>&gt;<i> Thanks
</I>&gt;<i> Anil
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> &lt;html&gt;
</I>&gt;<i>      &lt;head&gt;
</I>&gt;<i>          &lt;title&gt;Shakespeare ...&lt;/title&gt;
</I>&gt;<i>      &lt;/head&gt;
</I>&gt;<i>      &lt;body&gt;
</I>&gt;<i>          &lt;p&gt;
</I>&gt;<i>          {
</I>&gt;<i>              declare function local:handle-doc(
</I>&gt;<i>                  $doc      as document-node(),
</I>&gt;<i>                  $speeches as element(SPEECH)+
</I>&gt;<i>              )
</I>&gt;<i>              {
</I>&gt;<i>                  &lt;h1&gt;{ document-uri($doc) }&lt;/h1&gt;,
</I>&gt;<i>                  for $speech  in $speeches
</I>&gt;<i>                  let $speaker := $speech/SPEAKER
</I>&gt;<i>                  let $lines   := $speech/LINE
</I>&gt;<i>                  return (
</I>&gt;<i>                      &lt;h3&gt;{ $speaker/text() }&lt;/h3&gt;,
</I>&gt;<i>                      &lt;p&gt;{ $lines/text() }&lt;/p&gt;
</I>&gt;<i>                  )
</I>&gt;<i>              };
</I>&gt;<i>
</I>&gt;<i>              for $d in doc(&quot;<A HREF="file:///C:/Users/ashekhar/Desktop/Mark">file:///C:/Users/ashekhar/Desktop/Mark</A> Logic/Shakespeare/*.<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>&quot;)
</I>&gt;<i>                  order by $d ascending
</I>&gt;<i>                  return local:handle-doc($d, $d//SPEECH)
</I>&gt;<i>          }
</I>&gt;<i>          &lt;/p&gt;
</I>&gt;<i>      &lt;/body&gt;
</I>&gt;<i> &lt;/html&gt;)
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> ________________________________
</I>&gt;<i> Insert movie times and more without leaving Hotmail&#174;. See how.&lt;http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009&gt;
</I>&gt;<i>
</I>


</PRE>
]]></content></entry><entry><title>  Unexpected token syntax error, unexpected
	DeclareFunction_
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003584.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003584.html" /><updated>2009-09-30T22:53:30Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>At 2009-09-30 18:13 -0700, Anil Shekhar wrote:
&gt;<i>XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, 
</I>&gt;<i>unexpected DeclareFunction_
</I>
The message says that your declaration of a function is unexpected.

&gt;<i>in /shakespeare.xqy, on line 8 [1.0-ml]Line 8 is where I have 
</I>&gt;<i>defined the function.
</I>
Sure enough, that isn't an expected place for a function definition.

Reviewing:  http://www.<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/TR/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>/#id-function-calls

&gt;<i>3.1.5 Function Calls
</I>&gt;<i>[Definition: The built-in functions supported by XQuery are defined 
</I>&gt;<i>in [XQuery 1.0 and <a title="XPath 1.0" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath 2.0</a> Functions and Operators].] Additional 
</I>&gt;<i>functions may be declared in a Prolog, imported from a library 
</I>&gt;<i>module, or provided by the external environment as part of the static context.
</I>
And that is pretty explicit that functions can only be declared in the prolog.

You have:

&gt;<i>&lt;html&gt;
</I>&gt;<i>     &lt;head&gt;
</I>&gt;<i>         &lt;title&gt;Shakespeare ...&lt;/title&gt;
</I>&gt;<i>     &lt;/head&gt;
</I>&gt;<i>     &lt;body&gt;
</I>&gt;<i>         &lt;p&gt;
</I>&gt;<i>         {
</I>&gt;<i>             declare function local:handle-doc(
</I>&gt;<i>                 $doc      as document-node(),
</I>&gt;<i>                 $speeches as element(SPEECH)+
</I>&gt;<i>             )
</I>
.... which doesn't have the declaration in the prolog, but in the 
middle of the query.

So I think the error message is quite justified.

I hope this helps.

. . . . . . . . . . Ken

--
Upcoming hands-on code list, <a title="UBL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/ubl/index.html">UBL</a>, <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>, XQuery and <a title="XSL-FO" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xsl_fo.html">XSL-FO</a> classes.
Interested in other classes?  http://www.CraneSoftwrights.com/q/i/
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/q/
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_videos.html">video</a>
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&amp;fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&amp;fmt=18
G. Ken Holman                 mailto:http://x-query.com/mailman/listinfo/talk
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/q/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

</PRE>
]]></content></entry><entry><title>  Unexpected token syntax error,
	unexpected DeclareFunction_
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003583.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003583.html" /><updated>2009-09-30T19:13:51Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
Dear Experts,

I am new to <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> and I need your help.  I am getting the following error when accessed ...

http://127.0.0.1:8010/shakespeare.xqy
500 Internal Server Error
      XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, unexpected DeclareFunction_
in /shakespeare.xqy, on line 8 [1.0-ml]
Line 8 is where I have defined the function.

Thanks
Anil



&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;Shakespeare ...&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;p&gt;
        {
            declare function local:handle-doc(
                $doc      as document-node(),
                $speeches as element(SPEECH)+
            )
            {
                &lt;h1&gt;{ document-uri($doc) }&lt;/h1&gt;,
                for $speech  in $speeches
                let $speaker := $speech/SPEAKER
                let $lines   := $speech/LINE
                return (
                    &lt;h3&gt;{ $speaker/text() }&lt;/h3&gt;,
                    &lt;p&gt;{ $lines/text() }&lt;/p&gt;
                )
            };

            for $d in doc(&quot;<A HREF="file:///C:/Users/ashekhar/Desktop/Mark">file:///C:/Users/ashekhar/Desktop/Mark</A> Logic/Shakespeare/*.<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>&quot;)
                order by $d ascending
                return local:handle-doc($d, $d//SPEECH)
        }
        &lt;/p&gt;
    &lt;/body&gt;
&lt;/html&gt;)









 		 	   		  
_________________________________________________________________
Insert <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_videos.html">movie</a> times and more without leaving Hotmail&#174;.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090930/246e6c1b/attachment.htm
</PRE>
]]></content></entry><entry><title>  UTF-8
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003580.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003580.html" /><updated>2009-09-29T21:23:12Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&quot;<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">UTF-8</a>&quot; is default value for encoding attribute in <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> prolog

On Tue, Sep 29, 2009 at 8:14 PM, Jesus Rodrigues
&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Dear,
</I>&gt;<i>
</I>&gt;<i> I needed read a lot of xml and some of this file haven't the attribute
</I>&gt;<i> encoding=&quot;UTF-8&quot;. And some xml has too a problem with utf-8 (invalid
</I>&gt;<i> character like this GA&#65533;?S). I haven't control about the xml I just needed
</I>&gt;<i> read.
</I>&gt;<i>
</I>&gt;<i> Is possible solution this problem using the <a title="saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">saxon</a>? For example, setting the
</I>&gt;<i> encoding dynamically, before the build (newDocumentBuilder().build(stream))?
</I>&gt;<i>
</I>&gt;<i> Regards,
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>
</PRE>
]]></content></entry><entry><title>  UTF-8
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003582.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003582.html" /><updated>2009-09-29T18:48:42Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>If the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> document has an <a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a> declaration (&lt;?xml encoding=&quot;....&quot;?&gt;) then you must ensure that the file is actually encoded using this encoding.
 
If the XML document has no encoding declaration, then it should typically be encoded in UTF-8 (though there are other ways of indicating the encoding, for example using byte-order-marks, or in an HTTP header). 
 
The most common cause of encoding problems is when you use an encoding such as iso-8859-1 for your document, but have no encoding declaration on the XML document.
 
If you know the encoding of your document, you can always decode it into a character stream yourself, and then pass the character stream to the <a title="php xml parser" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/parser.html">XML parser</a> (e.g. in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a> in the form of a Reader).
 
Regards,

<a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/
http://twitter.com/michaelhkay 

 


  _____  

From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf Of Jesus Rodrigues
Sent: 29 September 2009 17:15
To: http://x-query.com/mailman/listinfo/talk
Subject:  UTF-8



Dear,




I needed read a lot of xml and some of this file haven't the attribute encoding=&quot;UTF-8&quot;. And some xml has too a problem with utf-8 (invalid character like this GA&#65533;?S). I haven't control about the xml I just needed read.




Is possible solution this problem using the <a title="saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">saxon</a>? For example, setting the encoding dynamically, before the build (newDocumentBuilder().build(stream))?




Regards,




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090929/160019a2/attachment.htm
</PRE>
]]></content></entry><entry><title>  UTF-8
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003581.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003581.html" /><updated>2009-09-29T14:35:50Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Dear Vyacheslav Sedov

However, sometime the file that I'm try to read wasn't a UFT-8.

is it possible set the <a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a> dynamically? Or it's necessary open the file
and <a title="convert" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/convert_to_xml.html">convert</a> to UFT-8?


Regards


2009/9/29 Vyacheslav Sedov &lt;http://x-query.com/mailman/listinfo/talk&gt;

&gt;<i> &quot;UTF-8&quot; is default value for encoding attribute in <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> prolog
</I>&gt;<i>
</I>&gt;<i> On Tue, Sep 29, 2009 at 8:14 PM, Jesus Rodrigues
</I>&gt;<i> &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
</I>&gt;<i> &gt; Dear,
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; I needed read a lot of xml and some of this file haven't the attribute
</I>&gt;<i> &gt; encoding=&quot;UTF-8&quot;. And some xml has too a problem with utf-8 (invalid
</I>&gt;<i> &gt; character like this GA&#65533;?S). I haven't control about the xml I just needed
</I>&gt;<i> &gt; read.
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Is possible solution this problem using the <a title="saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">saxon</a>? For example, setting
</I>&gt;<i> the
</I>&gt;<i> &gt; encoding dynamically, before the build
</I>&gt;<i> (newDocumentBuilder().build(stream))?
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Regards,
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; _______________________________________________
</I>&gt;<i> &gt; http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> &gt; http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> &gt;
</I>&gt;<i>
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090929/155eccb0/attachment.htm
</PRE>
]]></content></entry><entry><title>  UTF-8
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003579.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003579.html" /><updated>2009-09-29T14:14:31Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Dear,


 I needed read a lot of <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> and some of this file haven't the attribute
<a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a>=*&quot;UTF-8&quot;*. And some xml has too a problem with utf-8 (invalid
character like this GA&#65533;?S). I haven't control about the xml I just needed
read.


 Is possible solution this problem using the <a title="saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">saxon</a>? For example, setting the
encoding dynamically, before the build (newDocumentBuilder().build(stream))?


 Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090929/5c8b6218/attachment.htm
</PRE>
]]></content></entry><entry><title>  Re: Combining XSLT 2.0's Grouping with eXist
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003578.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003578.html" /><updated>2009-09-28T12:21:10Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Bill,

Yes eXist provides mechanisms for transforming directly <a title="An Introduction to XSLT Development" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xsltedit1/xsltedit1.html">using XSLT</a>
without the need for <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a> -
1) XQuery <a title="EXSLT Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt/exslt.html">extension function</a> transform:transform(...) which Andrew
already mentioned.
2) Some sort <a title="XML Pipelines" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/pipeline.html">of custom pipeline</a> using our Controller XQuery approach
3) XProc pipeline using our XProcXQ
4) XSL-PI


Probably best if you join the eXist <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing list</a> for such questions.

2009/9/28 Andrew Welch &lt;http://x-query.com/mailman/listinfo/talk&gt;:
&gt;<i> Hi Bill,
</I>&gt;<i>
</I>&gt;<i> The best thing to do is sign up to one of the mailing lists:
</I>&gt;<i>
</I>&gt;<i> &quot;xquery talk&quot; http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>&gt;<i> &quot;xml dev&quot; http://www.xml.org/xml-dev/
</I>&gt;<i>
</I>&gt;<i> Ask your question there, hopefully get a helpful response, and then
</I>&gt;<i> the email chain gets archived so its useful for anyone encountering a
</I>&gt;<i> similar problem in the future.
</I>&gt;<i>
</I>&gt;<i> The short answer is yes - most xquery engines provide a way of
</I>&gt;<i> transforming a the result of a query through a proprietary extension,
</I>&gt;<i> the one for eXist is documented here:
</I>&gt;<i>
</I>&gt;<i> http://exist.sourceforge.net/xquery.html#N10375
</I>&gt;<i>
</I>&gt;<i> cheers
</I>&gt;<i> andrew
</I>&gt;<i>
</I>&gt;<i> 2009/9/26 Bill Girten &lt;http://x-query.com/mailman/listinfo/talk&gt;:
</I>&gt;&gt;<i> Andrew,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Thanks for the piece you did on this area. &#160;I'm looking for a little
</I>&gt;&gt;<i> clarity, however.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I'm an IT consultant that's worked with BEA's Aqualogic Data Services
</I>&gt;&gt;<i> XQuery engine in the past. &#160;I've been playing with eXist 1.26 and now
</I>&gt;&gt;<i> the 1.4RC. &#160;Here's my question:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Is it worth looking into the Sitemap stuff (missed that revolution
</I>&gt;&gt;<i> years ago) since Wolgang Meir is deprecating a lot of the Cocoon gear?
</I>&gt;&gt;<i> &#160;Although I love Java, I want to get away from <a title="Free XSL Editor" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt_editor.html">XSL transformation</a> via
</I>&gt;&gt;<i> calling on the process via a <a title="Java class" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/java_code_generation.html">Java class</a>. &#160;Is there a way to seamlessly
</I>&gt;&gt;<i> transform the eXist results set without the need of running the XML
</I>&gt;&gt;<i> through Java to get XHTML?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Sorry if I sound like a newbie.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Thanks,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Bill Girten
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> Andrew Welch
</I>&gt;<i> http://andrewjwelch.com
</I>&gt;<i> Kernow: http://kernowforsaxon.sf.net/
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>


-- 
Adam Retter

skype :adam.retter
http://www.adamretter.org.uk

</PRE>
]]></content></entry><entry><title>  Re: Combining XSLT 2.0's Grouping with eXist
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003577.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003577.html" /><updated>2009-09-28T10:24:02Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi Bill,

The best thing to do is sign up to one of the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing lists</a>:

&quot;<a title="xquery talk" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquerytalk/">xquery talk</a>&quot; http://x-query.com/mailman/listinfo/talk

&quot;<a title="xml dev" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xmldev/">xml dev</a>&quot; http://www.xml.org/xml-dev/

Ask your question there, hopefully get a helpful response, and then
the email chain gets archived so its useful for anyone encountering a
similar problem in the future.

The short answer is yes - most xquery engines provide a way of
transforming a the result of a query through a proprietary extension,
the one for eXist is documented here:

http://exist.sourceforge.net/xquery.html#N10375

cheers
andrew

2009/9/26 Bill Girten &lt;http://x-query.com/mailman/listinfo/talk&gt;:
&gt;<i> Andrew,
</I>&gt;<i>
</I>&gt;<i> Thanks for the piece you did on this area. &#160;I'm looking for a little
</I>&gt;<i> clarity, however.
</I>&gt;<i>
</I>&gt;<i> I'm an IT consultant that's worked with BEA's Aqualogic Data Services
</I>&gt;<i> XQuery engine in the past. &#160;I've been playing with eXist 1.26 and now
</I>&gt;<i> the 1.4RC. &#160;Here's my question:
</I>&gt;<i>
</I>&gt;<i> Is it worth looking into the Sitemap stuff (missed that revolution
</I>&gt;<i> years ago) since Wolgang Meir is deprecating a lot of the Cocoon gear?
</I>&gt;<i> &#160;Although I love <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a>, I want to get away from <a title="Free XSL Editor" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt_editor.html">XSL transformation</a> via
</I>&gt;<i> calling on the process via a <a title="Java class" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/java_code_generation.html">Java class</a>. &#160;Is there a way to seamlessly
</I>&gt;<i> transform the eXist results set without the need of running the XML
</I>&gt;<i> through Java to get XHTML?
</I>&gt;<i>
</I>&gt;<i> Sorry if I sound like a newbie.
</I>&gt;<i>
</I>&gt;<i> Thanks,
</I>&gt;<i>
</I>&gt;<i> Bill Girten
</I>&gt;<i>
</I>


-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

</PRE>
]]></content></entry><entry><title>  Can FLWOR be FLOWR?
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003575.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003575.html" /><updated>2009-09-24T17:39:11Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Schwartz, Christine wrote:
&gt;<i> I&#8217;m helping teach some basic <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> and was asked this question: In a
</I>&gt;<i> <a title="XQuery FLWOR" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery_flwor.html">FLWOR expression</a>, does the where clause have to come before an order by
</I>&gt;<i> clause?
</I>&gt;<i> 
</I>&gt;<i> Seems like it should, but can&#8217;t seem to find this written down anywhere.
</I>
The order of the clauses is fixed for XQuery 1.0, with &quot;order by&quot; coming
after &quot;where&quot;.

In XQuery 1.1 this restriction will be relaxed, allowing clauses in
almost any order (you have to start with &quot;for&quot;, &quot;let&quot; etc.) and multiple
&quot;order by&quot; or &quot;where&quot; clauses.

John

-- 
John Snelson, <a title="Oracle" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/oracle.html">Oracle</a> Corporation            http://snelson.org.uk/john
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dbxml.html">Berkeley DB XML</a>:            http://oracle.com/database/berkeley-db/xml
XQilla:                                  http://xqilla.sourceforge.net
</PRE>
]]></content></entry><entry><title>  Can FLWOR be FLOWR?
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003576.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003576.html" /><updated>2009-09-24T17:27:16Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Ken and John,

Thanks for your help with this. It's interesting to know that <a title="XQuery 1.1" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery 1.1</a> will be changing this required order.

Regards,
 
Chris
 
 
&gt;<i> Snelson, John wrote:
</I>&gt;<i> 
</I>&gt;<i> Schwartz, Christine wrote:
</I>&gt;<i> &gt; I&#8217;m helping teach some basic XQuery and was asked this question: In a
</I>&gt;<i> &gt; <a title="XQuery FLWOR" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery_flwor.html">FLWOR expression</a>, does the where clause have to come before an order
</I>&gt;<i> by
</I>&gt;<i> &gt; clause?
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Seems like it should, but can&#8217;t seem to find this written down
</I>&gt;<i> anywhere.
</I>&gt;<i> 
</I>&gt;<i> The order of the clauses is fixed for XQuery 1.0, with &quot;order by&quot;
</I>&gt;<i> coming
</I>&gt;<i> after &quot;where&quot;.
</I>&gt;<i> 
</I>&gt;<i> In XQuery 1.1 this restriction will be relaxed, allowing clauses in
</I>&gt;<i> almost any order (you have to start with &quot;for&quot;, &quot;let&quot; etc.) and
</I>&gt;<i> multiple
</I>&gt;<i> &quot;order by&quot; or &quot;where&quot; clauses.
</I>&gt;<i> 
</I>&gt;<i> John
</I>&gt;<i>
</I>

</PRE>
]]></content></entry><entry><title>  Can FLWOR be FLOWR?
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003574.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003574.html" /><updated>2009-09-24T12:18:33Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>At 2009-09-24 11:08 -0400, Schwartz, Christine wrote:
&gt;<i>I'm helping teach some basic <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> and was asked this question: In 
</I>&gt;<i>a <a title="XQuery FLWOR" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery_flwor.html">FLWOR expression</a>, does the where clause have to come before an 
</I>&gt;<i>order by clause?
</I>
Yes, because it qualifies the set that is to be ordered.

&gt;<i>Seems like it should, but can't seem to find this written down anywhere.
</I>
Production [33] indicates that the where clause precedes the order by clause:

http://www.w3.org/TR/2007/REC-xquery-20070123/#id-flwor-expressions

I hope this helps.

. . . . . . Ken


--
Upcoming hands-on code list, <a title="UBL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/ubl/index.html">UBL</a>, <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>, XQuery and <a title="XSL-FO" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xsl_fo.html">XSL-FO</a> classes.
Interested in other classes?  http://www.CraneSoftwrights.com/q/i/
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/q/
Training tools: Comprehensive interactive XSLT/<a title="XML XPath Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath 1.0</a>/2.0 <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_videos.html">video</a>
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&amp;fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&amp;fmt=18
G. Ken Holman                 mailto:http://x-query.com/mailman/listinfo/talk
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/q/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

</PRE>
]]></content></entry><entry><title>  Can FLWOR be FLOWR?
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003573.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003573.html" /><updated>2009-09-24T12:08:55Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi, 

 

I'm helping teach some basic <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> and was asked this question: In a
<a title="XQuery FLWOR" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery_flwor.html">FLWOR expression</a>, does the where clause have to come before an order by
clause?

 

Seems like it should, but can't seem to find this written down anywhere.

 

Thanks,

 

Chris

 

Christine Schwartz

Metadata Librarian

Princeton Theological Seminary Libraries

http://x-query.com/mailman/listinfo/talk

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090924/84cc4959/attachment.htm
</PRE>
]]></content></entry><entry><title>  Re: [xml-dev] Serialization of XDM - Use cases
	/Proposal
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003571.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003571.html" /><updated>2009-09-19T00:00:53Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
Good start.

The next section before you go into specification should perhaps be
&quot;Requirements&quot;, including assumptions and constraints. This might include
statements such as:

* Serialized XDM will retain information about the descendants of nodes in
the sequence being serialized, but it will not retain information about
their ancestors.

* Serialized XDM will not retain information about node identity: that is,
the recipient of the serialized XDM will not be able to determine whether
two serialized elements originated from the same node or merely from two
nodes that were deep-equal to each other.

* The consumer of the serialized XDM is assumed to have access to the same
schema as the producer of the serialized XDM: that is, a QName identifying a
type is assumed to have the same meaning to both the producer and consumer.

* If A and B are two XDM sequences, then xml-<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/canonical_xml.html">canonicalize</a>(xdm-serialize(A)))
is codepoint-equal to xml-canonicalize(xdm-serialize(B))) if and only if
fn:deep-equal(A, B). [Actually, that's probably not a good requirement,
because fn:deep-equal() discards comments and PIs and you probably don't
want to do that].

These are just example statements, you might want to substitute different
ones: they are just intended to illustrate the kind of thing that needs to
be said.

Regards,

<a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/
http://twitter.com/michaelhkay 

&gt;<i> -----Original Message-----
</I>&gt;<i> From: http://x-query.com/mailman/listinfo/talk 
</I>&gt;<i> [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf Of David A. Lee
</I>&gt;<i> Sent: 18 September 2009 22:07
</I>&gt;<i> Cc: http://x-query.com/mailman/listinfo/talk; http://x-query.com/mailman/listinfo/talk; XProc Dev
</I>&gt;<i> Subject:  Re: [xml-dev] Serialization of XDM - 
</I>&gt;<i> <a title="Use cases" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">Use cases</a> /Proposal
</I>&gt;<i> 
</I>&gt;<i> I have created a first pass at documenting the problem of XDM 
</I>&gt;<i> Serialization and created some use cases.
</I>&gt;<i> I would love any feedback or comments.  This is on a new <a title="The Stylus Studio Wiki" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://wiki.stylusstudio.com/">wiki</a> 
</I>&gt;<i> I created for this purpose.  If you would like to comment 
</I>&gt;<i> directly on the wiki please reply to me and I will give you 
</I>&gt;<i> the invite code (due to the sad state of affairs anonymous 
</I>&gt;<i> comments and editing are disabled due to wiki-spam-bots.  
</I>&gt;<i> I've found spam within 5 minutes of opening a public wiki ... &lt;sigh&gt; )
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i> http://xml.calldei.com/XDMSerialize
</I>&gt;<i> 
</I>&gt;<i> I have NOT included a proposal for a format yet, I'd like to 
</I>&gt;<i> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discuss</a> the intent and use cases first before putting up a 
</I>&gt;<i> straw-man proposal.
</I>&gt;<i> 
</I>&gt;<i> Thank you for any contribution !
</I>&gt;<i> 
</I>&gt;<i> I've CC'd this to xproc-dev because one of the use cases if 
</I>&gt;<i> for developers and integrators with <a title="XML Pipeline Software" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/pipeline.html">XML Pipeline</a> processors 
</I>&gt;<i> such as XProc
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i> David A. Lee
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk  
</I>&gt;<i> http://www.calldei.com
</I>&gt;<i> http://www.xmlsh.org
</I>&gt;<i> 812-482-5224
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>
</PRE>
]]></content></entry><entry><title> [xml-dev] RE:  Re: [xml-dev] Serialization of XDM
	- Use cases /Proposal
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003572.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003572.html" /><updated>2009-09-18T21:06:51Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Thanks Michael.  I think my next step will be to document what 
attributes of XDM should be maintained through serialization and what 
will be dropped.
I agree that Node Identity is not something that can reasonably be 
maintained.
Ancestry is an interesting concept I hadn't considered ...
e.g. if you serialize a node $node ... its not expected that a 
reconstituted XDM  $node could evaluate  $node/..

<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">Schema</a> equivilence is interesting, I was thinking of addressing (or 
punting !) that concept with type information.
Ignoring (or assuming) common xsd:* types ...

If for example a value is of type   mytype:abc  ... I think agree its a 
good presumption that the target environment has access to the same types.
Otherwise we open the box of having to serialize all the type 
information along with the XDM values. Good call.




David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224



<a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> wrote:
&gt;<i> Good start.
</I>&gt;<i>
</I>&gt;<i> The next section before you go into specification should perhaps be
</I>&gt;<i> &quot;Requirements&quot;, including assumptions and constraints. This might include
</I>&gt;<i> statements such as:
</I>&gt;<i>
</I>&gt;<i> * Serialized XDM will retain information about the descendants of nodes in
</I>&gt;<i> the sequence being serialized, but it will not retain information about
</I>&gt;<i> their ancestors.
</I>&gt;<i>
</I>&gt;<i> * Serialized XDM will not retain information about node identity: that is,
</I>&gt;<i> the recipient of the serialized XDM will not be able to determine whether
</I>&gt;<i> two serialized elements originated from the same node or merely from two
</I>&gt;<i> nodes that were deep-equal to each other.
</I>&gt;<i>
</I>&gt;<i> * The consumer of the serialized XDM is assumed to have access to the same
</I>&gt;<i> schema as the producer of the serialized XDM: that is, a QName identifying a
</I>&gt;<i> type is assumed to have the same meaning to both the producer and consumer.
</I>&gt;<i>
</I>&gt;<i> * If A and B are two XDM sequences, then xml-<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/canonical_xml.html">canonicalize</a>(xdm-serialize(A)))
</I>&gt;<i> is codepoint-equal to xml-canonicalize(xdm-serialize(B))) if and only if
</I>&gt;<i> fn:deep-equal(A, B). [Actually, that's probably not a good requirement,
</I>&gt;<i> because fn:deep-equal() discards comments and PIs and you probably don't
</I>&gt;<i> want to do that].
</I>&gt;<i>
</I>&gt;<i> These are just example statements, you might want to substitute different
</I>&gt;<i> ones: they are just intended to illustrate the kind of thing that needs to
</I>&gt;<i> be said.
</I>&gt;<i>
</I>&gt;<i> Regards,
</I>&gt;<i>
</I>&gt;<i> Michael Kay
</I>&gt;<i> http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/
</I>&gt;<i> http://twitter.com/michaelhkay 
</I>&gt;<i>
</I>&gt;<i>   
</I>&gt;&gt;<i> -----Original Message-----
</I>&gt;&gt;<i> From: http://x-query.com/mailman/listinfo/talk 
</I>&gt;&gt;<i> [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf Of David A. Lee
</I>&gt;&gt;<i> Sent: 18 September 2009 22:07
</I>&gt;&gt;<i> Cc: http://x-query.com/mailman/listinfo/talk; http://x-query.com/mailman/listinfo/talk; XProc Dev
</I>&gt;&gt;<i> Subject:  Re: [<a title="xml-dev" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xmldev/">xml-dev</a>] Serialization of XDM - 
</I>&gt;&gt;<i> <a title="Use cases" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">Use cases</a> /Proposal
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I have created a first pass at documenting the problem of XDM 
</I>&gt;&gt;<i> Serialization and created some use cases.
</I>&gt;&gt;<i> I would love any feedback or comments.  This is on a new <a title="The Stylus Studio Wiki" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://wiki.stylusstudio.com/">wiki</a> 
</I>&gt;&gt;<i> I created for this purpose.  If you would like to comment 
</I>&gt;&gt;<i> directly on the wiki please reply to me and I will give you 
</I>&gt;&gt;<i> the invite code (due to the sad state of affairs anonymous 
</I>&gt;&gt;<i> comments and editing are disabled due to wiki-spam-bots.  
</I>&gt;&gt;<i> I've found spam within 5 minutes of opening a public wiki ... &lt;sigh&gt; )
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> http://xml.calldei.com/XDMSerialize
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I have NOT included a proposal for a format yet, I'd like to 
</I>&gt;&gt;<i> discuss the intent and use cases first before putting up a 
</I>&gt;&gt;<i> straw-man proposal.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Thank you for any contribution !
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I've CC'd this to xproc-dev because one of the use cases if 
</I>&gt;&gt;<i> for developers and integrators with XML Pipeline processors 
</I>&gt;&gt;<i> such as XProc
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> David A. Lee
</I>&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk  
</I>&gt;&gt;<i> http://www.calldei.com
</I>&gt;&gt;<i> http://www.xmlsh.org
</I>&gt;&gt;<i> 812-482-5224
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> _______________________________________________
</I>&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i>     
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> _______________________________________________________________________
</I>&gt;<i>
</I>&gt;<i> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
</I>&gt;<i> to support XML implementation and development. To minimize
</I>&gt;<i> spam in the archives, you must subscribe before posting.
</I>&gt;<i>
</I>&gt;<i> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
</I>&gt;<i> Or unsubscribe: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> subscribe: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> List archive: http://lists.xml.org/archives/xml-dev/
</I>&gt;<i> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
</I>&gt;<i>   
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090918/f2f7a03b/attachment.htm
</PRE>
]]></content></entry><entry><title>  Re: [xml-dev] Serialization of XDM - Use cases /
	Proposal
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003570.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003570.html" /><updated>2009-09-18T18:07:21Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>I have created a first pass at documenting the problem of XDM 
Serialization and created some <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use cases</a>.
I would love any feedback or comments.  This is on a new <a title="The Stylus Studio Wiki" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://wiki.stylusstudio.com/">wiki</a> I created 
for this purpose.  If you would like to comment directly on the wiki 
please reply to me and I will give you the invite code (due to the sad 
state of affairs anonymous comments and editing are disabled due to 
wiki-spam-bots.  I've found spam within 5 minutes of opening a public 
wiki ... &lt;sigh&gt; )


http://<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>.calldei.com/XDMSerialize

I have NOT included a proposal for a format yet, I'd like to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discuss</a> the 
intent and use cases first before putting up a straw-man proposal.

Thank you for any contribution !

I've CC'd this to xproc-dev because one of the use cases if for 
developers and integrators with <a title="XML Pipeline Software" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/pipeline.html">XML Pipeline</a> processors such as XProc


David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224



</PRE>
]]></content></entry><entry><title>  Local namespace
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003569.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003569.html" /><updated>2009-09-16T14:55:47Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Florent Georges wrote:
&gt;<i> John Snelson wrote:
</I>&gt;<i> 
</I>&gt;&gt;<i> Yes - that's what I originally suggested. However the <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>
</I>&gt;&gt;<i> working group felt it was important to be able change a function
</I>&gt;&gt;<i> to be exported / not-exported without changing every place that
</I>&gt;&gt;<i> function is called.
</I>&gt;<i> 
</I>&gt;<i>   Thanks, John and Martin, for those helpful precisions.  BTW, speaking of XQuery 1.1, is there any estimation about when a first draft would be available?
</I>
It's available now, although that draft pretty much only has grouping
and windowing in it.

http://www.<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/TR/xquery-11/

The WG is actively working to get a more recent draft out, which should
contain a lot of the latest <a title="features" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_feature_overview.html">features</a> we've added.

John

-- 
John Snelson, <a title="Oracle" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/oracle.html">Oracle</a> Corporation            http://snelson.org.uk/john
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dbxml.html">Berkeley DB XML</a>:            http://oracle.com/database/berkeley-db/xml
XQilla:                                  http://xqilla.sourceforge.net
</PRE>
]]></content></entry><entry><title>  Local namespace
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003568.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003568.html" /><updated>2009-09-16T12:54:47Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>John Snelson wrote:

&gt;<i> Yes - that's what I originally suggested. However the <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>
</I>&gt;<i> working group felt it was important to be able change a function
</I>&gt;<i> to be exported / not-exported without changing every place that
</I>&gt;<i> function is called.
</I>
  Thanks, John and Martin, for those helpful precisions.  BTW, speaking of XQuery 1.1, is there any estimation about when a first draft would be available?

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/


























      


</PRE>
]]></content></entry><entry><title>  Fwd: xmlns ignore
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003566.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003566.html" /><updated>2009-09-15T15:35:25Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>You clearly didn't understand David's answer.
 
You can no more &quot;ignore&quot; a namespace declaration in your source document
than you can ignore the first character of each element name. The namespace
is an intrinsic part of the names of your elements, and when selecting
elements by name, you need to be aware of it.
 
If you want to use unqualified names in your XQuery expression to refer to
names in a namespace, you can do this by means of a default namespace
declaration in the XQuery prolog: 
 
declare default element namespace &quot; &lt;http://www.portalfiscal.inf.br/nfe&gt;
http://www.portalfiscal.inf.br/nfe&quot;
 
However, you need to be aware that this affects the interpretation of all
unprefixed names in your query, not only those in a path expression.
 
If you don't want to change the source of the query, you can achieve the
same effect using the <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> API:
 
comp.declareNamespace(&quot;&quot;, &quot; &lt;http://www.portalfiscal.inf.br/nfe&gt;
http://www.portalfiscal.inf.br/nfe&quot;);
 
Your example query will then work as written. Note, however, that this is a
very different thing from &quot;ignoring&quot; the namespace.
 
Regards,

<a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/
http://twitter.com/michaelhkay 


  _____  

From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf
Of S&#233;rgio Mariano Dias
Sent: 15 September 2009 14:07
To: http://x-query.com/mailman/listinfo/talk
Subject:  Fwd: xmlns ignore


 

Hi,  

This is a complete code test:

         
//--------------------------------------------------------------------------
------------------------------------------------------- 

          Processor proc = new Processor(false);
     
          
          XQueryCompiler comp = proc.newXQueryCompiler();
     
          XdmNode source = proc.newDocumentBuilder().build(new
StreamSource(inputFile));
     
     
          

          XQueryExecutable exp = comp.compile(&quot;/NFe/infNFe/<a title="The World's Best XML IDE" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_product_index.html">ide</a>/natOp&quot;); 

          XQueryEvaluator eval = exp.load();
          eval.setContextItem(source);        
         
         
          

          XdmItem i =eval.evaluateSingle();
          System.out.println(i.getStringValue()); 

          
          
          XdmValue v = eval.evaluate(); 
          System.out.println(v.size());


//--------------------------------------------------------------------------
-------------------------------------------------------

that is the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_file_explorer.html">xml file</a>:


//--------------------------------------------------------------------------
-------------------------------------------------------
&lt;?xml version=&quot;1.0&quot; <a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a>=&quot;UTF-8&quot;?&gt;
&lt;NFe xmlns=&quot;http://www.portalfiscal.inf.br/nfe&quot;&gt;
        &lt;infNFe Id=&quot;NFe2907&quot; versao=&quot;1.10&quot;&gt;
            &lt;ide&gt;
                &lt;cUF&gt;29&lt;/cUF&gt;
                &lt;cNF&gt;123658&lt;/cNF&gt;
                &lt;natOp&gt;Venda - direta&lt;/natOp&gt;
....

//--------------------------------------------------------------------------
-------------------------------------------------------

The &quot;&quot;http://www.portalfiscal.inf.br/nfe&quot;&quot; return page not found. If I
remove the addres, the program return the correct value. That is way a fink
to ignore the addres. Is that possible?

Regards,





2009/9/11 David Carlisle &lt;http://x-query.com/mailman/listinfo/talk&gt; 




&gt;<i> I have a problem to ignore a xmls attribute in a tag and did not found
</I>&gt;<i> information how to ignore this attribute. Somebody can help me.
</I>

A namespace declaration is not an attribute in the XDM model used by
<a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a> and Xquery. The name of an element includes the namespace.

Most likely the part of teh code that you don't show

= comp.compile(&quot;/.../... ...&quot;);

is selecting elements in no-namespace, and you should change it to
select elements in the namespace used in your xml source.

either by using a prefix
/p:aa/p:bb

and binding p to the namespace used in the source, or by setting the
default namespace in the xquery to that used in the source.


David


________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________





-- 
S&#233;rgio Mariano  






-- 
S&#233;rgio Mariano 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090915/73c0cba1/attachment.htm
</PRE>
]]></content></entry><entry><title>  Fwd: xmlns ignore
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003565.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003565.html" /><updated>2009-09-15T15:29:00Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> &#160;&#160;&#160; &#160;&#160;&#160; &#160; XQueryCompiler comp = proc.newXQueryCompiler();
</I>&gt;<i>
</I>&gt;<i> &#160;&#160;&#160; &#160;&#160;&#160; &#160; XdmNode source = proc.newDocumentBuilder().build(new
</I>&gt;<i> StreamSource(inputFile));
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> &#160;&#160;&#160; &#160;&#160;&#160; &#160; XQueryExecutable exp = comp.compile(&quot;/NFe/infNFe/<a title="The World's Best XML IDE" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_product_index.html">ide</a>/natOp&quot;);
</I>
[snip]

&gt;<i> &lt;?xml version=&quot;1.0&quot; <a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a>=&quot;UTF-8&quot;?&gt;
</I>&gt;<i> &lt;NFe xmlns=&quot;http://www.portalfiscal.inf.br/nfe&quot;&gt;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;infNFe Id=&quot;NFe2907&quot; versao=&quot;1.10&quot;&gt;
</I>
Either change your query to include the namespace eg:

declare namespace f = &quot;http://www.portalfiscal.inf.br/nfe&quot;;

with

/f:NFe/f:infNFe/f:ide/f:natOp

or declare the namespace on the XQueryCompiler:

http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/documentation/dotnetdoc/<a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a>/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/api/">Api</a>/XQueryCompiler.html


-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

</PRE>
]]></content></entry><entry><title>  RE: [xml-dev] Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003564.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003564.html" /><updated>2009-09-15T15:26:43Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> &gt; There is no standard or even 'community accepted' way of 
</I>&gt;<i> serializing XDM
</I>
&gt;<i> What is wrong <a title="JSON XML Performance" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.xmlconverters.com/tutorials/json-and-xquery.html">with JSON</a> for this?
</I>
Nearly everything, starting with the fact that the target user community is
likely to want something that can be manipulated using XML tools. 

In fact, what is right with JSON for this?
&gt;<i> 
</I>&gt;<i> <a title="XPath Parser" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">The XPath2</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">data model</a> is a system for *<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/convert_to_xml.html">converting</a>* XML into 
</I>&gt;<i> programming language types, or for operating on a kind of <a title="XSD" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> 
</I>&gt;<i> PSVI. 
</I>
That's not how I would define it (and it's not how the spec defines it). In
fact, I don't really see where conversion into &quot;programming language types&quot;
comes into it at all.

Regards,

<a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/
http://twitter.com/michaelhkay 

</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003561.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003561.html" /><updated>2009-09-15T15:10:46Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>but nice idea &quot;keep it XML&quot;
http://kixml.blogspot.com/2009/09/serving-xml_04.html
it can help to combine <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>&amp;<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a> into one engine

for example how eXist and <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> perform exchange? xml as string?

On Tue, Sep 15, 2009 at 10:58 AM, <a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;&gt;<i>
</I>&gt;&gt;<i> &gt; is it important that
</I>&gt;&gt;<i> &gt; &#160; &#160; $a[1]/foo/bar &#160;is &#160;$a[2]
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Someone needs to sit down and write down the requirements and <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use cases</a>.
</I>&gt;<i>
</I>&gt;<i> One requirement that someone suggested was of the nature of &quot;lossless
</I>&gt;<i> round-tripping&quot;. That would imply that given a sequence (N, M), not only
</I>&gt;<i> does (N is M) retain its value after serialization and parsing, but so does
</I>&gt;<i> (N/.. is M/..): which means you can't just serialize the subtrees rooted at
</I>&gt;<i> the nodes in the sequence, you have to serialize the entire document in
</I>&gt;<i> which these nodes are contained.
</I>&gt;<i>
</I>&gt;<i> Perhaps this explains why there is currently no <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> in this area.
</I>&gt;<i>
</I>&gt;<i> Regards,
</I>&gt;<i>
</I>&gt;<i> Michael Kay
</I>&gt;<i> http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/
</I>&gt;<i> http://twitter.com/michaelhkay
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>
</PRE>
]]></content></entry><entry><title>  Fwd: xmlns ignore
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003567.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003567.html" /><updated>2009-09-15T11:44:30Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Ok now it's correct.
 thank you very much by the help.

2009/9/15 <a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> &lt;http://x-query.com/mailman/listinfo/talk&gt;

&gt;<i>  You clearly didn't understand David's answer.
</I>&gt;<i>
</I>&gt;<i> You can no more &quot;ignore&quot; a namespace declaration in your source document
</I>&gt;<i> than you can ignore the first character of each element name. The namespace
</I>&gt;<i> is an intrinsic part of the names of your elements, and when selecting
</I>&gt;<i> elements by name, you need to be aware of it.
</I>&gt;<i>
</I>&gt;<i> If you want to use unqualified names in your <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> expression to refer to
</I>&gt;<i> names in a namespace, you can do this by means of a default namespace
</I>&gt;<i> declaration in the XQuery prolog:
</I>&gt;<i>
</I>&gt;<i> declare default element namespace &quot;http://www.portalfiscal.inf.br/nfe&quot;
</I>&gt;<i>
</I>&gt;<i> However, you need to be aware that this affects the interpretation of all
</I>&gt;<i> unprefixed names in your query, not only those in a path expression.
</I>&gt;<i>
</I>&gt;<i> If you don't want to change the source of the query, you can achieve the
</I>&gt;<i> same effect using the <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> API:
</I>&gt;<i>
</I>&gt;<i> comp.declareNamespace(&quot;&quot;, &quot;http://www.portalfiscal.inf.br/nfe&quot;);
</I>&gt;<i>
</I>&gt;<i> Your example query will then work as written. Note, however, that this is a
</I>&gt;<i> very different thing from &quot;ignoring&quot; the namespace.
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Regards,
</I>&gt;<i>
</I>&gt;<i> Michael Kay
</I>&gt;<i> http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/
</I>&gt;<i> http://twitter.com/michaelhkay
</I>&gt;<i>
</I>&gt;<i>  ------------------------------
</I>&gt;<i> *From:* http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] *On
</I>&gt;<i> Behalf Of *S&#233;rgio Mariano Dias
</I>&gt;<i> *Sent:* 15 September 2009 14:07
</I>&gt;<i> *To:* http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> *Subject:*  Fwd: xmlns ignore
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Hi,
</I>&gt;<i>
</I>&gt;<i> This is a complete code test:
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> //---------------------------------------------------------------------------------------------------------------------------------
</I>&gt;<i>
</I>&gt;<i>           Processor proc = new Processor(false);
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>           XQueryCompiler comp = proc.newXQueryCompiler();
</I>&gt;<i>
</I>&gt;<i>           XdmNode source = proc.newDocumentBuilder().build(new
</I>&gt;<i> StreamSource(inputFile));
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>           XQueryExecutable exp = comp.compile(&quot;/NFe/infNFe/<a title="The World's Best XML IDE" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_product_index.html">ide</a>/natOp&quot;);
</I>&gt;<i>           XQueryEvaluator eval = exp.load();
</I>&gt;<i>           eval.setContextItem(source);
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>           XdmItem i =eval.evaluateSingle();
</I>&gt;<i>           System.out.println(i.getStringValue());
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>           XdmValue v = eval.evaluate();
</I>&gt;<i>           System.out.println(v.size());
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> //---------------------------------------------------------------------------------------------------------------------------------
</I>&gt;<i>
</I>&gt;<i> that is the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_file_explorer.html">xml file</a>:
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> //---------------------------------------------------------------------------------------------------------------------------------
</I>&gt;<i> &lt;?xml version=&quot;1.0&quot; <a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a>=&quot;UTF-8&quot;?&gt;
</I>&gt;<i> &lt;NFe xmlns=&quot;http://www.portalfiscal.inf.br/nfe&quot;&gt;
</I>&gt;<i>         &lt;infNFe Id=&quot;NFe2907&quot; versao=&quot;1.10&quot;&gt;
</I>&gt;<i>             &lt;ide&gt;
</I>&gt;<i>                 &lt;cUF&gt;29&lt;/cUF&gt;
</I>&gt;<i>                 &lt;cNF&gt;123658&lt;/cNF&gt;
</I>&gt;<i>                 &lt;natOp&gt;Venda - direta&lt;/natOp&gt;
</I>&gt;<i> ....
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> //---------------------------------------------------------------------------------------------------------------------------------
</I>&gt;<i>
</I>&gt;<i> The &quot;&quot;http://www.portalfiscal.inf.br/nfe&quot;&quot; return page not found. If I
</I>&gt;<i> remove the addres, the program return the correct value. That is way a fink
</I>&gt;<i> to ignore the addres. Is that possible?
</I>&gt;<i>
</I>&gt;<i> Regards,
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> 2009/9/11 David Carlisle &lt;http://x-query.com/mailman/listinfo/talk&gt;
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &gt; I have a problem to ignore a xmls attribute in a tag and did not found
</I>&gt;&gt;<i> &gt; information how to ignore this attribute. Somebody can help me.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> A namespace declaration is not an attribute in the XDM model used by
</I>&gt;&gt;<i> XPath and Xquery. The name of an element includes the namespace.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Most likely the part of teh code that you don't show
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> = comp.compile(&quot;/.../... ...&quot;);
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> is selecting elements in no-namespace, and you should change it to
</I>&gt;&gt;<i> select elements in the namespace used in your xml source.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> either by using a prefix
</I>&gt;&gt;<i> /p:aa/p:bb
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> and binding p to the namespace used in the source, or by setting the
</I>&gt;&gt;<i> default namespace in the xquery to that used in the source.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> David
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> ________________________________________________________________________
</I>&gt;&gt;<i> The Numerical Algorithms Group Ltd is a company registered in England
</I>&gt;&gt;<i> and Wales with company number 1249803. The registered office is:
</I>&gt;&gt;<i> Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> This e-mail has been scanned for all viruses by Star. The service is
</I>&gt;&gt;<i> powered by MessageLabs.
</I>&gt;&gt;<i> ________________________________________________________________________
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> S&#233;rgio Mariano
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> S&#233;rgio Mariano
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>

-- 
S&#233;rgio Mariano Dias
http://www.dcc.ufmg.br/~mariano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090915/1fe901ce/attachment-0001.htm
</PRE>
]]></content></entry><entry><title>  Fwd: xmlns ignore
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003563.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003563.html" /><updated>2009-09-15T11:07:15Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,

This is a complete code test:


//---------------------------------------------------------------------------------------------------------------------------------
          Processor proc = new Processor(false);


          XQueryCompiler comp = proc.newXQueryCompiler();

          XdmNode source = proc.newDocumentBuilder().build(new
StreamSource(inputFile));



          XQueryExecutable exp = comp.compile(&quot;/NFe/infNFe/<a title="The World's Best XML IDE" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_product_index.html">ide</a>/natOp&quot;);
          XQueryEvaluator eval = exp.load();
          eval.setContextItem(source);



          XdmItem i =eval.evaluateSingle();
          System.out.println(i.getStringValue());


          XdmValue v = eval.evaluate();
          System.out.println(v.size());

//---------------------------------------------------------------------------------------------------------------------------------

that is the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_file_explorer.html">xml file</a>:


//---------------------------------------------------------------------------------------------------------------------------------
&lt;?xml version=&quot;1.0&quot; <a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a>=&quot;UTF-8&quot;?&gt;
&lt;NFe xmlns=&quot;http://www.portalfiscal.inf.br/nfe&quot;&gt;
        &lt;infNFe Id=&quot;NFe2907&quot; versao=&quot;1.10&quot;&gt;
            &lt;ide&gt;
                &lt;cUF&gt;29&lt;/cUF&gt;
                &lt;cNF&gt;123658&lt;/cNF&gt;
                &lt;natOp&gt;Venda - direta&lt;/natOp&gt;
....

//---------------------------------------------------------------------------------------------------------------------------------

The &quot;&quot;http://www.portalfiscal.inf.br/nfe&quot;&quot; return page not found. If I
remove the addres, the program return the correct value. That is way a fink
to ignore the addres. Is that possible?

Regards,




2009/9/11 David Carlisle &lt;http://x-query.com/mailman/listinfo/talk&gt;


&gt;<i>
</I>&gt;<i> &gt; I have a problem to ignore a xmls attribute in a tag and did not found
</I>&gt;<i> &gt; information how to ignore this attribute. Somebody can help me.
</I>&gt;<i>
</I>&gt;<i> A namespace declaration is not an attribute in the XDM model used by
</I>&gt;<i> <a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a> and <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">Xquery</a>. The name of an element includes the namespace.
</I>&gt;<i>
</I>&gt;<i> Most likely the part of teh code that you don't show
</I>&gt;<i>
</I>&gt;<i> = comp.compile(&quot;/.../... ...&quot;);
</I>&gt;<i>
</I>&gt;<i> is selecting elements in no-namespace, and you should change it to
</I>&gt;<i> select elements in the namespace used in your xml source.
</I>&gt;<i>
</I>&gt;<i> either by using a prefix
</I>&gt;<i> /p:aa/p:bb
</I>&gt;<i>
</I>&gt;<i> and <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">binding</a> p to the namespace used in the source, or by setting the
</I>&gt;<i> default namespace in the xquery to that used in the source.
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> David
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> ________________________________________________________________________
</I>&gt;<i> The Numerical Algorithms Group Ltd is a company registered in England
</I>&gt;<i> and Wales with company number 1249803. The registered office is:
</I>&gt;<i> Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, <a title="DOM Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">United Kingdom</a>.
</I>&gt;<i>
</I>&gt;<i> This e-mail has been scanned for all viruses by Star. The service is
</I>&gt;<i> powered by MessageLabs.
</I>&gt;<i> ________________________________________________________________________
</I>&gt;<i>
</I>


-- 
S&#233;rgio Mariano





-- 
S&#233;rgio Mariano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090915/5063b3b0/attachment-0001.htm
</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003559.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003559.html" /><updated>2009-09-15T08:58:05Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> 
</I>&gt;<i> &gt; is it important that
</I>&gt;<i> &gt;     $a[1]/foo/bar  is  $a[2]
</I>&gt;<i> 
</I>
Someone needs to sit down and write down the requirements and <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use cases</a>.

One requirement that someone suggested was of the nature of &quot;lossless
round-tripping&quot;. That would imply that given a sequence (N, M), not only
does (N is M) retain its value after serialization and parsing, but so does
(N/.. is M/..): which means you can't just serialize the subtrees rooted at
the nodes in the sequence, you have to serialize the entire document in
which these nodes are contained.

Perhaps this explains why there is currently no <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> in this area.

Regards,

<a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/
http://twitter.com/michaelhkay 

</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003562.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003562.html" /><updated>2009-09-15T08:34:58Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Excellent points.
IMHO, asking for 100% lossless is asking too much.
So if its not 100% where's the line ? A lossy implementation would still 
be very useful
If one were to start writing down intent, <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use cases</a> and a proposal, what 
would be a good <a title="forum" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">forum</a> for this ?
A web page ? A document via email via these user groups ?
Suggestions welcome.

-David




David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224



<a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> wrote:
&gt;&gt;&gt;<i> is it important that
</I>&gt;&gt;&gt;<i>     $a[1]/foo/bar  is  $a[2]
</I>&gt;&gt;&gt;<i>       
</I>&gt;<i>
</I>&gt;<i> Someone needs to sit down and write down the requirements and use cases.
</I>&gt;<i>
</I>&gt;<i> One requirement that someone suggested was of the nature of &quot;lossless
</I>&gt;<i> round-tripping&quot;. That would imply that given a sequence (N, M), not only
</I>&gt;<i> does (N is M) retain its value after serialization and parsing, but so does
</I>&gt;<i> (N/.. is M/..): which means you can't just serialize the subtrees rooted at
</I>&gt;<i> the nodes in the sequence, you have to serialize the entire document in
</I>&gt;<i> which these nodes are contained.
</I>&gt;<i>
</I>&gt;<i> Perhaps this explains why there is currently no <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> in this area.
</I>&gt;<i>
</I>&gt;<i> Regards,
</I>&gt;<i>
</I>&gt;<i> Michael Kay
</I>&gt;<i> http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/
</I>&gt;<i> http://twitter.com/michaelhkay 
</I>&gt;<i>   
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090915/b599c444/attachment.htm
</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003558.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003558.html" /><updated>2009-09-15T03:45:48Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
&gt;<i> is it important that
</I>&gt;<i>     $a[1]/foo/bar  is  $a[2]
</I>
well it's inportant if the next process <a title="XML Pipeline Example" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/pipeline.html">in the pipeline</a> needs to do any
kind of query processing, which is presumably the point of wanting to
pass an xdm instance in the first place.

if the sequence appears to the next process as $input then something as
simple as

count($input//bar)

is going to give different answers depending on whether identity is
preserved.

But in practice it's probably only important to know what the answer is
(whether identity is presrved or not) if you pass xml between processes
by serialising and reparsing then typically you end up with new
identities as far as xdm is concerned but this is rarely a problem in
practice.

so if the <a title="specification" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">specification</a> of the serialisation were to specify that you
were serialising a _copy_ of any XDM instance, so in particular every
item of the sequence always gets a new identity I think that would be OK
for the vast majority of cases.

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, <a title="DOM Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">United Kingdom</a>.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________
</PRE>
]]></content></entry><entry><title>  Announce: XQuery, XSLT,
 XPath and XSL-FO training in US (XQuery talk)
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003560.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003560.html" /><updated>2009-09-15T01:38:28Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Crane Softwrights Ltd. of Ottawa Canada is pleased to announce a US 
east-coast (Washington DC/Falls Church VA area) training delivery of 
its XML material in partnership with Mark Logic Corporation of San 
Carlos California.  Through four separately-subscribed classes over 
11 consecutive weekdays in October/November 2009, these intensive 
hands-on classes cover working with XML for the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/super_catalogs.html">OASIS</a> code list 
specifications, the OASIS <a title="Universal Business Language" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/ubl/index.html">Universal Business Language</a> 2.0 standard, 
the W3C XQuery, XSLT and <a title="XML XPath Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath 1.0</a> and 2.0 standards and the W3C 
<a title="XSL-FO" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xsl_fo.html">XSL-FO</a> 1.0 and 1.1 standards:

  Practical Code List Implementation (1 day): 2009-10-28
   http://www.CraneSoftwrights.com/training/pcli/pclisyl.htm
   Abbreviated code:  PCLI
   Cost: US$550.

  Practical Universal Business Language <a title="Deployment" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/deployment/">Deployment</a> (2 days): 2009-10-29/30
   http://www.CraneSoftwrights.com/training/publd/publdsyl.htm
   Abbreviated code:  PUBLD
   Cost: US$1100.

  Practical Transformation <a title="Using XSLT to transform XML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xsltedit1/xsltedit1.html">Using XSLT</a>, XQuery and XPath (5 days): 2009-11-02/06
   http://www.CraneSoftwrights.com/training/ptuxq/ptuxqsyl.htm
   Abbreviated code:  PTUXQ
   Cost: US$2750.

  Practical Formatting Using XSL-FO (3 days): 2009-11-09/11
   http://www.CraneSoftwrights.com/training/pfux/pfuxsyl.htm
   Abbreviated code:  PFUX
   Cost: US$1650.

  Venue:
   Homewood Suites, Falls Church, VA (Merrifield) - http://tinyurl.com/lj548u
   8130 Porter Road, Merrifield, Virginia, United States 22042
   (daily lunch is included in the fee)

Registration for these classes is through Mark Logic's training division:

   http://www.MarkLogic.com/services/training.html

and all students must register via email:

   mailto:http://x-query.com/mailman/listinfo/talk?subject=Crane%20XML%20training%20Washington

Class size is limited to only 15 students, so please register early 
to ensure you get your seat.  Seats are allocated in the order of 
paid registrations received, not email requests.

Check out all of our training offerings linked from our home page below.

We have plans for future classes and you can tell us if your interest in them:

   http://www.CraneSoftwrights.com/forms/interest.php

Thanks!

. . . . . . . . . . Ken

cc: XQuery-Talk, XSL List, Yahoo XSL-FO, Antenna House list, <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/renderx/xep.html">RenderX</a> 
list, XML-Doc, XML-L

--
Interested in these classes?  http://www.CraneSoftwrights.com/q/i/
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/q/
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&amp;fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&amp;fmt=18
G. Ken Holman                 mailto:http://x-query.com/mailman/listinfo/talk
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/q/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003556.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003556.html" /><updated>2009-09-15T00:31:13Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>

&gt;<i> On first glance I can imagine the former being fairly easy, but the 
</I>&gt;<i> later much more complex.
</I>
The latter isn't a problem as they are different elements in the result,
the $a nodes are _copied_ into their parent as &lt;bar&gt;{$a}&lt;/bar&gt; copy here
doesn't copy node identity.

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, <a title="DOM Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">United Kingdom</a>.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________
</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003555.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003555.html" /><updated>2009-09-14T23:31:09Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>David A. Lee wrote:

  Hi David,

&gt;<i> let $a := &lt;foo/&gt;
</I>&gt;<i> return
</I>&gt;<i>    ( $a , $a , $a )
</I>&gt;<i> ---&gt;  recognize all 3 are the same
</I>
&gt;<i> let $a := &lt;foo/&gt;
</I>&gt;<i> return
</I>&gt;<i>    (
</I>&gt;<i> &lt;bar&gt;{$a}&lt;/bar&gt;,&lt;bar&gt;{$a}&lt;/bar&gt;,&lt;bar&gt;{$a}&lt;/bar&gt;)
</I>
&gt;<i> --&gt; do we need to know that all 3 &lt;foo/&gt; are the same ?
</I>
  They have the same value, but they are not identical (last
paragraph of the section &quot;3.7.1 Direct Element Constructors&quot;
&lt;http://www.<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/TR/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>/#id-element-constructor&gt;):

    The result of an element constructor is a new element node,
    with its own node identity. All the attribute and descendant
    nodes of the new element node are also new nodes with their
    own identities, even if they are copies of existing nodes.

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/




















      

</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003551.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003551.html" /><updated>2009-09-14T22:16:22Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> On the other hand, it seems to me that we already have such a 
</I>&gt;<i> serialization format, and it's <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> itself - or rather the 
</I>&gt;<i> subset that involves literals, sequence &quot;constructor&quot; (i.e. 
</I>&gt;<i> comma operator), and direct element/attribute/namespace/text 
</I>&gt;<i> constructors. It's as portable as it gets - any XQuery 
</I>&gt;<i> processor can immediately parse it.
</I>&gt;<i> And it doesn't seem to be missing anything from XDM, either.
</I>
For some <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use cases</a> it's important that the format be canonical: that is,
there should only be one way of representing a given sequence.

Also, XQuery doesn't have any direct way of representing the type annotation
on a node: the closest you can get is a validate{} instruction, and the
effect of this is very context-dependent.

Incidentally, one deficiency of the <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> -wrap format that I mentioned
earlier is that it doesn't contain any information about node identity. If
you have a sequence of three elements with the same name and content, it
won't tell you whether the sequence being serialized contains three distinct
nodes, or a single node repeated three times.

Regards,

<a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/
http://twitter.com/michaelhkay 

</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003548.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003548.html" /><updated>2009-09-14T21:42:36Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> 
</I>&gt;<i> I believe this lack of standardization for serialization of 
</I>&gt;<i> XDM is both 
</I>&gt;<i> a &quot;Problem&quot; and a &quot;BIG Problem&quot;
</I>&gt;<i> Before I extend the topic to &quot;suggested solutions&quot; I would love some 
</I>&gt;<i> feedback.
</I>&gt;<i> 
</I>&gt;<i> Q: Does anyone else agree this is a &quot;Problem&quot; or a &quot;Big 
</I>&gt;<i> Problem&quot; ? Am I alone ? Why is this NOT a &quot;Big Problem&quot;?
</I>
<a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> has a serialization format for arbitrary XDM sequences: you can see it
by running a query with -wrap option from the command line. Perhaps oddly,
Saxon can generate this format, but there are no <a title="tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a> to parse it and
reconstruct the original sequence.

I seem to remember someone proposing that a format like this should be
standardised in the <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> WG years ago - if only as a <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> way of
representing the results of queries in the test suite. But the fact that
no-one was prepared to do the work suggests that not many people thought it
was a big problem.

&gt;<i> Q: Is there any known work in progress aimed at solving this problem ?
</I>
Not that I know of.

&gt;<i> Q: Would it be of value to solve this problem ? (and why not ?)
</I>
Yes. Whether the value would exceed the cost is anyone's guess.

&gt;<i> Q: Would there be any interest in tackling this problem in a 
</I>&gt;<i> formal way, such as a W3C recommendation ?
</I>
W3C groups are generally having difficulty finding the resources to complete
their existing work programmes, without taking on anything new.

&gt;<i> Q: If there were a recommendation approved would vendors be 
</I>&gt;<i> interested or willing to adopt / implement it ?
</I>&gt;<i> 
</I>
If there appeared to be sufficient support behind it, then yes.

Regards,

<a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/
http://twitter.com/michaelhkay 

</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003547.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003547.html" /><updated>2009-09-14T20:08:59Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Mon, Sep 14, 2009 at 5:48 PM, Evgeny Gazdovsky &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> We had forgot <a title="JSON vs XML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.xmlconverters.com/tutorials/json-and-xquery.html">about JSON</a>! :)
</I>
congratulations - right move to forget JSON

&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I></PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003546.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003546.html" /><updated>2009-09-14T20:02:27Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Still think <a title="Converter JSON to XML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.xmlconverters.com/tutorials/json-and-xquery.html">that JSON</a> may be a variant
</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003557.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003557.html" /><updated>2009-09-14T19:36:20Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>What about this document ?

Input:

&lt;foo&gt;
  &lt;bar/&gt;
&lt;/foo&gt;

Query:
   
( / , /foo/bar )

If serialized then re-parsed into say :
    declare variable $a as external;     -&gt; stuck into here

is it important that
    $a[1]/foo/bar  is  $a[2]


David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224



David Carlisle wrote:
&gt;&gt;<i> On first glance I can imagine the former being fairly easy, but the 
</I>&gt;&gt;<i> later much more complex.
</I>&gt;&gt;<i>     
</I>&gt;<i>
</I>&gt;<i> The latter isn't a problem as they are different elements in the result,
</I>&gt;<i> the $a nodes are _copied_ into their parent as &lt;bar&gt;{$a}&lt;/bar&gt; copy here
</I>&gt;<i> doesn't copy node identity.
</I>&gt;<i>
</I>&gt;<i> David
</I>&gt;<i>
</I>&gt;<i> ________________________________________________________________________
</I>&gt;<i> The Numerical Algorithms Group Ltd is a company registered in England
</I>&gt;<i> and Wales with company number 1249803. The registered office is:
</I>&gt;<i> Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, <a title="DOM Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">United Kingdom</a>.
</I>&gt;<i>
</I>&gt;<i> This e-mail has been scanned for all viruses by Star. The service is
</I>&gt;<i> powered by MessageLabs. 
</I>&gt;<i> ________________________________________________________________________
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>   
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090914/7f6b436e/attachment.htm
</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003554.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003554.html" /><updated>2009-09-14T19:12:07Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>

<a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> wrote:
&gt;<i>
</I>&gt;<i> Incidentally, one deficiency of the <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> -wrap format that I mentioned
</I>&gt;<i> earlier is that it doesn't contain any information about node identity. If
</I>&gt;<i> you have a sequence of three elements with the same name and content, it
</I>&gt;<i> won't tell you whether the sequence being serialized contains three distinct
</I>&gt;<i> nodes, or a single node repeated three times.
</I>&gt;<i>
</I>&gt;<i>   
</I>
Interesting point about Node Identity.  I hadnt thought of that.
Do you have an oppionion of how important it is to preserve node identity ?
Would this be important only at the sequence level or in nested elements 
as well ?
e.g

let $a := &lt;foo/&gt;
return
    ( $a , $a , $a )
---&gt;  recognize all 3 are the same

let $a := &lt;foo/&gt;
return
    ( &lt;bar&gt;{$a}&lt;/bar&gt;,&lt;bar&gt;{$a}&lt;/bar&gt;,&lt;bar&gt;{$a}&lt;/bar&gt;)

--&gt; do we need to know that all 3 &lt;foo/&gt; are the same ?

On first glance I can imagine the former being fairly easy, but the 
later much more complex.



David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224





</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003543.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003543.html" /><updated>2009-09-14T18:48:58Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>We had forgot <a title="JSON vs XML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.xmlconverters.com/tutorials/json-and-xquery.html">about JSON</a>! :)
</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003550.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003550.html" /><updated>2009-09-14T17:06:13Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Somewhat Ironically, this solves the same problem the same <a title="JSON Processing in XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.xmlconverters.com/tutorials/json-and-xquery.html">way JSON</a> did 
i.e.
make the serialization format the same as the Code (in Jason's case 
Javascript).
It also has the same problem though.
It requires an XQuery paser to parse.  Suppose you want to send the 
results to something that isnt XQuery, say as an external variable to an 
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a> or <a title="XPath Help" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPATH processor</a>.   Those would require XQuery to pase it.

Its an interesting idea with some merit though ...



David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224



Pavel Minaev wrote:
&gt;<i> In Mon, Sep 14, 2009 at 8:02 AM, Evgeny Gazdovsky &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
</I>&gt;<i>   
</I>&gt;&gt;<i> Still think that JSON may be a variant
</I>&gt;&gt;<i>     
</I>&gt;<i>
</I>&gt;<i> I don't see how JSON could be any sort of serious contender to
</I>&gt;<i> serialize XDM data, given that the latter is much richer than JSON
</I>&gt;<i> primitives.
</I>&gt;<i>
</I>&gt;<i> On the other hand, it seems to me that we already have such a
</I>&gt;<i> serialization format, and it's XQuery itself - or rather the subset
</I>&gt;<i> that involves literals, sequence &quot;constructor&quot; (i.e. comma operator),
</I>&gt;<i> and direct element/attribute/namespace/text constructors. It's as
</I>&gt;<i> portable as it gets - any XQuery processor can immediately parse it.
</I>&gt;<i> And it doesn't seem to be missing anything from XDM, either.
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>   
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090914/8f599b4f/attachment.htm
</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003544.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003544.html" /><updated>2009-09-14T15:36:11Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>David A. Lee wrote:

  Hi,

&gt;<i> There is no <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> or even 'community accepted' way of
</I>&gt;<i> serializing XDM
</I>
  While I used to think this is a problem, more and more I think
it is not (or at most a little problem we can live with.)  XDM
is a convenient (and needed) data structure to work with within a
piece of code (like a <a title="Stylesheet Designer" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/publisher1/publisher1.html">stylesheet</a> or a query.)  (BTW this is a
pity that XProc is not based on XDM, IMHO)

  But if you want to pass information between two different
pieces of code (like between a query and a stylesheet) you can
just restrict yourself to nodes.  If you want to pass a sequence
of integers, you can instead pass an element containing elements
the content of which are integers...

  So the simple rule: independent pieces of code set boundaries
between which you can only pass nodes, or even document nodes.
That's what <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> means, after all.  If you use compatible
processors, you should then be able to configure them to pass
those nodes in an efficient way, and if not you can serialize and
parse them without loosing any information.

  Just my two cents....

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/























      


</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003553.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003553.html" /><updated>2009-09-14T14:29:30Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Mon, Sep 14, 2009 at 1:16 PM, <a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;&gt;<i> On the other hand, it seems to me that we already have such a
</I>&gt;&gt;<i> serialization format, and it's <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> itself - or rather the
</I>&gt;&gt;<i> subset that involves literals, sequence &quot;constructor&quot; (i.e.
</I>&gt;&gt;<i> comma operator), and direct element/attribute/namespace/text
</I>&gt;&gt;<i> constructors. It's as portable as it gets - any XQuery
</I>&gt;&gt;<i> processor can immediately parse it.
</I>&gt;&gt;<i> And it doesn't seem to be missing anything from XDM, either.
</I>&gt;<i>
</I>&gt;<i> For some <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use cases</a> it's important that the format be canonical: that is,
</I>&gt;<i> there should only be one way of representing a given sequence.
</I>&gt;<i>
</I>&gt;<i> Also, XQuery doesn't have any direct way of representing the type annotation
</I>&gt;<i> on a node: the closest you can get is a validate{} instruction, and the
</I>&gt;<i> effect of this is very context-dependent.
</I>
I wonder if &quot;treat as&quot; operator could be abused for this purpose. The
deserializer would have to be specified as if it always runs the input
sequence through validate{} recursively, naturally...

Of course, there's still the problem of no inline schemas for XQuery,
so it's still not a fully self-contained format. Then again, in
practice, few people <a title="How To Build XML Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">use inline schemas</a> for plain XML serialization as
well, so it might not be that much of a problem.

&gt;<i> Incidentally, one deficiency of the <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> -wrap format that I mentioned
</I>&gt;<i> earlier is that it doesn't contain any information about node identity. If
</I>&gt;<i> you have a sequence of three elements with the same name and content, it
</I>&gt;<i> won't tell you whether the sequence being serialized contains three distinct
</I>&gt;<i> nodes, or a single node repeated three times.
</I>
Good point. It's fairly obvious how this could be done with plain
XQuery in general with let/return, but I also can't think of any good
way to define a canonical serialization format for it. One approach
would be to require all nodes that occur more than once in the output
(and only such nodes) to produce a single let-clause, with unspecified
order and unspecified variable names they're bound to, at the
beginning of the query, immediately followed by a single &quot;return&quot;
clause that references them. But this wouldn't be very human-readable
for moderately sized graphs, IMO.
</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003552.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003552.html" /><updated>2009-09-14T14:20:02Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Mon, Sep 14, 2009 at 1:06 PM, David A. Lee &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Somewhat Ironically, this solves the same problem the same <a title="JSON Processing in XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.xmlconverters.com/tutorials/json-and-xquery.html">way JSON</a> did i.e.
</I>&gt;<i> make the serialization format the same as the Code (in Jason's case
</I>&gt;<i> Javascript).
</I>&gt;<i> It also has the same problem though.
</I>&gt;<i> It requires an XQuery paser to parse.&#160; Suppose you want to send the results
</I>&gt;<i> to something that isnt XQuery, say as an external variable to an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a> or
</I>&gt;<i> <a title="XPath Help" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPATH processor</a>.&#160;&#160; Those would require XQuery to pase it.
</I>
Just as with JSON, the ability to parse data by eval'ing it in XQuery
is just a side bonus. Of course you'd also want specialized parsers
for this when dealing with such serialized data in anything other than
XQuery (and you'd want it even in XQuery for security reasons). But
there's no shortage of JSON parsers of all kinds, written in different
languages and for different platforms, these days. This could be
similar.

A more major advantage of using XQuery subset as a basis for such a
serialization format is that you don't need to create a <a title="specification" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">specification</a>
from scratch. For the most part, you can directly re-use XQuery BNF
and semantics from the spec.

Also, so long as it is a strict subset, any new dedicated parser could
reuse existing XQuery lexer/parser code with no changes. You'd pretty
only need a new syntax tree rewriter that would output XDM nodes, in
whatever in-memory format a particular implementation wants.

By the way, much as <a title="org.w3c.dom" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">DOM</a> is often maligned, the idea of defining some
common, strictly specified interfaces (in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/api/">API</a> sense) still has merit,
and having something along those lines for XDM would be nice as well
(and would mesh up well with a common serialization format).

</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003549.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003549.html" /><updated>2009-09-14T13:55:51Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>In Mon, Sep 14, 2009 at 8:02 AM, Evgeny Gazdovsky &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Still think <a title="Converter JSON to XML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.xmlconverters.com/tutorials/json-and-xquery.html">that JSON</a> may be a variant
</I>
I don't see how JSON could be any sort of serious contender to
serialize XDM data, given that the latter is much richer than JSON
primitives.

On the other hand, it seems to me that we already have such a
serialization format, and it's XQuery itself - or rather the subset
that involves literals, sequence &quot;constructor&quot; (i.e. comma operator),
and direct element/attribute/namespace/text constructors. It's as
portable as it gets - any XQuery processor can immediately parse it.
And it doesn't seem to be missing anything from XDM, either.
</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003540.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003540.html" /><updated>2009-09-14T11:56:24Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>What about RDF (any not <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> notation) and SPARQL/xSPARQL?
</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003545.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003545.html" /><updated>2009-09-14T11:48:31Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>I agree with your sentiment
*&quot;if not you can serialize and parse them without loosing any information.&quot;

*but not the implication.

This is (partially) true, but the problem with this is there is not 
*standardized* way to do this.
For simple things like say sequences of nodes, you can wrap them in a 
document.
Or for say integers you can wrap them in something like an &lt;integer&gt; tag.
The problem is there are a *million* ways to do it ... which means no 
vendor has agreed, which leaves it up to the programmer to do it.
Which means you have to cooperate on both sides of the equation, and 
since there is no standardized way to do it, different toolkits or 
pieces are almost certain to do it differently, and possibly in ways 
that are difficult to parse.

By &quot;partially&quot; I am refering to the interesting XDM type of attributes,  
which noone can agree at all on how to serialize.
( although you could stick them in an element ... )

So to make this actually work in practice, you must control both sides 
of the partnership, and the serialization in between, and also pass 
&quot;metadata&quot; either by convention or something to make it all work.   A 
programmer, to say take the output of one <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>, store it in a file, 
then put it back into an external varialbe of another XQuery invocation 
has to do quite a lot of work, the sort of work that <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> was designed 
explicitly to *avoid having to do*.

Even <a title="Working with Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">defining a standardized schema</a> for 'wrapping' XDM content 
unambiguously in a XML document would be a huge value,
even if the result wasn't pretty, at least it has the potential for 
interchange.

But lets not talk about function items ... I have no clue where to go 
with those ....



David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224



Florent Georges wrote:
&gt;<i> David A. Lee wrote:
</I>&gt;<i>
</I>&gt;<i>   Hi,
</I>&gt;<i>
</I>&gt;<i>   
</I>&gt;&gt;<i> There is no <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> or even 'community accepted' way of
</I>&gt;&gt;<i> serializing XDM
</I>&gt;&gt;<i>     
</I>&gt;<i>
</I>&gt;<i>   While I used to think this is a problem, more and more I think
</I>&gt;<i> it is not (or at most a little problem we can live with.)  XDM
</I>&gt;<i> is a convenient (and needed) data structure to work with within a
</I>&gt;<i> piece of code (like a <a title="Stylesheet Designer" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/publisher1/publisher1.html">stylesheet</a> or a query.)  (BTW this is a
</I>&gt;<i> pity that XProc is not based on XDM, IMHO)
</I>&gt;<i>
</I>&gt;<i>   But if you want to pass information between two different
</I>&gt;<i> pieces of code (like between a query and a stylesheet) you can
</I>&gt;<i> just restrict yourself to nodes.  If you want to pass a sequence
</I>&gt;<i> of integers, you can instead pass an element containing elements
</I>&gt;<i> the content of which are integers...
</I>&gt;<i>
</I>&gt;<i>   So the simple rule: independent pieces of code set boundaries
</I>&gt;<i> between which you can only pass nodes, or even document nodes.
</I>&gt;<i> That's what XML means, after all.  If you use compatible
</I>&gt;<i> processors, you should then be able to configure them to pass
</I>&gt;<i> those nodes in an efficient way, and if not you can serialize and
</I>&gt;<i> parse them without loosing any information.
</I>&gt;<i>
</I>&gt;<i>   Just my two cents....
</I>&gt;<i>
</I>&gt;<i>   Regards,
</I>&gt;<i>
</I>&gt;<i>   
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090914/2d37fe78/attachment.htm
</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003542.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003542.html" /><updated>2009-09-14T09:32:10Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>A step towards defining an XDM Serialization would be to knock at the 
edges of the problem.

1) I think people would agree that a Document  should be Serialized (and 
read) in existing <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_views.html">XML text</a> form.
-- This preserves the most common <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use case</a>

2) I think it is desirable that a single atomic xs:string be serialized 
as plain string unescaped and unencoded.
-- I think this is a common use case, for example generating plain text, 
or even things like <a title="CSV" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/convert_to_xml.html">CSV</a> from xquery

It MAY be desirable that any atomic type be serialized as if it were 
first converted to xs:string ... e.g.   xs:integer(1) -&gt; &quot;1&quot;

Now comes the fun part,
Since it is impossible to distinguish a &quot;Sequence of one item&quot; from &quot;One 
item&quot; then we need to serialize  a Sequence of One identically to One.

My guess is this is where the committees started having problems and 
decided to avoid the issue altogether.
If, say a sequence of 1 integer is serialized as &quot;1&quot;, but as Kurt 
suggested a sequence notation could be used for sequences, then
say a sequence of 2 integers ( for example) could be  &quot;(1,2)&quot;.   this 
means that sequences of 1 and sequences of N&gt;1 are serialized differently !
I suggest this is undesirable.

There is a common practice that avoids this.  That is by using a syntax 
that avoids header and trailing markup so that an single value is 
serialized the same as a sequence of 1 value.  One example is simply 
using a separator such as LF or space.
The terminator being supplied by the wrapper (such as EOF or NUL or 
end-of-element).
This requires (as any markup) a way of escaping or quoting so that the 
seperatator can be contained within the data.  In order to conform to #2 
(simple string output as plain text) that leads out quoting, but does 
require escaping.  Depending on the separator used, this could be 
annoying or inconsequential.
It could also be variable (defined by the environmen).  This is 
essentially CSV ... or its variants ...
That would buy us sequences.  Even sequences of documents !
*IFF* <a title="php xml parser" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/parser.html">XML parsers</a> would be so nice as to stop reading when they have 
read the closing tag instead of throw an error (I believe this is a 
requirement of a conforming parser, not sure why).  But this can be hacked.
(I'd prefer a hack *inside* the XML parsers but if not then wrappers can 
be written which reuse existing XML parsers , not pretty though).
Certainly a parser would have to know its reading XDM not XML ahead of time.

Well thats a start, its an outline for how to serialize sequences which 
preserves common use cases.
Further work is needed to define the individual item serialization forms 
and decide if preserving type is critical or not.  I.e.  if you write an 
xs:integer is it OK to get back an xs:string ?

David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224



Kurt Cagle wrote:
&gt;<i> I'm inclined to thing here that there are multiple issues hiding in 
</I>&gt;<i> the question of serialization of XDM. Serialization of turtle node, as 
</I>&gt;<i> Evgeny suggests, points to a non-<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_intelligent_editing.html">XML syntax</a> serialization. Similarly, 
</I>&gt;<i> consider a simple sequence of values:
</I>&gt;<i>
</I>&gt;<i> for $a in (1 to 5) return $a * 5
</I>&gt;<i>
</I>&gt;<i> This cannot be serialized in XML notation at all in any meaningful 
</I>&gt;<i> way. Personally I think that this is where output to sequence notation 
</I>&gt;<i> makes sense:
</I>&gt;<i>
</I>&gt;<i> (5,10,15,20,25)
</I>&gt;<i>
</I>&gt;<i> which would also be consistent with an XQuery consumption model.
</I>&gt;<i>
</I>&gt;<i> This is probably something worth talking to Dr. <a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> on, as he 
</I>&gt;<i> was the editor of the XQuery/XSLT Serialization spec, but it would 
</I>&gt;<i> seem to me that any XDM serialization should either resolve to a 
</I>&gt;<i> specific type'd entity, a document node, a sequence of type'd entities 
</I>&gt;<i> or a sequence of document nodes. This would hold true just as readily 
</I>&gt;<i> for the RDF/Turtle use case; in an XQuery environment each assertion 
</I>&gt;<i> would be given either as a text node() or, if supported, as a distinct 
</I>&gt;<i> item(), and the results of a SPARQL query would then be a sequence of 
</I>&gt;<i> such nodes.
</I>&gt;<i>
</I>&gt;<i> Kurt Cagle
</I>&gt;<i> Managing Editor
</I>&gt;<i> http://xmlToday.org
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> On Sun, Sep 13, 2009 at 11:56 PM, Evgeny Gazdovsky 
</I>&gt;<i> &lt;http://x-query.com/mailman/listinfo/talk &lt;mailto:http://x-query.com/mailman/listinfo/talk&gt;&gt; wrote:
</I>&gt;<i>
</I>&gt;<i>     What about RDF (any not XML notation) and SPARQL/xSPARQL?
</I>&gt;<i>     _______________________________________________
</I>&gt;<i>     http://x-query.com/mailman/listinfo/talk &lt;mailto:http://x-query.com/mailman/listinfo/talk&gt;
</I>&gt;<i>     http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> ------------------------------------------------------------------------
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090914/afaad0f8/attachment.htm
</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003541.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003541.html" /><updated>2009-09-14T02:13:43Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>I'm inclined to thing here that there are multiple issues hiding in the
question of serialization of XDM. Serialization of turtle node, as Evgeny
suggests, points to a non-<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_intelligent_editing.html">XML syntax</a> serialization. Similarly, consider a
simple sequence of values:

for $a in (1 to 5) return $a * 5

This cannot be serialized in XML notation at all in any meaningful way.
Personally I think that this is where output to sequence notation makes
sense:

(5,10,15,20,25)

which would also be consistent with an <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> consumption model.

This is probably something worth talking to Dr. <a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> on, as he was
the editor of the XQuery/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a> Serialization spec, but it would seem to me
that any XDM serialization should either resolve to a specific type'd
entity, a document node, a sequence of type'd entities or a sequence of
document nodes. This would hold true just as readily for the RDF/Turtle <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use
case</a>; in an XQuery environment each assertion would be given either as a
text node() or, if supported, as a distinct item(), and the results of a
SPARQL query would then be a sequence of such nodes.

Kurt Cagle
Managing Editor
http://xmlToday.org


On Sun, Sep 13, 2009 at 11:56 PM, Evgeny Gazdovsky &lt;http://x-query.com/mailman/listinfo/talk&gt;wrote:

&gt;<i> What about RDF (any not XML notation) and SPARQL/xSPARQL?
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090914/521bcd87/attachment.htm
</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003539.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003539.html" /><updated>2009-09-13T23:53:38Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>David, 

in my opinion it is a BIG problem if one feels (like I do) that you are heading for a GREAT idea: advancing from the concept of a byte stream to the concept of an info stream. (info stream = XDM-modelled character stream.) If one remembers what is gained by enabling the interconnection of units emitting/consuming byte streams, one may be surprised to discover that one cannot readily connect by info stream. (That is, unless accepting that all information must be document-wrapped, the XDM subset you spoke of.) Perhaps it is a question of how tightly the units must be coupled. If the work invested in exchange is small compared with internal work (example: consuming/providing <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/web_services.html">web services</a>) it is usually not too much asked to dress up and present oneself as an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> document. XProc accepted this point of view. However, if one aims at a more immediate coupling (shell ...), one arrives at this Big Problem. I think you are right, it *is* a gap, and it *should* be
 addressed by a <a title="W3C" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">W3C</a> recommendation. (Also, this would mean the emancipation of XDM from XML, which is overdue.)

One more thought. <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> is a prince looking like a frog. If the XDM were not what it is and forced XQuery expressions to exchange documents, rather than item sequences, XQuery were a frog looking like a frog. This alone might already make us think... 

With kind regards,
Hans-Juergen




----- Urspr&#252;ngliche Mail ----
From: &quot;David A. Lee&quot; &lt;http://x-query.com/mailman/listinfo/talk&gt;
Subject:  Serialization of XDM

I'm dual-posting this because I think it is relevant to XML in general, 
but perhaps more so to xquery

Summary (postulate)
There is no standard or even 'community accepted' way of serializing XDM

Why is this a problem
XML languages which produce XDM (such as <a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a> and XQuery) and can 
accept XDM (such as XQuery and XPath through external variables) or 
produce XML are not 'closed' wrt serialization.  For example XQuery can 
produce things which have no standardized representation.  The only way 
to consume and produce these &quot;things&quot; are with proprietary formats, and 
even those only exist in 'in memory' language representations in general. 
The classic example is an XDM Sequence.   There is no standard or even 
common serialization format for Sequences.
Thus an XQuery which produces a sequence (say a sequence of xs:integer) 
cannot have its output fed back into another XQuery in any standard way.
It is true that some implementations of XQuery provide in-memory  
formats for XDM such that the result of that vendor's XQuery can be used 
as input to that vendor's XQuery in the space of that vendor's 
implementation language.   And Some frameworks (such as .NET) provide 
in-memory interfaces for XDM.  But in general once you cross vendors or 
cross languages or exit the realm of languages there is no standardized 
or common way to accomplish interop between XDM producers and consumers.

Why is this a BIG problem
I believe one of the reasons XML has achieved its great success to date 
is due to its standardized Text serialization format.  If XML resided 
purely in the abstract space of &quot;INFOSET&quot; I don't believe it would have 
proliferated to even 1,000,000th as much as it has today.
The fact that newer XML processing languages can produce datum which has 
no text serialization format is a BIG problem, IMHO.
It means that there is no way to exchange data produced by one vendor's 
implementation  to another unless it conforms to the subset of XDM which 
is the XML Document.
Even within *the same vendor* it is almost impossible.   For a tougher 
example, take an XQuery which produces an attribute.  There is no XQuery 
vendor that I know of that can serialize an attribute to a 'file' (or 
network, or string buffer)  and read it back even in its own implementation.
Take even something as simple as text.   Serialize a single atomic text 
value such as &quot;1&quot;  and try to read it back.  Even if a vendor supports 
reading XDM from a file, (which I know of none), what type would it 
assign to &quot;1&quot; ?  xs:string ? xs:integer ?


I believe this lack of standardization for serialization of XDM is both 
a &quot;Problem&quot; and a &quot;BIG Problem&quot;
Before I extend the topic to &quot;suggested solutions&quot; I would love some 
feedback.

Q: Does anyone else agree this is a &quot;Problem&quot; or a &quot;Big Problem&quot; ? Am I 
alone ? Why is this NOT a &quot;Big Problem&quot;?
Q: Is there any known work in progress aimed at solving this problem ?
Q: Would it be of value to solve this problem ? (and why not ?)
Q: Would there be any interest in tackling this problem in a formal way, 
such as a W3C recommendation ?
Q: If there were a recommendation approved would vendors be interested 
or willing to adopt / implement it ?

David A. Lee


------------------------------

_______________________________________________
http://x-query.com/mailman/listinfo/talk
http://x-query.com/mailman/listinfo/talk

End of talk Digest, Vol 77, Issue 19
************************************



      


</PRE>
]]></content></entry><entry><title>  Serialization of XDM
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003538.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003538.html" /><updated>2009-09-13T15:06:27Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>I'm dual-posting this because I think it is relevant to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> in general, 
but perhaps more so to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>



Summary (postulate)
There is no <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> or even 'community accepted' way of serializing XDM

Why is this a problem
XML languages which produce XDM (such as <a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a> and XQuery) and can 
accept XDM (such as XQuery and XPath through external variables) or 
produce XML are not 'closed' wrt serialization.  For example XQuery can 
produce things which have no standardized representation.  The only way 
to consume and produce these &quot;things&quot; are with proprietary formats, and 
even those only exist in 'in memory' language representations in general. 
The classic example is an XDM Sequence.   There is no standard or even 
common serialization format for Sequences.
Thus an XQuery which produces a sequence (say a sequence of xs:integer) 
cannot have its output fed back into another XQuery in any standard way.
It is true that some implementations of XQuery provide in-memory  
formats for XDM such that the result of that vendor's XQuery can be used 
as input to that vendor's XQuery in the space of that vendor's 
implementation language.   And Some frameworks (such as .NET) provide 
in-memory interfaces for XDM.  But in general once you cross vendors or 
cross languages or exit the realm of languages there is no standardized 
or common way to accomplish interop between XDM producers and consumers.

Why is this a BIG problem
I believe one of the reasons XML has achieved its great success to date 
is due to its standardized Text serialization format.  If XML resided 
purely in the abstract space of &quot;INFOSET&quot; I don't believe it would have 
proliferated to even 1,000,000th as much as it has today.
The fact that newer XML processing languages can produce datum which has 
no text serialization format is a BIG problem, IMHO.
It means that there is no way to exchange data produced by one vendor's 
implementation  to another unless it conforms to the subset of XDM which 
is the XML Document.
Even within *the same vendor* it is almost impossible.   For a tougher 
example, take an XQuery which produces an attribute.  There is no XQuery 
vendor that I know of that can serialize an attribute to a 'file' (or 
network, or string buffer)  and read it back even in its own implementation.
Take even something as simple as text.   Serialize a single atomic text 
value such as &quot;1&quot;  and try to read it back.  Even if a vendor supports 
reading XDM from a file, (which I know of none), what type would it 
assign to &quot;1&quot; ?  xs:string ? xs:integer ?


I believe this lack of standardization for serialization of XDM is both 
a &quot;Problem&quot; and a &quot;BIG Problem&quot;
Before I extend the topic to &quot;suggested solutions&quot; I would love some 
feedback.

Q: Does anyone else agree this is a &quot;Problem&quot; or a &quot;Big Problem&quot; ? Am I 
alone ? Why is this NOT a &quot;Big Problem&quot;?
Q: Is there any known work in progress aimed at solving this problem ?
Q: Would it be of value to solve this problem ? (and why not ?)
Q: Would there be any interest in tackling this problem in a formal way, 
such as a W3C recommendation ?
Q: If there were a recommendation approved would vendors be interested 
or willing to adopt / implement it ?



David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224



</PRE>
]]></content></entry><entry><title>  Full Text Grammar ambiguous?
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003537.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003537.html" /><updated>2009-09-12T18:00:29Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> thanks for the observation! This problem was recently posted in the
</I>&gt;<i> <a title="W3C" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">W3C</a>'s bugzilla system:
</I>
Thanks Christian, somehow the W3C Bugzillas search doesn't like me
(the feeling is mutual).

Pretty annoying thing though, I think there are already quite a lot of
(partial) XQFT implementations out there, including our own.

Martin
</PRE>
]]></content></entry><entry><title>  Full Text Grammar ambiguous?
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003536.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003536.html" /><updated>2009-09-12T16:37:28Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Martin,

thanks for the observation! This problem was recently posted in the
<a title="W3C" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">W3C</a>'s bugzilla system:

  http://www.w3.org/Bugs/Public/show_bug.cgi?id=7247

..and is currently discussed by the XQFT task force. A decision how to
solve to this issue will be posted at the same place in near future.

Hope this helps,
Christian

___________________________

Christian Gruen
Universitaet Konstanz
Department of Computer &amp; Information Science
D-78457 Konstanz, Germany
Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577
http://www.inf.uni-konstanz.de/~gruen



On Sat, Sep 12, 2009 at 3:27 PM, Martin Probst &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Hi all,
</I>&gt;<i>
</I>&gt;<i> maybe I'm just a bit late to the party, but is it possible that the
</I>&gt;<i> full text grammar from XQFT makes the <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> grammar ambiguous?
</I>&gt;<i>
</I>&gt;<i> Consider the expression:
</I>&gt;<i> &#160;element ftcontains { 'x' }
</I>&gt;<i>
</I>&gt;<i> As far as I can see, it's impossible to tell whether this should be
</I>&gt;<i> parsed as an element constructor for the element named &quot;ftcontains&quot;
</I>&gt;<i> with content 'x', or as a full text matching operation on a child axis
</I>&gt;<i> selection for 'element' against the words 'x'.
</I>&gt;<i>
</I>&gt;<i> Is this a known issue? If yes, how should this be resolved?
</I>&gt;<i>
</I>&gt;<i> Martin
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>
</PRE>
]]></content></entry><entry><title>  Full Text Grammar ambiguous?
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003535.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003535.html" /><updated>2009-09-12T16:27:53Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi all,

maybe I'm just a bit late to the party, but is it possible that the
full text grammar from XQFT makes the <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> grammar ambiguous?

Consider the expression:
  element ftcontains { 'x' }

As far as I can see, it's impossible to tell whether this should be
parsed as an element constructor for the element named &quot;ftcontains&quot;
with content 'x', or as a full text matching operation on a child axis
selection for 'element' against the words 'x'.

Is this a known issue? If yes, how should this be resolved?

Martin
</PRE>
]]></content></entry><entry><title>  Local namespace
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003533.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003533.html" /><updated>2009-09-11T17:23:17Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> <a title="XQuery 1.1" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery 1.1</a> is introducing the &quot;private&quot; function modifier, which will
</I>&gt;<i> allow the definition of functions that aren't exported from a module.
</I>
Simply dropping the namespace requirement and mandating that only the
properly namespaced functions are exported might have accomplished the
same thing without additional syntax, right?

&gt;&gt;<i> I have also never really understood why it must be possible to have
</I>&gt;&gt;<i> one module with one target namespace split over multiple files; I
</I>&gt;&gt;<i> think <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a> has shown that the forced one-to-one relationship between
</I>&gt;&gt;<i> conceptual name (class) and file (.java) is a good thing.
</I>&gt;<i>
</I>&gt;<i> 1) Modules aren't classes, they are more like library <a title="APIs" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/api/">APIs</a>.
</I>
Yes.

&gt;<i> 2) Java's rules are by no means universally considered a good thing. In
</I>&gt;<i> particular it might be beneficial to split up a 5000 line <a title="Java class" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/java_code_generation.html">Java class</a>
</I>&gt;<i> into multiple files, or to group together implementations of the same
</I>&gt;<i> method from multiple implementations of a class.
</I>
Well, if you have a single class spanning 5000 lines that might be a
sign of doing it wrong in the first place ;-) The thing about grouping
together tiny, closely related classes works for me in Java using
nested classes, YMMV.

My point was that I generally think its beneficial to have only
exactly one &quot;entity&quot; (i.e. XQuery module file) completely containing
everything thats relevant for one particular namespace, that makes
many things much easier, in particular when <a title="IDE" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_product_index.html">IDE</a> support (go to
definition) isn't all that great yet.

&gt;<i> 3) Actually the XQuery spec doesn't say anything about whether a module
</I>&gt;<i> namespace can be split across multiple module files - that's left
</I>&gt;<i> implementation defined.
</I>
Yes, but this is how I understood the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_feature_overview.html">feature</a>. And at least at some
point of time the test suite kind of enforced that feature.

Martin
</PRE>
]]></content></entry><entry><title>  Local namespace
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003534.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003534.html" /><updated>2009-09-11T16:40:39Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Martin Probst wrote:
&gt;&gt;<i> <a title="XQuery 1.1" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery 1.1</a> is introducing the &quot;private&quot; function modifier, which will
</I>&gt;&gt;<i> allow the definition of functions that aren't exported from a module.
</I>&gt;<i> 
</I>&gt;<i> Simply dropping the namespace requirement and mandating that only the
</I>&gt;<i> properly namespaced functions are exported might have accomplished the
</I>&gt;<i> same thing without additional syntax, right?
</I>
Yes - that's what I originally suggested. However the XQuery working
group felt it was important to be able change a function to be exported
/ not-exported without changing every place that function is called.

John

-- 
John Snelson, <a title="Oracle" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/oracle.html">Oracle</a> Corporation            http://snelson.org.uk/john
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dbxml.html">Berkeley DB XML</a>:            http://oracle.com/database/berkeley-db/xml
XQilla:                                  http://xqilla.sourceforge.net
</PRE>
]]></content></entry><entry><title>  Local namespace
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003532.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003532.html" /><updated>2009-09-11T16:05:35Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Martin Probst wrote:
&gt;<i> Indeed, you may not define functions or variables in modules that
</I>&gt;<i> don't have the same namespace URI as the module:
</I>&gt;<i> 
</I>&gt;<i> &quot;The name of every variable and function declared in a library module
</I>&gt;<i> must have a namespace URI that is the same as the target namespace of
</I>&gt;<i> the module; otherwise a static error is raised [err:XQST0048].&quot;
</I>&gt;<i> 
</I>&gt;<i> Why that must be, I have never understood. It doesn't save the user
</I>&gt;<i> from hard-to-find typo errors errors as you'd always declare the
</I>&gt;<i> namespace prefix while declaring the module namespace, and then use
</I>&gt;<i> that prefix. And it (IMHO) actively acts against modularization, as
</I>&gt;<i> local variables or functions are highly desirable. In X-Hive / xDB, we
</I>&gt;<i> have never followed that spec rule and allowed local
</I>&gt;<i> functions/variables in modules, those are simply not exported to
</I>&gt;<i> importing modules.
</I>
<a title="XQuery 1.1" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery 1.1</a> is introducing the &quot;private&quot; function modifier, which will
allow the definition of functions that aren't exported from a module.

&gt;<i> I have also never really understood why it must be possible to have
</I>&gt;<i> one module with one target namespace split over multiple files; I
</I>&gt;<i> think <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a> has shown that the forced one-to-one relationship between
</I>&gt;<i> conceptual name (class) and file (.java) is a good thing.
</I>
1) Modules aren't classes, they are more like library <a title="APIs" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/api/">APIs</a>.

2) Java's rules are by no means universally considered a good thing. In
particular it might be beneficial to split up a 5000 line <a title="Java class" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/java_code_generation.html">Java class</a>
into multiple files, or to group together implementations of the same
method from multiple implementations of a class.

3) Actually the XQuery spec doesn't say anything about whether a module
namespace can be split across multiple module files - that's left
implementation defined.

John

-- 
John Snelson, <a title="Oracle" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/oracle.html">Oracle</a> Corporation            http://snelson.org.uk/john
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dbxml.html">Berkeley DB XML</a>:            http://oracle.com/database/berkeley-db/xml
XQilla:                                  http://xqilla.sourceforge.net
</PRE>
]]></content></entry><entry><title>  Local namespace
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003531.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003531.html" /><updated>2009-09-11T16:02:13Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>With a big caveat as I have not been involved in any of this, just how
it seems to me.

&gt;<i> &#160;From what I can see in the <a title="XQuery 1.0" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery 1.0</a> REC, the &quot;local&quot; namespace
</I>&gt;<i> is aimed to be used only in a main module, and only to locally
</I>&gt;<i> define functions (not variables.)
</I>
I think this simply came from the problem that functions without
namespaces, which were allowed in an earlier draft, can collide with
the built in functions or type names, so it was decided to require a
namespace for all <a title="user defined functions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/xquery_functions.html">user defined functions</a>. To make that a bit easier,
we now have the local: namespace predeclared.

This does not apply to variables as they don't share the same symbol
space as functions, i.e. their names don't collide.

&gt;<i> This is a bit surprising to me,
</I>&gt;<i> as I thought we could define both local:* functions &amp; variables,
</I>&gt;<i> both in main and library modules...
</I>
Indeed, you may not define functions or variables in modules that
don't have the same namespace URI as the module:

&quot;The name of every variable and function declared in a library module
must have a namespace URI that is the same as the target namespace of
the module; otherwise a static error is raised [err:XQST0048].&quot;

Why that must be, I have never understood. It doesn't save the user
from hard-to-find typo errors errors as you'd always declare the
namespace prefix while declaring the module namespace, and then use
that prefix. And it (IMHO) actively acts against modularization, as
local variables or functions are highly desirable. In X-Hive / xDB, we
have never followed that spec rule and allowed local
functions/variables in modules, those are simply not exported to
importing modules.

I have also never really understood why it must be possible to have
one module with one target namespace split over multiple files; I
think <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a> has shown that the forced one-to-one relationship between
conceptual name (class) and file (.java) is a good thing.

Martin

</PRE>
]]></content></entry><entry><title>  Fwd: xmlns ignore
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003530.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003530.html" /><updated>2009-09-11T14:01:05Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>

&gt;<i> I have a problem to ignore a xmls attribute in a tag and did not found
</I>&gt;<i> information how to ignore this attribute. Somebody can help me.
</I>
A namespace declaration is not an attribute in the XDM model used by
<a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a> and <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">Xquery</a>. The name of an element includes the namespace.

Most likely the part of teh code that you don't show

= comp.compile(&quot;/.../... ...&quot;);

is selecting elements in no-namespace, and you should change it to
select elements in the namespace used in your <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> source.

either by using a prefix
/p:aa/p:bb

and <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">binding</a> p to the namespace used in the source, or by setting the
default namespace in the xquery to that used in the source.


David


________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, <a title="DOM Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">United Kingdom</a>.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________
</PRE>
]]></content></entry><entry><title>  Fwd: xmlns ignore
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003529.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003529.html" /><updated>2009-09-11T09:45:08Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Dear all,

I have a problem to ignore a xmls attribute in a tag and did not found
information how to ignore this attribute. Somebody can help me.


I'm using the <a title="saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">saxon</a> HE 9.2 to read a <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>. My xml have a tag  with  &quot;xmlns=&quot;
http://www. ...&quot;&quot;, how ignore the &quot;xmlns&quot; when a read the file?

I needed to ignore this attribute because the address return &#8220;page no found&#8221;
and so my program return nothing. As test, I remove the address from the xml
and the program return the correct  value.


I'm reading the file using this code:

                 Processor proc = new Processor(false);
                 XQueryCompiler comp = proc.newXQueryCompiler();
                 XdmNode source =   proc.newDocumentBuilder().build(new
StreamSource(inputFile));


                 XQueryExecutable exp = comp.compile(&quot;/.../... ...&quot;);
                 XQueryEvaluator eval = exp.load();
                 eval.setContextItem(source);

                 XdmValue v = eval.evaluate();
                 System.out.println(v.size());


Regards and thank you very much by any help,




---------- Forwarded message ----------
From: <a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> &lt;http://x-query.com/mailman/listinfo/talk&gt;
Date: 2009/9/3
Subject: RE: xmlns ignore
To: http://x-query.com/mailman/listinfo/talk



Short answer: you can't.

This is actually a <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> coding question, nothing specific to
Saxon, so I suggest that you ask it on http://x-query.com/mailman/listinfo/talk

Michael Kay
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">Saxonica</a>

&gt;<i> -----Original Message-----
</I>&gt;<i> From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk]
</I>&gt;<i> Sent: 02 September 2009 16:04
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject: xmlns ignore
</I>&gt;<i>
</I>&gt;<i> Dear Michael Kay
</I>&gt;<i>
</I>&gt;<i> I'm using the saxon HE 9.2 to read a xml. My xml have a tag
</I>&gt;<i> with  &quot;xmlns=&quot;http://www. ...&quot;&quot;, how ignore the &quot;xmlns&quot; when
</I>&gt;<i> a read the file?
</I>&gt;<i>
</I>&gt;<i> I'm reading the file using this code:
</I>&gt;<i>
</I>&gt;<i>                 Processor proc = new Processor(false);
</I>&gt;<i>                 XQueryCompiler comp = proc.newXQueryCompiler();
</I>&gt;<i>                 XdmNode source =
</I>&gt;<i> proc.newDocumentBuilder().build(new StreamSource(inputFile));
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>                 XQueryExecutable exp = comp.compile(&quot;/.../... ...&quot;);
</I>&gt;<i>                 XQueryEvaluator eval = exp.load();
</I>&gt;<i>                 eval.setContextItem(source);
</I>&gt;<i>
</I>&gt;<i>                 XdmValue v = eval.evaluate();
</I>&gt;<i>                 System.out.println(v.size());
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Regards ,
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>



-- 
S&#233;rgio Mariano Dias
http://www.dcc.ufmg.br/~mariano &lt;http://www.dcc.ufmg.br/%7Emariano&gt;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090911/c744fc0d/attachment.htm
</PRE>
]]></content></entry><entry><title>  Schema reporting tools -  XQuery use case?
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003528.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003528.html" /><updated>2009-09-10T15:09:58Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello Lisa,

the article was very interesting to me, thank you! Whereas hitherto I only thought of &quot;schema reports&quot;, your work shows me that there is a parallel approach one might call &quot;schema querying&quot;. (In fact, I borrowed this term from the namespace URI you used in your article.)  

Trying to define the terms: schema reporting transforms <a title="schema documents" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema documents</a> into new documents conveying part of the schema information (e.g. listing valid data paths); the result is a new resource. Schema querying, on the other hand, is a functionality that provides answers for certain kinds of questions referring to the schema. Schema querying tends to provide dynamic information, referring to instance data, whereas schema reporting usually delivers static information. The border is not sharp: the smaller the report's scope, the closer it resembles an answer to a query, and the use of config parameters may link the report to instance data (e.g. by filtering data). Certainly your function 'load-schemas-by-URI' can be regarded as schema reporting (if you add the possibility to collect the retrieved schemas into a single document).

Now I think that the &quot;important use case&quot; I spoke of comprises both, schema reporting and schema querying. And one thing for sure, schema reports can be a convenient basis <a title="for implementing schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">for implementing schema</a> querying.

With kind regards,
Hans-Juergen




----- Urspr&#252;ngliche Mail ----
Von: Xia Li &lt;http://x-query.com/mailman/listinfo/talk&gt;
An: Hans-Juergen Rennau &lt;http://x-query.com/mailman/listinfo/talk&gt;; http://x-query.com/mailman/listinfo/talk
CC: http://x-query.com/mailman/listinfo/talk
Gesendet: Mittwoch, den 9. September 2009, 10:54:05 Uhr
Betreff: RE:  Schema reporting tools -  XQuery use case?


As a typical use case, schema information is frequently <a title="used to process
GML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/opengis/index.html">used to process
GML</a>(Geography Markup Language) instance data. Mostly, the schema
querying part is done <a title="xerces Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/xerces.html">with the help of Xerces-J XML schema processing
library</a> in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a>. But I do think it is quite useful to have the same
thing done in XML processing language directly instead of having to call
external functions. Ideally, it is best done in XQuery processors and
<a title="XPath Example" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath 2</a> spec does provide some functions to retrieve schema information.
However, the problem is it is not widely supported feature, and there
barely open source XPath processors that support such functionalities. I
<a title="Working with XSLT" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xsltedit1/xsltedit1.html">developed an XSLT</a> function library to query schema information. It
essentially contains functions to retrieve a type definition for a given
element. 
    
http://www.ibm.com/developerworks/library/x-schemanode/

It is a much more intriguing programming experience to do this in XSLT
than in Java and I think it can be equally done in XQuery as well.

Lisa


      


</PRE>
]]></content></entry><entry><title>  Local namespace
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003527.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003527.html" /><updated>2009-09-10T14:24:52Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>  Hi,

  From what I can see in the <a title="XQuery 1.0" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery 1.0</a> REC, the &quot;local&quot; namespace
is aimed to be used only in a main module, and only to locally
define functions (not variables.)  This is a bit surprising to me,
as I thought we could define both local:* functions &amp; variables,
both in main and library modules...

  But maybe I misread the REC.  Any thoughts?

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/























      


</PRE>
]]></content></entry><entry><title>  parse form data to XML
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003526.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003526.html" /><updated>2009-09-09T23:02:50Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>i guess XForms in any case better then ordinar HTML forms - so i can
assume that you just underinvestigate this case :)

On Wed, Sep 9, 2009 at 5:32 PM, Jesse Wu&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Hi Sedov,
</I>&gt;<i>
</I>&gt;<i> I tried XForms but found when the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> model is loaded from a very
</I>&gt;<i> large file with many attributes (vary for each element) for each of
</I>&gt;<i> the element, the screen editing is not practical. May be there is a
</I>&gt;<i> better way to do this using XForms but I could not find a good
</I>&gt;<i> example.
</I>&gt;<i>
</I>&gt;<i> Thanks -Jes
</I>&gt;<i>
</I>&gt;<i> On Wed, Sep 9, 2009 at 12:30 AM, Vyacheslav Sedov
</I>&gt;<i> &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
</I>&gt;&gt;<i> what about XRX? XForms-REST-<a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> On Wed, Sep 9, 2009 at 3:06 AM, Martin Probst&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
</I>&gt;&gt;&gt;&gt;<i> &#160; &#160;{for $parsed-query-term in $parsed-data
</I>&gt;&gt;&gt;&gt;<i> &#160; &#160; &#160; &#160; &#160; &#160; &#160; let $parse-query-value := substring-after($parsed-query-term,&quot;=&quot;)
</I>&gt;&gt;&gt;&gt;<i> &#160; &#160; &#160; &#160; &#160; &#160; &#160; return &lt;row attr=&quot;{???}&quot;&gt;{xmldb:decode($parse-query-value)}&lt;/row&gt;
</I>&gt;&gt;&gt;&gt;<i> &#160; &#160; &#160; &#160; &#160; &#160; &#160; }
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> What about
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> for $parsed-query-term in $parsed-data
</I>&gt;&gt;&gt;<i> let $parse-query-value := substring-after($parsed-query-term,&quot;=&quot;)
</I>&gt;&gt;&gt;<i> let $parameter-name := substring-before($parsed-query-term,
</I>&gt;&gt;&gt;<i> concat(&quot;=&quot;, $parse-query-value))
</I>&gt;&gt;&gt;<i> return &lt;row attr=&quot;{$parameter-name}&quot;&gt;{xmldb:decode($parse-query-value)}&lt;/row&gt;
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> Alternatively you can simply split again:
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> for $parsed-query-term in $parsed-data
</I>&gt;&gt;&gt;<i> let $kv := tokenize($parsed-query-term, '=')
</I>&gt;&gt;&gt;<i> let $key := $kv[1]
</I>&gt;&gt;&gt;<i> let $value := string-join($kv[position()&gt;1],'=')
</I>&gt;&gt;&gt;<i> return &lt;row attr=&quot;{$key}&quot;&gt;{xmldb:decode($value)}&lt;/row&gt;
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> As the value might contain '=' (I think, or does that need to be
</I>&gt;&gt;&gt;<i> percent encoded?), $kv might contain multiple value parts, so the
</I>&gt;&gt;&gt;<i> string-join is necessary to glue them together again.
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> Martin
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> _______________________________________________
</I>&gt;&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>
</PRE>
]]></content></entry><entry><title>  &amp;quot;Pruning&amp;quot; an xml &amp;quot;tree&amp;quot; based on nodes' ids
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003524.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003524.html" /><updated>2009-09-09T17:50:19Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> copy $x := ...
</I>&gt;<i> transform (
</I>&gt;<i> &#160;delete nodes $x//branch[ID != (4, 8)], $x//leaf[ID != 15]
</I>&gt;<i> )
</I>&gt;<i> return $x
</I>
Whoops, that should have been

copy $x := ...
transform (
 delete nodes ($x//branch[every $x in (4, 8) satisfies ID != $x],
$x//leaf[ID != 15])
)
return $x

If you compare using != against a list, you need to use
every/satisfies, otherwise the expression will be true if only one of
the values is not equal to the list. Also, parentheses around the
delete nodes part are needed.

Martin

</PRE>
]]></content></entry><entry><title>  &amp;quot;Pruning&amp;quot; an xml &amp;quot;tree&amp;quot; based on nodes' ids
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003522.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003522.html" /><updated>2009-09-09T16:00:17Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> I am trying to prune an <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> tree based on known ids for the nodes in that
</I>&gt;<i> tree.
</I>&gt;<i> [...]
</I>&gt;<i> For example if I know that I&#8217;m in tree id 1 and the branches I
</I>&gt;<i> took in order are 1,4,8,
</I>
Are you doing this using copy/transform like the last time?

What about deleting those nodes with the wrong ID?

copy $x := ...
transform (
  delete nodes $x//branch[ID != (4, 8)], $x//leaf[ID != 15]
)
return $x

(Assuming that you'll never need to remove the tree node itself)

Martin

</PRE>
]]></content></entry><entry><title>  Schema reporting tools - XQuery use case?
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003518.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003518.html" /><updated>2009-09-09T13:39:41Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>i am very seriously thinking about XSLT-based convertor from XSD to
Schematron rules - i have opinion that Schematron power underestimated
in XML world

On Wed, Sep 9, 2009 at 11:55 AM, ricardo
queiros&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Hi,
</I>&gt;<i> I <a title="How To Build XML Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">develop a tool for browsing XML Schema</a> files in a easy way.
</I>&gt;<i> The tool calls http://x-query.com/mailman/listinfo/talk and can be downloaded as open source
</I>&gt;<i> at&#160;http://www.dcc.fc.up.pt/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_doc_gen.html">schemaDoc</a>/.
</I>&gt;<i> It is based on a XSLT file that transforms the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema file</a> in XHTML code to
</I>&gt;<i> be interpreted in a general browser.
</I>&gt;<i> So the only requirement is a web browser.
</I>&gt;<i> At this moment the tool don't support a few elements of the W3C XML Schema
</I>&gt;<i> specification (e.g. field, key, keyref, redefine, selector, unique elements
</I>&gt;<i> and abstract, substitutionGroup attributtes). It supports Schematron.rules
</I>&gt;<i> embeded in the schema file.
</I>&gt;<i> Best regards.
</I>&gt;<i>
</I>&gt;<i> 2009/9/9 Hans-Juergen Rennau &lt;http://x-query.com/mailman/listinfo/talk&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Hello People,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> XQuery is _the_ language for agile and efficient evaluation of XML
</I>&gt;&gt;<i> resources (who would contradict me?). But there is another important
</I>&gt;&gt;<i> technology, of course, XML Schema: though its use is often reduced to
</I>&gt;&gt;<i> document validation or <a title="data binding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">data binding</a>, schemas offer a great wealth of static
</I>&gt;&gt;<i> information about (valid) documents. I am sometimes amazed how merrily this
</I>&gt;&gt;<i> information is ignored, especially in <a title="projects" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_project.html">projects</a> that have to deal with very
</I>&gt;&gt;<i> complex schemas.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Unfortunately, schemas are difficult to read and, worse, difficult to use
</I>&gt;&gt;<i> as input for further processing, as the schema language allows to express
</I>&gt;&gt;<i> the (essentially) same information in so many ways, what with model groups,
</I>&gt;&gt;<i> attribute sets, type derivations, etc. Example: some configuration contains
</I>&gt;&gt;<i> a data path, and one has the appropriate schema files available - how can
</I>&gt;&gt;<i> one implement an automatic check of the path string against that schema?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> In consequence, I believe creating &quot;schema reporting&quot; tools may be an
</I>&gt;&gt;<i> important <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use case</a> for XQuery.Here, schema reporting is understood as
</I>&gt;&gt;<i> transforming schema files into a different serialized representation of all
</I>&gt;&gt;<i> or some information the schema contains. (I am _not_ thinking of graphical
</I>&gt;&gt;<i> representations as offered by <a title="Stylus Studio XML IDE" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_product_index.html">XML IDEs</a> unless they are accompanied by
</I>&gt;&gt;<i> serialized versions appropriate to serve as input for further processing.)
</I>&gt;&gt;<i> Some examples were: a tree representation of document structure, a list of
</I>&gt;&gt;<i> valid data paths, a mapping of element and attribute names to the governing
</I>&gt;&gt;<i> type, a mapping of type names to data paths.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Well - would anyone like to comment on the statement about such schema
</I>&gt;&gt;<i> reporting being an important use case for XQuery?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> In this context it is of course important to know what is already
</I>&gt;&gt;<i> available (commercial or open source). Would anyone like to speak about
</I>&gt;&gt;<i> available schema reporting tools (in the sense defined above)?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Thank you very much,
</I>&gt;&gt;<i> with kind regards -
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Hans-Juergen Rennau
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> _______________________________________________
</I>&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> Ricardo Queir&#243;s
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>
</PRE>
]]></content></entry><entry><title>  Schema reporting tools - XQuery use case?
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003520.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003520.html" /><updated>2009-09-09T13:29:58Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Rick Jelliffe published a number of articles on this, the last one is
http://broadcast.oreilly.com/2009/08/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/convert_to_xml.html">converting</a>-xml-schemas-to-sche-1.html

Best Regards,
George
-- 
George Cristian Bina
&lt;oXygen/&gt; XML Editor, Schema <a title="Building XSLT Stylesheet Applications" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xsltedit1/xsltedit1.html">Editor and XSLT</a> Editor/Debugger
http://www.oxygenxml.com

Vyacheslav Sedov wrote:
&gt;<i> i am very seriously thinking about XSLT-based convertor from XSD to
</I>&gt;<i> Schematron rules - i have opinion that Schematron power underestimated
</I>&gt;<i> in XML world
</I>&gt;<i> 
</I>&gt;<i> On Wed, Sep 9, 2009 at 11:55 AM, ricardo
</I>&gt;<i> queiros&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
</I>&gt;&gt;<i> Hi,
</I>&gt;&gt;<i> I <a title="How To Build XML Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">develop a tool for browsing XML Schema</a> files in a easy way.
</I>&gt;&gt;<i> The tool calls http://x-query.com/mailman/listinfo/talk and can be downloaded as open source
</I>&gt;&gt;<i> at http://www.dcc.fc.up.pt/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_doc_gen.html">schemaDoc</a>/.
</I>&gt;&gt;<i> It is based on a XSLT file that transforms the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema file</a> in XHTML code to
</I>&gt;&gt;<i> be interpreted in a general browser.
</I>&gt;&gt;<i> So the only requirement is a web browser.
</I>&gt;&gt;<i> At this moment the tool don't support a few elements of the W3C XML Schema
</I>&gt;&gt;<i> specification (e.g. field, key, keyref, redefine, selector, unique elements
</I>&gt;&gt;<i> and abstract, substitutionGroup attributtes). It supports Schematron.rules
</I>&gt;&gt;<i> embeded in the schema file.
</I>&gt;&gt;<i> Best regards.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> 2009/9/9 Hans-Juergen Rennau &lt;http://x-query.com/mailman/listinfo/talk&gt;
</I>&gt;&gt;&gt;<i> Hello People,
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> XQuery is _the_ language for agile and efficient evaluation of XML
</I>&gt;&gt;&gt;<i> resources (who would contradict me?). But there is another important
</I>&gt;&gt;&gt;<i> technology, of course, XML Schema: though its use is often reduced to
</I>&gt;&gt;&gt;<i> document validation or <a title="data binding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">data binding</a>, schemas offer a great wealth of static
</I>&gt;&gt;&gt;<i> information about (valid) documents. I am sometimes amazed how merrily this
</I>&gt;&gt;&gt;<i> information is ignored, especially in projects that have to deal with very
</I>&gt;&gt;&gt;<i> complex schemas.
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> Unfortunately, schemas are difficult to read and, worse, difficult to use
</I>&gt;&gt;&gt;<i> as input for further processing, as the schema language allows to express
</I>&gt;&gt;&gt;<i> the (essentially) same information in so many ways, what with model groups,
</I>&gt;&gt;&gt;<i> attribute sets, type derivations, etc. Example: some configuration contains
</I>&gt;&gt;&gt;<i> a data path, and one has the appropriate schema files available - how can
</I>&gt;&gt;&gt;<i> one implement an automatic check of the path string against that schema?
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> In consequence, I believe creating &quot;schema reporting&quot; tools may be an
</I>&gt;&gt;&gt;<i> important use case for XQuery.Here, schema reporting is understood as
</I>&gt;&gt;&gt;<i> transforming schema files into a different serialized representation of all
</I>&gt;&gt;&gt;<i> or some information the schema contains. (I am _not_ thinking of graphical
</I>&gt;&gt;&gt;<i> representations as offered by <a title="Stylus Studio XML IDE" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_product_index.html">XML IDEs</a> unless they are accompanied by
</I>&gt;&gt;&gt;<i> serialized versions appropriate to serve as input for further processing.)
</I>&gt;&gt;&gt;<i> Some examples were: a tree representation of document structure, a list of
</I>&gt;&gt;&gt;<i> valid data paths, a mapping of element and attribute names to the governing
</I>&gt;&gt;&gt;<i> type, a mapping of type names to data paths.
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> Well - would anyone like to comment on the statement about such schema
</I>&gt;&gt;&gt;<i> reporting being an important use case for XQuery?
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> In this context it is of course important to know what is already
</I>&gt;&gt;&gt;<i> available (commercial or open source). Would anyone like to speak about
</I>&gt;&gt;&gt;<i> available schema reporting tools (in the sense defined above)?
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> Thank you very much,
</I>&gt;&gt;&gt;<i> with kind regards -
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> Hans-Juergen Rennau
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> _______________________________________________
</I>&gt;&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> --
</I>&gt;&gt;<i> Ricardo Queir&#243;s
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> _______________________________________________
</I>&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i>
</I>&gt;<i> 
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I></PRE>
]]></content></entry><entry><title>  Schema reporting tools -  XQuery use case?
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003519.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003519.html" /><updated>2009-09-09T13:26:44Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>The commercial <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> 9.2 EE (previous Saxon-SA) XML Schema processor has 
a command line switch that outputs an XML file with the schema 
information in a format suitable for further processing.
For details see the -scmout:filename option
http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/documentation9.2/schema-processing/commandline.html

Best Regards,
George
-- 
George Cristian Bina
&lt;oXygen/&gt; XML Editor, Schema <a title="Building XSLT Stylesheet Applications" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xsltedit1/xsltedit1.html">Editor and XSLT</a> Editor/Debugger
http://www.oxygenxml.com

Hans-Juergen Rennau wrote:
&gt;<i> Hello People,
</I>&gt;<i> 
</I>&gt;<i> XQuery is _the_ language for agile and efficient evaluation of XML resources (who would contradict me?). But there is another important technology, of course, XML Schema: though its use is often reduced to document validation or <a title="data binding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">data binding</a>, schemas offer a great wealth of static information about (valid) documents. I am sometimes amazed how merrily this information is ignored, especially in projects that have to deal with very complex schemas.
</I>&gt;<i> 
</I>&gt;<i> Unfortunately, schemas are difficult to read and, worse, difficult to use as input for further processing, as the schema language allows to express the (essentially) same information in so many ways, what with model groups, attribute sets, type derivations, etc. Example: some configuration contains a data path, and one has the appropriate <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema files</a> available - how can one implement an automatic check of the path string against that schema?
</I>&gt;<i> 
</I>&gt;<i> In consequence, I believe creating &quot;schema reporting&quot; tools may be an important <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use case</a> for XQuery.Here, schema reporting is understood as transforming schema files into a different serialized representation of all or some information the schema contains. (I am _not_ thinking of graphical representations as offered by <a title="Stylus Studio XML IDE" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_product_index.html">XML IDEs</a> unless they are accompanied by serialized versions appropriate to serve as input for further processing.) Some examples were: a tree representation of document structure, a list of valid data paths, a mapping of element and attribute names to the governing type, a mapping of type names to data paths.
</I>&gt;<i> 
</I>&gt;<i> Well - would anyone like to comment on the statement about such schema reporting being an important use case for XQuery?
</I>&gt;<i> 
</I>&gt;<i> In this context it is of course important to know what is already available (commercial or open source). Would anyone like to speak about available schema reporting tools (in the sense defined above)?
</I>&gt;<i> 
</I>&gt;<i> Thank you very much,
</I>&gt;<i> with kind regards -
</I>&gt;<i> 
</I>&gt;<i> Hans-Juergen Rennau
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i>       
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I></PRE>
]]></content></entry><entry><title>  Schema reporting tools -  XQuery use case?
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003525.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003525.html" /><updated>2009-09-09T11:54:05Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
As a typical use case, schema information is frequently <a title="used to process
GML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/opengis/index.html">used to process
GML</a>(Geography Markup Language) instance data. Mostly, the schema
querying part is done <a title="xerces Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/xerces.html">with the help of Xerces-J XML schema processing
library</a> in Java. But I do think it is quite useful to have the same
thing done in XML processing language directly instead of having to call
external functions. Ideally, it is best done in XQuery processors and
<a title="XPath Example" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath 2</a> spec does provide some functions to retrieve schema information.
However, the problem is it is not widely supported feature, and there
barely open source XPath processors that support such functionalities. I
<a title="Working with XSLT" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xsltedit1/xsltedit1.html">developed an XSLT</a> function library to query schema information. It
essentially contains functions to retrieve a type definition for a given
element. 
     
http://www.ibm.com/developerworks/library/x-schemanode/

It is a much more intriguing programming experience to do this in XSLT
than in Java and I think it can be equally done in XQuery as well.

Lisa


-----Original Message-----
From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On
Behalf Of Hans-Juergen Rennau
Sent: Tuesday, September 08, 2009 11:15 PM
To: http://x-query.com/mailman/listinfo/talk
Cc: http://x-query.com/mailman/listinfo/talk
Subject:  Schema reporting tools - XQuery use case?

Hello People,

XQuery is _the_ language for agile and efficient evaluation of XML
resources (who would contradict me?). But there is another important
technology, of course, XML Schema: though its use is often reduced to
document validation or <a title="data binding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">data binding</a>, schemas offer a great wealth of
static information about (valid) documents. I am sometimes amazed how
merrily this information is ignored, especially in projects that have to
deal with very complex schemas.

Unfortunately, schemas are difficult to read and, worse, difficult to
use as input for further processing, as the schema language allows to
express the (essentially) same information in so many ways, what with
model groups, attribute sets, type derivations, etc. Example: some
configuration contains a data path, and one has the appropriate <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema
files</a> available - how can one implement an automatic check of the path
string against that schema?

In consequence, I believe creating &quot;schema reporting&quot; tools may be an
important use case for XQuery.Here, schema reporting is understood as
transforming schema files into a different serialized representation of
all or some information the schema contains. (I am _not_ thinking of
graphical representations as offered by <a title="Stylus Studio XML IDE" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_product_index.html">XML IDEs</a> unless they are
accompanied by serialized versions appropriate to serve as input for
further processing.) Some examples were: a tree representation of
document structure, a list of valid data paths, a mapping of element and
attribute names to the governing type, a mapping of type names to data
paths.

Well - would anyone like to comment on the statement about such schema
reporting being an important use case for XQuery?

In this context it is of course important to know what is already
available (commercial or open source). Would anyone like to speak about
available schema reporting tools (in the sense defined above)?

Thank you very much,
with kind regards -

Hans-Juergen Rennau


      


_______________________________________________
http://x-query.com/mailman/listinfo/talk
http://x-query.com/mailman/listinfo/talk

</PRE>
]]></content></entry><entry><title>  parse form data to XML
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003523.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003523.html" /><updated>2009-09-09T10:32:05Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi Sedov,

I tried XForms but found when the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> model is loaded from a very
large file with many attributes (vary for each element) for each of
the element, the screen editing is not practical. May be there is a
better way to do this using XForms but I could not find a good
example.

Thanks -Jes

On Wed, Sep 9, 2009 at 12:30 AM, Vyacheslav Sedov
&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> what about XRX? XForms-REST-<a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>
</I>&gt;<i>
</I>&gt;<i> On Wed, Sep 9, 2009 at 3:06 AM, Martin Probst&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
</I>&gt;&gt;&gt;<i> &#160; &#160;{for $parsed-query-term in $parsed-data
</I>&gt;&gt;&gt;<i> &#160; &#160; &#160; &#160; &#160; &#160; &#160; let $parse-query-value := substring-after($parsed-query-term,&quot;=&quot;)
</I>&gt;&gt;&gt;<i> &#160; &#160; &#160; &#160; &#160; &#160; &#160; return &lt;row attr=&quot;{???}&quot;&gt;{xmldb:decode($parse-query-value)}&lt;/row&gt;
</I>&gt;&gt;&gt;<i> &#160; &#160; &#160; &#160; &#160; &#160; &#160; }
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> What about
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> for $parsed-query-term in $parsed-data
</I>&gt;&gt;<i> let $parse-query-value := substring-after($parsed-query-term,&quot;=&quot;)
</I>&gt;&gt;<i> let $parameter-name := substring-before($parsed-query-term,
</I>&gt;&gt;<i> concat(&quot;=&quot;, $parse-query-value))
</I>&gt;&gt;<i> return &lt;row attr=&quot;{$parameter-name}&quot;&gt;{xmldb:decode($parse-query-value)}&lt;/row&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Alternatively you can simply split again:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> for $parsed-query-term in $parsed-data
</I>&gt;&gt;<i> let $kv := tokenize($parsed-query-term, '=')
</I>&gt;&gt;<i> let $key := $kv[1]
</I>&gt;&gt;<i> let $value := string-join($kv[position()&gt;1],'=')
</I>&gt;&gt;<i> return &lt;row attr=&quot;{$key}&quot;&gt;{xmldb:decode($value)}&lt;/row&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> As the value might contain '=' (I think, or does that need to be
</I>&gt;&gt;<i> percent encoded?), $kv might contain multiple value parts, so the
</I>&gt;&gt;<i> string-join is necessary to glue them together again.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Martin
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> _______________________________________________
</I>&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>
</PRE>
]]></content></entry><entry><title>  Schema reporting tools - XQuery use case?
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003517.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003517.html" /><updated>2009-09-09T09:55:02Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,
I <a title="How To Build XML Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">develop a tool for browsing XML Schema</a> files in a easy way.
The tool calls http://x-query.com/mailman/listinfo/talk and can be downloaded as open source at
http://www.dcc.fc.up.pt/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_doc_gen.html">schemaDoc</a>/.
It is based on a XSLT file that transforms the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema file</a> in XHTML code to
be interpreted in a general browser.
So the only requirement is a web browser.

At this moment the tool don't support a few elements of the W3C <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/schema0/_index.htm">XML Schema
specification</a> (e.g. *field, key, keyref, redefine, selector, unique *elements
and *abstract, substitutionGroup *attributtes). It supports Schematron.rules
embeded in the schema file.

Best regards.

2009/9/9 Hans-Juergen Rennau &lt;http://x-query.com/mailman/listinfo/talk&gt;

&gt;<i> Hello People,
</I>&gt;<i>
</I>&gt;<i> XQuery is _the_ language for agile and efficient evaluation of XML
</I>&gt;<i> resources (who would contradict me?). But there is another important
</I>&gt;<i> technology, of course, XML Schema: though its use is often reduced to
</I>&gt;<i> document validation or <a title="data binding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">data binding</a>, schemas offer a great wealth of static
</I>&gt;<i> information about (valid) documents. I am sometimes amazed how merrily this
</I>&gt;<i> information is ignored, especially in projects that have to deal with very
</I>&gt;<i> complex schemas.
</I>&gt;<i>
</I>&gt;<i> Unfortunately, schemas are difficult to read and, worse, difficult to use
</I>&gt;<i> as input for further processing, as the schema language allows to express
</I>&gt;<i> the (essentially) same information in so many ways, what with model groups,
</I>&gt;<i> attribute sets, type derivations, etc. Example: some configuration contains
</I>&gt;<i> a data path, and one has the appropriate schema files available - how can
</I>&gt;<i> one implement an automatic check of the path string against that schema?
</I>&gt;<i>
</I>&gt;<i> In consequence, I believe creating &quot;schema reporting&quot; tools may be an
</I>&gt;<i> important <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use case</a> for XQuery.Here, schema reporting is understood as
</I>&gt;<i> transforming schema files into a different serialized representation of all
</I>&gt;<i> or some information the schema contains. (I am _not_ thinking of graphical
</I>&gt;<i> representations as offered by <a title="Stylus Studio XML IDE" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_product_index.html">XML IDEs</a> unless they are accompanied by
</I>&gt;<i> serialized versions appropriate to serve as input for further processing.)
</I>&gt;<i> Some examples were: a tree representation of document structure, a list of
</I>&gt;<i> valid data paths, a mapping of element and attribute names to the governing
</I>&gt;<i> type, a mapping of type names to data paths.
</I>&gt;<i>
</I>&gt;<i> Well - would anyone like to comment on the statement about such schema
</I>&gt;<i> reporting being an important use case for XQuery?
</I>&gt;<i>
</I>&gt;<i> In this context it is of course important to know what is already available
</I>&gt;<i> (commercial or open source). Would anyone like to speak about available
</I>&gt;<i> schema reporting tools (in the sense defined above)?
</I>&gt;<i>
</I>&gt;<i> Thank you very much,
</I>&gt;<i> with kind regards -
</I>&gt;<i>
</I>&gt;<i> Hans-Juergen Rennau
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>


-- 
Ricardo Queir&#243;s
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090909/a74384db/attachment.htm
</PRE>
]]></content></entry><entry><title>  &amp;quot;Pruning&amp;quot;  an xml &amp;quot;tree&amp;quot; based on nodes' ids
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003521.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003521.html" /><updated>2009-09-09T09:44:18Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>All,

I am trying to prune an <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> tree based on known ids for the nodes in that tree.

For example in the following code:

&lt;tree ID=&quot;1&quot;&gt;
                &lt;branch ID=&quot;1&quot;&gt;
                                &lt;branch ID=&quot;4&quot;&gt;
                                                &lt;branch ID=&quot;8&quot;&gt;
                                                                &lt;leaf ID=&quot;15&quot; /&gt;
                                                                &lt;leaf ID=&quot;16&quot; /&gt;
                                                                &lt;leaf ID=&quot;25&quot; /&gt;
                                                &lt;/branch&gt;
                                &lt;/branch&gt;
                                &lt;branch ID=&quot;6&quot;&gt;
                                                &lt;branch ID=&quot;7&quot;&gt;
                                                                &lt;leaf ID=&quot;15&quot; /&gt;
                                                &lt;/branch&gt;
                                &lt;/branch&gt;
                &lt;/branch&gt;
                &lt;branch ID=&quot;2&quot;&gt;
                                &lt;branch ID=&quot;13&quot;&gt;
                                                &lt;branch ID=&quot;14&quot;&gt;
                                                                &lt;branch ID=&quot;16&quot;&gt;
                                                                                &lt;leaf ID=&quot;18&quot; /&gt;
                                                                &lt;/branch&gt;
                                                &lt;/branch&gt;
                                                &lt;branch ID=&quot;65&quot;&gt;
                                                                &lt;branch ID=&quot;15&quot;&gt;
                                                                                &lt;leaf ID=&quot;25&quot;/&gt;
                                                                &lt;/branch&gt;
                                                                &lt;branch ID=&quot;166&quot;&gt;
                                                                                &lt;leaf ID=&quot;25&quot; /&gt;
                                                                &lt;/branch&gt;
                                                &lt;/branch&gt;
                                &lt;/branch&gt;
                &lt;/branch&gt;
&lt;/tree&gt;

If I know that I am ultimately after leaf with the ID of 15.  However, I also need the ancestor nodes that led me to that leaf.  I will know those IDs as well.  For example if I know that I'm in tree id 1 and the branches I took in order are 1,4,8, how can show a pruned xml tree where the final result is:

&lt;tree ID=&quot;1&quot;&gt;
                &lt;branch ID=&quot;1&quot;&gt;
                                &lt;branch ID=&quot;4&quot;&gt;
                                                &lt;branch ID=&quot;8&quot;&gt;
                                                                &lt;leaf ID=&quot;15&quot; /&gt;
                                                &lt;/branch&gt;
                                &lt;/branch&gt;
                &lt;/branch&gt;
&lt;/tree&gt;


I have been able to prune in to this:

&lt;tree ID=&quot;1&quot;&gt;
                &lt;branch ID=&quot;1&quot;&gt;
                                &lt;branch ID=&quot;4&quot;&gt;
                                                &lt;branch ID=&quot;8&quot;&gt;
                                                                &lt;leaf ID=&quot;15&quot; /&gt;


                                                &lt;/branch&gt;
                                &lt;/branch&gt;
                                &lt;branch ID=&quot;6&quot;&gt;
                                                &lt;branch ID=&quot;7&quot;&gt;
                                                                &lt;leaf ID=&quot;15&quot; /&gt;
                                                &lt;/branch&gt;
                                &lt;/branch&gt;
                &lt;/branch&gt;
&lt;/tree&gt;

But the problems comes in the fact that I don't know how many levels of branches there will be before I finally reach the leaf that I'm after.  It seems like I need to work backwards starting at the leaf and prune based on the ids that I have, but I can really see a way to do that.

Any suggestions would be greatly appreciated.

Regards,

Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090909/0688c0bf/attachment-0001.htm
</PRE>
]]></content></entry><entry><title>  parse form data to XML
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003515.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003515.html" /><updated>2009-09-09T09:30:03Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>what about XRX? XForms-REST-<a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>

On Wed, Sep 9, 2009 at 3:06 AM, Martin Probst&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;&gt;<i> &#160; &#160;{for $parsed-query-term in $parsed-data
</I>&gt;&gt;<i> &#160; &#160; &#160; &#160; &#160; &#160; &#160; let $parse-query-value := substring-after($parsed-query-term,&quot;=&quot;)
</I>&gt;&gt;<i> &#160; &#160; &#160; &#160; &#160; &#160; &#160; return &lt;row attr=&quot;{???}&quot;&gt;{xmldb:decode($parse-query-value)}&lt;/row&gt;
</I>&gt;&gt;<i> &#160; &#160; &#160; &#160; &#160; &#160; &#160; }
</I>&gt;<i>
</I>&gt;<i> What about
</I>&gt;<i>
</I>&gt;<i> for $parsed-query-term in $parsed-data
</I>&gt;<i> let $parse-query-value := substring-after($parsed-query-term,&quot;=&quot;)
</I>&gt;<i> let $parameter-name := substring-before($parsed-query-term,
</I>&gt;<i> concat(&quot;=&quot;, $parse-query-value))
</I>&gt;<i> return &lt;row attr=&quot;{$parameter-name}&quot;&gt;{xmldb:decode($parse-query-value)}&lt;/row&gt;
</I>&gt;<i>
</I>&gt;<i> Alternatively you can simply split again:
</I>&gt;<i>
</I>&gt;<i> for $parsed-query-term in $parsed-data
</I>&gt;<i> let $kv := tokenize($parsed-query-term, '=')
</I>&gt;<i> let $key := $kv[1]
</I>&gt;<i> let $value := string-join($kv[position()&gt;1],'=')
</I>&gt;<i> return &lt;row attr=&quot;{$key}&quot;&gt;{xmldb:decode($value)}&lt;/row&gt;
</I>&gt;<i>
</I>&gt;<i> As the value might contain '=' (I think, or does that need to be
</I>&gt;<i> percent encoded?), $kv might contain multiple value parts, so the
</I>&gt;<i> string-join is necessary to glue them together again.
</I>&gt;<i>
</I>&gt;<i> Martin
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>
</PRE>
]]></content></entry><entry><title>  parse form data to XML
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003514.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003514.html" /><updated>2009-09-09T02:06:41Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> &#160; &#160;{for $parsed-query-term in $parsed-data
</I>&gt;<i> &#160; &#160; &#160; &#160; &#160; &#160; &#160; let $parse-query-value := substring-after($parsed-query-term,&quot;=&quot;)
</I>&gt;<i> &#160; &#160; &#160; &#160; &#160; &#160; &#160; return &lt;row attr=&quot;{???}&quot;&gt;{xmldb:decode($parse-query-value)}&lt;/row&gt;
</I>&gt;<i> &#160; &#160; &#160; &#160; &#160; &#160; &#160; }
</I>
What about

for $parsed-query-term in $parsed-data
let $parse-query-value := substring-after($parsed-query-term,&quot;=&quot;)
let $parameter-name := substring-before($parsed-query-term,
concat(&quot;=&quot;, $parse-query-value))
return &lt;row attr=&quot;{$parameter-name}&quot;&gt;{xmldb:decode($parse-query-value)}&lt;/row&gt;

Alternatively you can simply split again:

for $parsed-query-term in $parsed-data
let $kv := tokenize($parsed-query-term, '=')
let $key := $kv[1]
let $value := string-join($kv[position()&gt;1],'=')
return &lt;row attr=&quot;{$key}&quot;&gt;{xmldb:decode($value)}&lt;/row&gt;

As the value might contain '=' (I think, or does that need to be
percent encoded?), $kv might contain multiple value parts, so the
string-join is necessary to glue them together again.

Martin

</PRE>
]]></content></entry><entry><title>  Schema reporting tools -  XQuery use case?
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003516.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003516.html" /><updated>2009-09-09T00:14:37Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello People,

XQuery is _the_ language for agile and efficient evaluation of <a title="XML resources" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/learn_xml.html">XML resources</a> (who would contradict me?). But there is another important technology, of course, <a title="XML Schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XML Schema</a>: though its use is often reduced to document validation or <a title="data binding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">data binding</a>, schemas offer a great wealth of static information about (valid) documents. I am sometimes amazed how merrily this information is ignored, especially in <a title="projects" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_project.html">projects</a> that have to deal with very complex schemas.

Unfortunately, schemas are difficult to read and, worse, difficult to use as input for further processing, as the schema language allows to express the (essentially) same information in so many ways, what with model groups, attribute sets, type derivations, etc. Example: some configuration contains a data path, and one has the appropriate <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema files</a> available - how can one implement an automatic check of the path string against that schema?

In consequence, I believe creating &quot;schema reporting&quot; tools may be an important <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use case</a> for XQuery.Here, schema reporting is understood as transforming schema files into a different serialized representation of all or some information the schema contains. (I am _not_ thinking of graphical representations as offered by <a title="Stylus Studio XML IDE" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_product_index.html">XML IDEs</a> unless they are accompanied by serialized versions appropriate to serve as input for further processing.) Some examples were: a tree representation of document structure, a list of valid data paths, a mapping of element and attribute names to the governing type, a mapping of type names to data paths.

Well - would anyone like to comment on the statement about such schema reporting being an important use case for XQuery?

In this context it is of course important to know what is already available (commercial or open source). Would anyone like to speak about available schema reporting tools (in the sense defined above)?

Thank you very much,
with kind regards -

Hans-Juergen Rennau


      


</PRE>
]]></content></entry><entry><title>  parse form data to XML
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003513.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003513.html" /><updated>2009-09-08T16:42:05Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>


Probably not the most elegant way ...

==========
declare variable $s := 
&quot;v1=v1&amp;amp;a1=a1&amp;amp;v2=v2&amp;amp;a2=a2&amp;amp;v3=v3&amp;amp;a3=a3&quot; ;

let $a := tokenize($s , &quot;&amp;amp;&quot; )
for $i in 0 to xs:integer(count($a) div 2 - 1)
   return &lt;row attr='{ tokenize( $a[$i * 2 + 1 ] , &quot;=&quot; )[2] }'&gt;{ 
tokenize( $a[($i * 2) + 2 ] , &quot;=&quot; )[2] }&lt;/row&gt;

==========



David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224



Jesse Wu wrote:
&gt;<i> Sorry for the newbie question, I am still in the process of <a title="learning XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery_primer.html">learning XQuery</a>.
</I>&gt;<i> What will be the the best way to get HTML form post data into a <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a>.
</I>&gt;<i> For example:
</I>&gt;<i>
</I>&gt;<i> get-data returns
</I>&gt;<i>
</I>&gt;<i> v1=v1&amp;a1=a1&amp;v2=v2&amp;a2=a2&amp;v3=v3&amp;a3=a3&amp; .... v10=v10&amp;a10=a10
</I>&gt;<i>
</I>&gt;<i> need to get it into XML as
</I>&gt;<i>
</I>&gt;<i> &lt;row attr=&quot;a1&quot; &gt;v1&lt;row&gt;
</I>&gt;<i> &lt;row attr=&quot;a2&quot; &gt;v2&lt;row&gt;
</I>&gt;<i> &lt;row attr=&quot;a3&quot; &gt;v3&lt;row&gt;
</I>&gt;<i> ....
</I>&gt;<i>
</I>&gt;<i> &lt;row attr=&quot;a10&quot; &gt;v10&lt;row&gt;
</I>&gt;<i>
</I>&gt;<i> tried to use tokenize then string-before and after =, but could not
</I>&gt;<i> figure out how to get the loop to do 2 elements for each row.
</I>&gt;<i>
</I>&gt;<i>     {for $parsed-query-term in $parsed-data
</I>&gt;<i>                let $parse-query-value := substring-after($parsed-query-term,&quot;=&quot;)
</I>&gt;<i>                return &lt;row attr=&quot;{???}&quot;&gt;{xmldb:decode($parse-query-value)}&lt;/row&gt;
</I>&gt;<i>                }
</I>&gt;<i>
</I>&gt;<i> Thank you or your help. -Jes
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>   
</I></PRE>
]]></content></entry><entry><title>  parse form data to XML
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003512.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003512.html" /><updated>2009-09-08T16:22:08Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Sorry for the newbie question, I am still in the process of <a title="learning XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery_primer.html">learning XQuery</a>.
What will be the the best way to get HTML form post data into a <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a>.
For example:

get-data returns

v1=v1&amp;a1=a1&amp;v2=v2&amp;a2=a2&amp;v3=v3&amp;a3=a3&amp; .... v10=v10&amp;a10=a10

need to get it into XML as

&lt;row attr=&quot;a1&quot; &gt;v1&lt;row&gt;
&lt;row attr=&quot;a2&quot; &gt;v2&lt;row&gt;
&lt;row attr=&quot;a3&quot; &gt;v3&lt;row&gt;
....

&lt;row attr=&quot;a10&quot; &gt;v10&lt;row&gt;

tried to use tokenize then string-before and after =, but could not
figure out how to get the loop to do 2 elements for each row.

    {for $parsed-query-term in $parsed-data
               let $parse-query-value := substring-after($parsed-query-term,&quot;=&quot;)
               return &lt;row attr=&quot;{???}&quot;&gt;{xmldb:decode($parse-query-value)}&lt;/row&gt;
               }

Thank you or your help. -Jes
</PRE>
]]></content></entry><entry><title>  (no subject)
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003511.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003511.html" /><updated>2009-09-07T13:50:07Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>what about remote <a title="job" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jobs.html">job</a>?

On Mon, Sep 7, 2009 at 12:42 PM, Marcus Clemens&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Hi
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Marklogic are looking to hire a couple of permanent consultants . you will
</I>&gt;<i> be based in the UK and there will be some travel to Europe and the USA
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Please send a cv if this is of any interest
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Kind regards
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Marcus Clemens
</I>&gt;<i>
</I>&gt;<i> Director &amp; Senior Consultant
</I>&gt;<i>
</I>&gt;<i> Mercator IT Ltd
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Tel: 01892 611161
</I>&gt;<i>
</I>&gt;<i> Fax: 01892 660185
</I>&gt;<i>
</I>&gt;<i> Email: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>&gt;<i> Cooks Corner Business Park, The Old Saw Mill, London Road, Crowborough TN6
</I>&gt;<i> 1TQ
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Registered in England no: 05755983
</I>&gt;<i>
</I>&gt;<i> Registered office: 117 Dartford Road, Dartford, Kent DA1 3EN
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> This email may contain privileged/confidential information and is for the
</I>&gt;<i> intended addressee only.&#160; If you have received this message in error then
</I>&gt;<i> you must not use, retain, disseminate or otherwise deal with it.&#160; Please
</I>&gt;<i> notify the sender by return email and destroy.&#160; The views of the author may
</I>&gt;<i> not necessarily constitute the views of Mercator IT Solutions Ltd.&#160; Nothing
</I>&gt;<i> in this email shall bind Mercator IT Solutions Ltd in any contract or
</I>&gt;<i> obligation.
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>
</PRE>
]]></content></entry><entry><title>  (no subject)
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003510.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003510.html" /><updated>2009-09-07T10:42:03Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi 

 

Marklogic are looking to hire a couple of permanent consultants . you
will be based in the UK and there will be some travel to Europe and the
USA 

 

Please send a cv if this is of any interest 

 

Kind regards 

 

Marcus Clemens

Director &amp; Senior Consultant

Mercator IT Ltd

 

Tel: 01892 611161

Fax: 01892 660185

Email: http://x-query.com/mailman/listinfo/talk &lt;mailto:http://x-query.com/mailman/listinfo/talk&gt; 

Cooks Corner Business Park, The Old Saw Mill, London Road, Crowborough
TN6 1TQ

 

Registered in England no: 05755983

Registered office: 117 Dartford Road, Dartford, Kent DA1 3EN

 

This email may contain privileged/confidential information and is for
the intended addressee only.  If you have received this message in error
then you must not use, retain, disseminate or otherwise deal with it.
Please notify the sender by return email and destroy.  The views of the
author may not necessarily constitute the views of Mercator IT Solutions
Ltd.  Nothing in this email shall bind Mercator IT Solutions Ltd in any
contract or obligation.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090907/0a4361eb/attachment.htm
</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003509.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003509.html" /><updated>2009-09-06T10:19:27Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello, Hans-Juergen

I do believe you are understanding my perspective.  It give me hope that 
perhaps it is not a singular one and I'm not utterly and entirely insane.

You've made some interesting comments !

&gt;<i> 2. (but also) XML Schemas (!) 
</I>&gt;<i> =&gt; <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xsd</a> info commands
</I>&gt;<i>   
</I>I had never thought of this !
&gt;<i> There were no &quot;schemas&quot; to describe byte streams, but we have them to describe item streams, and I think here is a great demand of <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> <a title="tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a> unlocking their wealth of information. For example:
</I>&gt;<i>
</I>&gt;<i> get-simple-type myElementName | simple-type-pattern
</I>&gt;<i> =&gt; yielding the pattern constraining an element (e.g.  &quot;\D\D\D\d+&quot;), or
</I>&gt;<i>
</I>&gt;<i> get-paths myFile | invalid-paths myTargetNamespacePrefix
</I>&gt;<i> =&gt; yielding any paths not compatible with a certain schema.
</I>&gt;<i>   
</I>Wow those are great ideas.  I need to think about what they mean and how 
one would make use of them.
The last one could be implemented by iteration over  &quot;xvalidate&quot;  .. 
.but building this into something like a &quot;find&quot; command or even making 
type validity and information at a very low level as apposed to just a 
command level is interesting.   Also considering that a document (or an 
element) can have multiple types simultaneously brings on a level of 
complexity.   What do we do with these commands ?

&gt;<i> I used to regard XProc as *the* enabler, *the* integrator. Now I get a feeling that one might look at XProc and xmlsh as sister technologies resembling <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a> and <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>: both built on the same basis, the XDM and <a title="XPath Software" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">the XPath</a> language; the former a little more powerful and <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_feature_overview.html">feature</a>-rich, with the cost of rather heavy syntax, the latter very slender and flexible.
</I>&gt;<i>
</I>&gt;<i> With kind regards,
</I>&gt;<i> Hans-Juergen
</I>&gt;<i>   
</I>I disagree that xproc is more &quot;feature-rich&quot; then xmlsh but we can leave 
that debate for another day.
The important thing, IMHO, is that having these multiple languages and 
tools demonstrate the importance of integration technologies, and that 
there is more then one way to do it.  Once we know there are 2 ways to 
do something we can discover there are 10 or 1000 ... and as you 
indicated this opens up a really interesting area that is really at a 
different level of thought then any one particular technology, but 
rather  how a system based on XML concepts can behave, not limited to 
one technology.  I think this is an exciting phase in XML technologies.

-David

-- 
David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224




</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003508.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003508.html" /><updated>2009-09-05T23:09:25Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello David,

gradually I start to get a feeling for your perspective. Pulling &quot;an efficient mechanism for interconnecting them&quot; into focus you move across the boundaries of the <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> spec's field of vision. Your criticism that design is not only function and module design gains power. Vaguely but vividly this reminds me of the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/ws_tester.html">SOAP</a> versus REST controversy: with SOAP clinging to an artificial complication (&quot;I am calling something...&quot;) and REST arriving at the more fundamental abstractions of resource and address,  enabling a new ease of access and of combining existing resources. Modules are a category emerging only *after* I have called a query, reusable inside queries, whereas the outside is, to put it mildly, bigger and more important.

The great primitives of Unix - the fundamental <a title="tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a> - target the basic entities of an OS environment: (byte) streams, files, directories, users, ... I wonder what new targets emerge with the transition to xmlsh? This is a very important question, relevant as much to xmlsh as to tool development in general - which tools should occupy the top of the community's agenda? ! It occurs to me that there are (at least) two targets of prime importance:

1. (of course) item streams (or 'sequences', 'infosets', 'XDM instances) 
=&gt; XDM info commands (or 'services', 'tools', ...)

2. (but also) XML Schemas (!) 
=&gt; <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xsd</a> info commands

There were no &quot;schemas&quot; to describe byte streams, but we have them to describe item streams, and I think here is a great demand of <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> tools unlocking their wealth of information. For example:

get-simple-type myElementName | simple-type-pattern
=&gt; yielding the pattern constraining an element (e.g.  &quot;\D\D\D\d+&quot;), or

get-paths myFile | invalid-paths myTargetNamespacePrefix
=&gt; yielding any paths not compatible with a certain schema.

Reading
'XQuery is useful and 'important' at the single expression level, all the way up to a full &quot;program&quot;'

and remembering that XQuery is a fully composable language one feels that it is very important to think about the INTEGRATION of XQuery into software and processes in all its aspects. (Especially because XQuery is an Information Processing Language, but not a general purpose programming language!) One could even argue that the still small acceptance of XQuery is related to still insufficient integration.

I used to regard XProc as *the* enabler, *the* integrator. Now I get a feeling that one might look at XProc and xmlsh as sister technologies resembling <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a> and XQuery: both built on the same basis, the XDM and <a title="XPath Software" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">the XPath</a> language; the former a little more powerful and feature-rich, with the cost of rather heavy syntax, the latter very slender and flexible.

With kind regards,
Hans-Juergen




----- Urspr&#252;ngliche Mail ----
Von: David A. Lee &lt;http://x-query.com/mailman/listinfo/talk&gt;
An: Hans-Juergen Rennau &lt;http://x-query.com/mailman/listinfo/talk&gt;
CC: http://x-query.com/mailman/listinfo/talk
Gesendet: Samstag, den 5. September 2009, 04:57:12 Uhr
Betreff: Re:  Tool development: by Perl-wrapped XQuery

Hello Hans-Juergen

I do agree with a lot of your comments ...
However to add to this one There's another side to this.
&gt;<i> When it comes to the other dimension of scaling - the number of processing steps (rather than the number of units processed in a given step) - it is not at all per se better to have many small programs. As a rule of thumb I suggest &quot;divide the processing if and only if reuseable steps result&quot;. So, for example, generic preprocessings (as the one 
</I>The third aspect you don't mention is ease of development.   I personally find its *vastly easier* to author, debug, and later maintain an xml translation that is decomposed into say 5  steps in individual files with concrete results in each &quot;step&quot;.   I can run each xquery /xslt individually and output the results (either command line or in a GUI) and debug each one separately.   Then put them together and debug the results.   Even if *none* of the steps are ever &quot;reusable&quot; either in the past or the future to me this is a very powerful advantage of &quot;divide and conquer&quot;.    If the end result can be run as efficiently as if they were all in one big program I see that as a huge win.


And as such I disagree with this comment

&quot;Speaking of XQuery - the design of modules and functions is important, not the creation of little programs. &quot;

I suggest that is inventing/imposing an unnecessary distinction between &quot;program&quot; and &quot;modules&quot; and presupposing what is &quot;important&quot;.
It may not have been 'important' in the authors of xquery's mind, but thats the strength of reusable software - to grow beyond the original intent.
XQuery is useful and 'important' at the single expression level, all the way up to a full &quot;program&quot; whatever that is.
Just because xquery supports a module implementation does not mean thats the only valuable way of composing larger programs that use xquery as s component.

This is what Unix shell programming taught us 40 years ago, and what programs like XProc are teaching us today..
Its also what frameworks like .NET that support things like inheritance across languages teaches us.

That the distinction between &quot;program&quot; and &quot;module&quot; is fuzzy.   And that by making 'little programs' that do one thing only, but do it well,
and providing an efficient mechanism for interconnecting them, you can produce exponentially complex *behavior* without exponentially complex *code*.
The distinction between 'program' and 'module' is subjective and has overlapping meanings in different contexts.
Is &quot;ls&quot; a program or a module ?   How about &quot;more&quot; ? then what about  'lsmore' implemented as &quot;ls | more&quot; ?   It is this artificial distinction between &quot;module&quot; and &quot;program&quot; itself that leads to what I called &quot;monolithic&quot; programs.

There's a long ways we could go with this.  Imagine a language that could 'inherit' a single template from xslt in the context of another language ?
( such as .NET allows across disparate languages) .
And of course taking it too far you can produce exponentially inefficient and complex code that does nothing but blow up the cpu  :)

Were beginning to see a more of this (xquery in small pieces), such as using tiny bits of XQuery inside other programs like &quot;XQuery in the browser&quot;.   Little bits of XQuery in XML data bases.  XQuery being used as part of the business logic in a CRM system (yes this exists) coexisting with other languages.
Are these &quot;programs&quot; or &quot;modules&quot; or even less just single expressions ?  It doesn't matter.  

What matters is can you easily and efficiently hook them up and use them in ways the original authors may have never dreamed.
But in my opinion they are definitely 'important'

David A. Lee
http://x-query.com/mailman/listinfo/talk  http://www.calldei.com
http://www.xmlsh.org
812-482-5224


      


</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003507.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003507.html" /><updated>2009-09-05T08:57:12Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello Hans-Juergen

I do agree with a lot of your comments ...
However to add to this one There's another side to this.
&gt;<i> When it comes to the other dimension of scaling - the number of processing steps (rather than the number of units processed in a given step) - it is not at all per se better to have many small programs. As a rule of thumb I suggest &quot;divide the processing if and only if reuseable steps result&quot;. So, for example, generic preprocessings (as the one 
</I>The third aspect you don't mention is ease of development.   I 
personally find its *vastly easier* to author, debug, and later maintain 
an <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> translation that is decomposed into say 5  steps in individual 
files with concrete results in each &quot;step&quot;.   I can run each <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> 
/<a title="xslt" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">xslt</a> individually and output the results (either command line or in a 
<a title="GUI" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_screenshots.html">GUI</a>) and debug each one separately.   Then put them together and debug 
the results.   Even if *none* of the steps are ever &quot;reusable&quot; either in 
the past or the future to me this is a very powerful advantage of 
&quot;divide and conquer&quot;.    If the end result can be run as efficiently as 
if they were all in one big program I see that as a huge win.


And as such I disagree with this comment

&quot;Speaking of XQuery - the design of modules and functions is important, 
not the creation of little programs. &quot;

I suggest that is inventing/imposing an unnecessary distinction between 
&quot;program&quot; and &quot;modules&quot; and presupposing what is &quot;important&quot;.
It may not have been 'important' in the authors of xquery's mind, but 
thats the strength of reusable software - to grow beyond the original 
intent.
XQuery is useful and 'important' at the single expression level, all the 
way up to a full &quot;program&quot; whatever that is.
Just because xquery supports a module implementation does not mean thats 
the only valuable way of composing larger programs that use xquery as s 
component.

This is what Unix shell programming taught us 40 years ago, and what 
programs like XProc are teaching us today.
Its also what frameworks like .NET that support things like inheritance 
across languages teaches us.

That the distinction between &quot;program&quot; and &quot;module&quot; is fuzzy.   And that 
by making 'little programs' that do one thing only, but do it well,
and providing an efficient mechanism for interconnecting them, you can 
produce exponentially complex *behavior* without exponentially complex 
*code*.
The distinction between 'program' and 'module' is subjective and has 
overlapping meanings in different contexts.
Is &quot;ls&quot; a program or a module ?   How about &quot;more&quot; ? then what about  
'lsmore' implemented as &quot;ls | more&quot; ?   
It is this artificial distinction between &quot;module&quot; and &quot;program&quot; itself 
that leads to what I called &quot;monolithic&quot; programs.

There's a long ways we could go with this.  Imagine a language that 
could 'inherit' a single template from xslt in the context of another 
language ?
( such as .NET allows across disparate languages) .
And of course taking it too far you can produce exponentially 
inefficient and complex code that does nothing but blow up the cpu  :)

Were beginning to see a more of this (xquery in small pieces), such as 
using tiny bits of XQuery inside other programs like &quot;XQuery in the 
browser&quot;.   Little bits of XQuery in XML data bases.  XQuery being used 
as part of the business logic in a CRM system (yes this exists) 
coexisting with other languages.
 Are these &quot;programs&quot; or &quot;modules&quot; or even less just single expressions ?  
 It doesn't matter.  


What matters is can you easily and efficiently hook them up and use them 
in ways the original authors may have never dreamed.
But in my opinion they are definitely 'important'

David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224




</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003506.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003506.html" /><updated>2009-09-04T22:24:34Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello David,

yes, I agree that it is desirable to be free in one's choice how to shape the units of <a title="functionality" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/buy/compare.html">functionality</a>, large or small. Still, I would like to make a couple of points.

You wrote:
&quot;... so they have instead built 'monolithic' programs that do all the work within 1 program (<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>, <a title="xslt" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">xslt</a> etc) and take a list of filenames input and maybe filenames output to process. ... I suggest that programming model is no longer necessary, and was arrived at due to the poor performance of doing it any other way,&quot;

Sometimes, perhaps even often, this may be the case. But one should not forget that XQuery's aggregative potential teaches us to think in terms of sequences rather than in terms of items. This sweeping approach has nothing to to with &quot;monolithic&quot;, just as nobody would call <a title="XPath expressions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath_evaluator.html">XPath expressions</a> monolithic.

When it comes to the other dimension of scaling - the number of processing steps (rather than the number of units processed in a given step) - it is not at all per se better to have many small programs. As a rule of thumb I suggest &quot;divide the processing if and only if reuseable steps result&quot;. So, for example, generic preprocessings (as the one <a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> recently recommended in the case of Excel data) are fine examples where dividing is desirable. But if the dividing produces pieces where the second depends on the first but the first serves no other purpose than prepare the second - then the dividing is bad and an unnecessary increase of complexity. Speaking of XQuery - the design of modules and functions is important, not the creation of little programs. XQuery is a powerful language suited for writing highly complex programs. Doing this does not mean following a &quot;monolithic&quot; programming model.

This being said, two final remarks. First, xmlsh seems so important to me because it aims to overcome a sheer anachronism of conventional Unix shells - their inability to deliver structured information. Second, I regard XProc as the sorely needed integration technology which may greatly enhance the value of the various languages (XQuery, ...); even more, it may pave the way to a new paradigm of data processing, in which concepts like &quot;step&quot; and &quot;ports&quot; become so natural to us as &quot;documents&quot; and &quot;objects&quot;.

With kind regards,
Hans-Juergen




----- Urspr&#252;ngliche Mail ----
Von: David A. Lee &lt;http://x-query.com/mailman/listinfo/talk&gt;
An: Hans-Juergen Rennau &lt;http://x-query.com/mailman/listinfo/talk&gt;
CC: http://x-query.com/mailman/listinfo/talk; http://x-query.com/mailman/listinfo/talk
Gesendet: Freitag, den 4. September 2009, 10:10:37 Uhr
Betreff: Re:  <a title="Tool" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">Tool</a> development: by Perl-wrapped XQuery

I agree that if you stick to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use case</a> #1 (only call xquery once or few 
times) and all your input and output are files (or file names) then 
pretty much any scripting language that lets you launch a subprocess is 
equivalent and you will have very little performance hit.  
Historically, I suggest many people use that use case primarily because 
its horrendously expensive not to (in most languages) so they have 
instead built 'monolithic' programs that do all the work within 1 
program (xquery, xslt etc) and take a list of filenames input and maybe 
filenames output to process.
This does work.

My point is that I suggest that programming model is no longer 
necessary, and was arrived at due to the poor performance of doing it 
any other way,
not because its a desirable way of coding.
If you use a language that can call xquery *efficiently* you can design 
in a more modular way and use 'itty bitty' xquery programs run thousands 
of times instead of one huge program run once,  just as efficiently, and 
in my opinion much easier to develop, debug, and understand.  It frees 
you to design and develop in modular ways, using languages of your 
choice for different operations instead of forcing you into a single 
monolithic application.
Of course it is a personal *opinion* that that is a 'better' way of 
doing things :)  I certainly enjoy it more.
Others may prefer writing one huge program that does everything.  
This exact same philosophical (and technical) debate is what 
distinguished unix from the mainframe model of programming.  I find it 
fascinating that the same fundamental design issues and discussions 
evolved again 40 years later.



David A. Lee
&gt;<i>  
</I>


      


</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003501.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003501.html" /><updated>2009-09-04T15:24:47Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>David A. Lee schrieb:

&gt;&gt;&gt;<i> * Encourage scripting languages developers to embed these <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a>
</I>&gt;&gt;&gt;<i> languages directly into the scripting languages (say perl).
</I>&gt;&gt;<i> More precisely, write <a title="bindings" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a> to implementations in C/C++.
</I>&gt;&gt;<i>
</I>&gt;<i> Only if the scripting language itself is written in C/C++ or has easy
</I>&gt;<i> bindings to it.  If its in another language then bindings in that
</I>&gt;<i> language are useful.
</I>
True. I only thought of Perl/PHP/Python/Ruby - all in C. But Jython and
JRuby were mentioned, and I could mention Quercus - all in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a>.

&gt;<i> But equally important, IMHO,  is to be able to &quot;glue&quot; the data from
</I>&gt;<i> one module to another efficiently.  That needs common in-memory
</I>&gt;<i> formats.
</I>
That's the downside of issuing <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">specifications</a> and waiting for the
implementations to happen. Thank God XML does have a standard
serialization, so any document can migrate from one implementation
to another :-)

&gt;<i> That may mean, for example, that the language runtime define a
</I>&gt;<i> standard XML in-memory representation and every module can use it
</I>&gt;<i> natively. So that you can have say variables of XML Documents and not
</I>&gt;<i> have to transform them to each module's internal representation
</I>&gt;<i> (rebuild the document).
</I>&gt;<i>
</I>&gt;<i> To do this well I suggest is more then just writing bindings.  Its a
</I>&gt;<i> language level problem as well as a binding problem.
</I>
Isn't .NET a solution to that problem?

-- 
Michael Ludwig
</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003500.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003500.html" /><updated>2009-09-04T15:12:03Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> If you can find one vendor/ implementation that has all the pices its a tad
</I>&gt;<i> easier (document types match !) but its still a bit of hell.
</I>
That is where I'd say at least in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a> land, you can get everything to
accept <a title="SAX" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/sax.html">SAX</a> or <a title="org.w3c.dom" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">DOM</a>. It might not be the absolute best choice (e.g.
<a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> and its TinyTree), but it will work.

I actually can't come up with a tool I needed to use in Java that
didn't support DOM. Can you?

&gt;<i> I think you'll find it about as painful to to use jruby or jython to say
</I>&gt;<i> call &#160;xinclude , then rng validate then xquery then pass its results to <a title="xslt" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">xslt</a>
</I>&gt;<i> as writing it in pure java.
</I>
Indeed, the problem is that these APIs are extremely verbose and have
an erratic programming model. Parsing a document in Java is a 20 line+
endeavor, and if you want to get it right you'll have to set magic
parser features using undocumented strings no one knows where to find.

But this is the kind of thing you can do right if you don't need the
flexibility to supply your own DocumentBuilderFactory (or whatever),
just by mandating a default.

&gt;<i> In xmlsh its as simple as &#160; xinclude file | rngvalidate schema | xquery -f
</I>&gt;<i> schema | xslt -f <a title="Stylesheet Designer" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/publisher1/publisher1.html">stylesheet</a>
</I>&gt;<i>
</I>&gt;<i> To get these kind of languages (jruby etc) into shape where XML is actually
</I>&gt;<i> *easy to use* is going to require work. &#160;Possibly at the language level to
</I>&gt;<i> make it really easy.
</I>
Yes, but only a reasonable amount of work. The above code would
actually be valid JRuby syntax, so you wouldn't need any language
extensions, just some library routines.

&gt;<i> I talked to a Ruby programmer at work after a demonstration on XQuery and
</I>&gt;<i> his answer was &quot;I can do that in ruby ... why would I want to <a title="XQuery Primer" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery_primer.html">learn xquery</a> ?
</I>&gt;<i> &#160;And ruby can do a LOT more then just xml processing &quot; ... After seeing some
</I>&gt;<i> of his code I had to admit he had a point. &#160;I still have been unable to
</I>&gt;<i> successfully convince him the value of xquery over Ruby's XML API's.
</I>
Ruby has this nice feature of being very amenable to domain specific
languages, and some of the XML APIs use this nicely. However the
built-in XML support in Ruby is plain horrible, REXML is a huge can of
bugs.

And of course with imperative code in Ruby you loose all the
declarative/optimizable/... niceness of XQuery and XSLT.

Martin

</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003498.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003498.html" /><updated>2009-09-04T14:59:53Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Jakob Fix schrieb:
&gt;<i> Talking of <a title="tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a>, what is the experience of people on this list with
</I>&gt;<i> xmlstarlet (http://xmlstar.sourceforge.net/) which seems to me like a
</I>&gt;<i> close contender to xmlsh (but haven't looked closely)?
</I>
It is <a title="Using XSLT to transform XML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xsltedit1/xsltedit1.html">built on LibXML2 and LibXSLT</a> by Daniel Veillard. It is like a bag
of tricks. It allows you to code shortcuts for XSLT on the command line.
But you're limited to a subset of XSLT and the quirks of the command
line (notably, quotes).

I still use &quot;xmlstarlet list&quot; when I need a directory listing in XML
because it's convenient and I happen to know about it.

-- 
Michael Ludwig
</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003496.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003496.html" /><updated>2009-09-04T14:50:13Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>David A. Lee schrieb:
&gt;&gt;<i> Now my questions:
</I>&gt;&gt;<i> - would you recommend alternatives for rapid tool development?
</I>&gt;&gt;<i> - if taking a similar approach - would you like to recommend special
</I>&gt;&gt;<i> details, perhaps the script language actually used, or other aspect?
</I>&gt;&gt;<i>
</I>&gt;<i> In my opinion the problem with doing this in perl is that unless the
</I>&gt;<i> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> implementation itself is in perl or atleast runs within the
</I>&gt;<i> same process you will run into horrible performance problems.
</I>
Of course. <a title="JVM" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">JVM</a> invocation overhead, IPC overhead. No persistent process
supported by indexes to speed up queries, all possible optimizations
forfeited. But Hans-J&#252;rgen's approach is convenient and sufficient where
performance is not paramount.

In Perl, reasonable XQuery integration can currently be achieved by
<a title="How to Access Oracle Relational Database as XML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/oracle.html">using Oracle</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dbxml.html">Berkeley DB XML</a>. Of course, while the interface is in Perl,
the implementation is in C++.

If there were Perl <a title="bindings" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a> for XQilla XQuery in Perl would be possible
within the process but without the Berkeley database.

But the main speed factor for XQuery is simply the indexes available in
the database. How could it be otherwise? So you need a server process
built on indexes. That's usually C/C++ or Java, like most servers;
scripting <a title="APIs" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/api/">APIs</a> are a nice extra.

An alternative is to have some persistent XQuery process running and
having Perl/PHP/Python processes interface to it via HTTP/REST/WHATEVER.

&gt;<i> * Use a scripting language that already is 'in process' with all the
</I>&gt;<i> XML core languages you want to use (xquery, <a title="xslt" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">xslt</a> etc)
</I>&gt;<i>  -&gt; examples XProc, xmlsh
</I>&gt;<i>
</I>&gt;<i> * Encourage scripting languages developers to embed these XML
</I>&gt;<i> languages directly into the scripting languages (say perl).
</I>
More precisely, write bindings to implementations in C/C++.

-- 
Michael Ludwig
</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003494.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003494.html" /><updated>2009-09-04T14:36:10Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Talking of <a title="tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a>, what is the experience of people on this list with
xmlstarlet (http://xmlstar.sourceforge.net/) which seems to me like a
close contender to xmlsh (but haven't looked closely)?

cheers,
Jakob.



On Fri, Sep 4, 2009 at 13:09, David A. Lee&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Now my questions: - would you recommend alternatives for rapid tool
</I>&gt;&gt;<i> development? - if taking a similar approach - would you like to recommend
</I>&gt;&gt;<i> special details, perhaps the script language actually used, or other aspect?
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i> In my opinion the problem with doing this in perl is that unless the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>
</I>&gt;<i> implementation itself is in perl or atleast runs within the same process you
</I>&gt;<i> will run into horrible performance problems. &#160; See my (with Norm Walsh's)
</I>&gt;<i> paper :
</I>&gt;<i>
</I>&gt;<i> http://www.balisage.net/Proceedings/vol4/author-pkg/Lee01/BalisageVol4-Lee01.html
</I>&gt;<i>
</I>&gt;<i> What we found is that for our test cases there is a 100-200x (yes 10000 % -
</I>&gt;<i> 20000 % ) performance penalty of using a scripting language to call xml
</I>&gt;<i> processing programs. &#160; This *can* be optimized but the exact <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use cases</a> of
</I>&gt;<i> using a off-the-shelf scripting language to do this kind of thing is
</I>&gt;<i> typically by the audience of people who do not want to spend the extra
</I>&gt;<i> effort to optimize it, or who are not experts in the type of software
</I>&gt;<i> development/languages required to &#160;do it, or both. i.e its exactly why they
</I>&gt;<i> are using scripting - so they don't have to do all that extra work.
</I>&gt;<i>
</I>&gt;<i> This is the primary reason xmlsh was invented instead of re-using an
</I>&gt;<i> existing scripting language. &#160; I took a &quot;toy&quot; program in a scripting
</I>&gt;<i> language it worked great.
</I>&gt;<i> But when I loaded up all the files I needed it to run it died a horrible
</I>&gt;<i> death. &#160; This is what I call &quot;The Brick Wall&quot; and why scripting XML
</I>&gt;<i> processes fail so many of us. &#160; The presentation cited above has some good
</I>&gt;<i> charts and figures as well as the full test case code.
</I>&gt;<i>
</I>&gt;<i> This is why I suggest either (both)
</I>&gt;<i>
</I>&gt;<i> * Use a scripting language that already is 'in process' with all the XML
</I>&gt;<i> core languages you want to use (xquery, <a title="xslt" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">xslt</a> etc)
</I>&gt;<i> -&gt; examples XProc, xmlsh
</I>&gt;<i>
</I>&gt;<i> * Encourage scripting languages developers to embed these XML languages
</I>&gt;<i> directly into the scripting languages (say perl).
</I>&gt;<i> -&gt; This is hard work and may in fact involve re-implementing many of the
</I>&gt;<i> core tools from scratch.
</I>&gt;<i> -&gt; Some of the work is done but is incomplete ... I've seen references to
</I>&gt;<i> XSLT implementions native in perl where the author quoted &#160;something like
</I>&gt;<i> &#160;&quot;This isnt a complete <a title="How To Build XSLT Applications" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xsltedit1/xsltedit1.html">implementation of XSLT 1.0</a> but it works pretty good
</I>&gt;<i> for me&quot;.
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> David A. Lee
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk &#160;http://www.calldei.com
</I>&gt;<i> http://www.xmlsh.org
</I>&gt;<i> 812-482-5224
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>
</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003493.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003493.html" /><updated>2009-09-04T14:29:03Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> This is why I suggest either (both)
</I>&gt;<i>
</I>&gt;<i> * Use a scripting language that already is 'in process' with all the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a>
</I>&gt;<i> core languages you want to use (<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>, <a title="xslt" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">xslt</a> etc)
</I>&gt;<i> -&gt; examples XProc, xmlsh
</I>&gt;<i>
</I>&gt;<i> * Encourage scripting languages developers to embed these XML languages
</I>&gt;<i> directly into the scripting languages (say perl).
</I>
While XProc is probably the cleanest solution, another approach in
particular for ad-hoc scripting might be to use an existing scripting
language that can run on top of the <a title="JVM" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">JVM</a> (1), e.g. jython or jruby.
This gives you the flexibility of handy scripting but doesn't incur
the overhead of re-parsing huge documents. And of course on the JVM
you'll find implementations for everything-XML, from XSLT via XQuery
and XML databases to various validation <a title="tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a> etc., all nicely
co-existing based on the <a title="org.w3c.dom" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">DOM</a> and <a title="SAX" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/sax.html">SAX</a> (2).

Regards
Martin

(1) this might also be possible on other platforms, e.g. the CLR, but
I have no clue about those
(2) while I'm the first to bash the DOM for its horrible programming
interface, it's role as a common ground for all XML tools is
wonderful.
</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003505.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003505.html" /><updated>2009-09-04T14:10:37Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>I agree that if you stick to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use case</a> #1 (only call xquery once or few 
times) and all your input and output are files (or file names) then 
pretty much any scripting language that lets you launch a subprocess is 
equivalent and you will have very little performance hit.  
Historically, I suggest many people use that use case primarily because 
its horrendously expensive not to (in most languages) so they have 
instead built 'monolithic' programs that do all the work within 1 
program (xquery, <a title="xslt" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">xslt</a> etc) and take a list of filenames input and maybe 
filenames output to process.
This does work.

My point is that I suggest that programming model is no longer 
necessary, and was arrived at due to the poor performance of doing it 
any other way,
not because its a desirable way of coding.
If you use a language that can call xquery *efficiently* you can design 
in a more modular way and use 'itty bitty' xquery programs run thousands 
of times instead of one huge program run once,  just as efficiently, and 
in my opinion much easier to develop, debug, and understand.  It frees 
you to design and develop in modular ways, using languages of your 
choice for different operations instead of forcing you into a single 
monolithic application.
Of course it is a personal *opinion* that that is a 'better' way of 
doing things :)  I certainly enjoy it more.
Others may prefer writing one huge program that does everything.  
This exact same philosophical (and technical) debate is what 
distinguished unix from the mainframe model of programming.  I find it 
fascinating that the same fundamental design issues and <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discussions</a> 
evolved again 40 years later.



David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224



Hans-Juergen Rennau wrote:
&gt;<i> Hello David,
</I>&gt;<i>
</I>&gt;<i> scripting and tool devlopment using script-wrapping are akin, but not quite the same. It seems to me important to distinguish clearly between two usecases:
</I>&gt;<i>
</I>&gt;<i> 1. the tool's <a title="functionality" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/buy/compare.html">functionality</a> is provided by executing XQuery once (or only a few times)
</I>&gt;<i> 2. the tool's functionality is provided by executing XQuery very often (as in your tests, hundreds of times)
</I>&gt;<i>
</I>&gt;<i> Almost all tools I have developed so far fall into category 1. Obviously there is NO PERFORMANCE PENALTY worth mentioning in this case: I believe the difference between calling the query via its Perl script or alternatively calling it directly from the command line would not be perceptible for a human being.
</I>&gt;<i>
</I>&gt;<i> It is not coincidence that category 1 can VERY often be used - rather, it is exactly the sequence philosophy which makes it a common case!  Example: if you have a query processing a document received as context item, then one can modify the query to process any number of input documents in succession, producing an aggregation of results by just adding 4 (!) lines:
</I>&gt;<i>
</I>&gt;<i> declare variable $fileNames external;
</I>&gt;<i> declare variable $docs := for $f in tokenize(fileNames, &quot;\s*&quot;) return doc($f);
</I>&gt;<i> &lt;collection&gt;{for $d in $docs return
</I>&gt;<i>    - now comes the original query with this modification: prepend $d before any path starting with / or // -
</I>&gt;<i> }&lt;/collection&gt;
</I>&gt;<i>
</I>&gt;<i> All that is left to be done is pass the names of the input documents as a space separated string to the query. Which is a trivial task for the little Perl section preceding the invocation.
</I>&gt;<i>
</I>&gt;<i> If one ignores this dependence on usecase, one arrives at the situation described by <a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> on http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/questions.html, last question: &quot;Is it true that Altova XML is three times as fast as Saxon?&quot;
</I>&gt;<i>
</I>&gt;<i> I never cease to be amazed by exactly this quality of XQuery - its ability to integrate vast sets of input resources with almost no increased effort as compared to the processing of a <a title="Single Source Publishing" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/single_source_publishing.html">single resource</a>.
</I>&gt;<i>
</I>&gt;<i> With kind regards,
</I>&gt;<i> Hans-Juergen Rennau
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> ----- Urspr&#252;ngliche Mail ----
</I>&gt;<i> Von: David A. Lee &lt;http://x-query.com/mailman/listinfo/talk&gt;
</I>&gt;<i> An: Hans-Juergen Rennau &lt;http://x-query.com/mailman/listinfo/talk&gt;
</I>&gt;<i> CC: http://x-query.com/mailman/listinfo/talk; http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Gesendet: Freitag, den 4. September 2009, 04:09:21 Uhr
</I>&gt;<i> Betreff: Re:  Tool development: by Perl-wrapped XQuery
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> In my opinion the problem with doing this in perl is that unless the xquery implementation itself is in perl &gt; or atleast runs within the same process you will run into horrible performance problems.   See my (with Norm Walsh's) paper :
</I>&gt;<i>
</I>&gt;<i> http://www.balisage.net/Proceedings/vol4/author-pkg/Lee01/BalisageVol4-Lee01.html
</I>&gt;<i>
</I>&gt;<i> What we found is that for our test cases there is a 100-200x (yes 10000 % - 20000 % ) performance penalty of using a scripting language to call xml processing programs.   This *can* be optimized but the exact use cases of using a off-the-shelf scripting language to do this kind of thing is typically by the audience of people who do not want to spend the extra effort to optimize it, or who are not experts in the type of software development/languages required to  do it, or both. i.e its exactly why they are using scripting - so they don't have to do all that extra work.
</I>&gt;<i>
</I>&gt;<i> This is the primary reason xmlsh was invented instead of re-using an existing scripting language.   I took a &quot;toy&quot; program in a scripting language it worked great.
</I>&gt;<i> But when I loaded up all the files I needed it to run it died a horrible death.   This is what I call &quot;The Brick Wall&quot; and why scripting XML processes fail so many of us.   The presentation cited above has some good charts and figures as well as the full test case code.
</I>&gt;<i>
</I>&gt;<i> This is why I suggest either (both)
</I>&gt;<i>
</I>&gt;<i> * Use a scripting language that already is 'in process' with all the XML core languages you want to use (xquery, xslt etc)
</I>&gt;<i> -&gt; examples XProc, xmlsh
</I>&gt;<i>
</I>&gt;<i> * Encourage scripting languages developers to embed these XML languages directly into the scripting languages (say perl).
</I>&gt;<i> -&gt; This is hard work and may in fact involve re-implementing many of the core tools from scratch.
</I>&gt;<i> -&gt; Some of the work is done but is incomplete ... I've seen references to XSLT implementions native in perl where the author quoted  something like
</I>&gt;<i>   &quot;This isnt a complete implementation of XSLT 1.0 but it works pretty good for me&quot;.
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> -- David A. Lee
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>       
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>   
</I></PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003491.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003491.html" /><updated>2009-09-04T11:39:10Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hans-Juergen Rennau wrote:
&gt;<i> As <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/daniela_florescu.html">Daniela Florescu</a> emphasized, <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> is an information processing language, rather than a query language, and this makes it a great implementation language for tool development. But two problems discourage the use of &quot;raw queries&quot; - without frontent or wrapping of any sort - as tools:
</I>&gt;<i> 
</I>&gt;<i> a) no default parameters
</I>&gt;<i> b) no <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a>-based access to system commands, namely no file discovery
</I>
I think that these are very good examples of functions that need to be 
added to EXPath.

&gt;<i> a) is in conflict with the requirement of powerful tools to offer a great number of options; and b) forces the caller to specifiy all input files - possibly hundreds or more - explicitly. (Or to provide secondary input files containing the file names, making things complicated..)
</I>&gt;<i> 
</I>&gt;<i> So David A. Lee recently wrote:
</I>&gt;<i> &quot;I had to write a bunch of &quot;framework&quot; code in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a> just to arrange to *call* xquery ( you know, find the input files, get the xquery files, setup the parameters, call it, serialize the results etc).&quot;
</I>&gt;<i> 
</I>&gt;<i> David's contribution drew my attention to xmlsh which seems to me a fascinating approach. But I feel that (at least presently) tool development per XQuery needs a lightweight approach to wrapping. (No?) I have taken to an extremely simple technique of wrapping queries in Perl, thus overcoming the problems mentioned above: 
</I>&gt;<i> 
</I>&gt;<i> a) get the powerful command line interface of Perl scripts (options and arguments, defaulting)
</I>&gt;<i> b) leave the preliminary file discovery to Perl (e.g. per glob)
</I>&gt;<i> 
</I>&gt;<i> The queries themselves I insert as here documents right into the Perl code, one function per query, like this:
</I>&gt;<i> 
</I>&gt;<i> sub xq_foo {       
</I>&gt;<i>     return &lt;&lt; 'EOF';
</I>&gt;<i> (: here comes query 'foo', possibly thousands of lines ...  :)
</I>&gt;<i> EOF
</I>&gt;<i> }
</I>&gt;<i> 
</I>&gt;<i> This is significant for keeping things simple: one Perl script can infact be a library with dozens of queries of unlimited complexity. (This way the tool software can be structured into a small number of deliverables each of which is a whole application, rather than a script in the conventional sense.) The approach is rounded off by letting Perl select the query, construct the command line invocation of your XQuery processor (e.g. <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a>), calling the processor and returning the output on stdout. Having written a couple of such Perl-XQuery-hybrids you recognize a uniform pattern of how to organize this little translation of Perl input into XQuery invocation, including input checks, so that from the third specimen onwards you have, in terms of effort, virtually no overhead, just write query after query INTO your Perl frame, and add invocation branch after invocation branch.
</I>&gt;<i> 
</I>&gt;<i> Now my questions: 
</I>&gt;<i> - would you recommend alternatives for rapid tool development?
</I>
I can't fault what you're doing right now - but it would be nice to be 
able to handle this in pure XQuery.

&gt;<i> - if taking a similar approach - would you like to recommend special details, perhaps the script language actually used, or other aspect?
</I>
I think that pure functional XQuery is always going to have issues with 
tool writing, since it believes that the world doesn't change during the 
time a query is executed (and goes to great lengths to make this seem 
so). This is clearly a good <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use case</a> for XQuery Scripting Extensions, 
which introduces a notion of time passing and the world changing whilst 
still remaining largely functional.

http://www.w3.org/TR/xquery-sx-10/

John

-- 
John Snelson, <a title="Oracle" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/oracle.html">Oracle</a> Corporation            http://snelson.org.uk/john
Berkeley DB XML:            http://oracle.com/database/berkeley-db/xml
XQilla:                                  http://xqilla.sourceforge.net
</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003504.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003504.html" /><updated>2009-09-04T10:59:19Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello David,

scripting and <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tool</a> devlopment using script-wrapping are akin, but not quite the same. It seems to me important to distinguish clearly between two <a title="usecases" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">usecases</a>:

1. the tool's <a title="functionality" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/buy/compare.html">functionality</a> is provided by executing XQuery once (or only a few times)
2. the tool's functionality is provided by executing XQuery very often (as in your tests, hundreds of times)

Almost all tools I have developed so far fall into category 1. Obviously there is NO PERFORMANCE PENALTY worth mentioning in this case: I believe the difference between calling the query via its Perl script or alternatively calling it directly from the command line would not be perceptible for a human being.

It is not coincidence that category 1 can VERY often be used - rather, it is exactly the sequence philosophy which makes it a common case!  Example: if you have a query processing a document received as context item, then one can modify the query to process any number of input documents in succession, producing an aggregation of results by just adding 4 (!) lines:

declare variable $fileNames external;
declare variable $docs := for $f in tokenize(fileNames, &quot;\s*&quot;) return doc($f);
&lt;collection&gt;{for $d in $docs return
   - now comes the original query with this modification: prepend $d before any path starting with / or // -
}&lt;/collection&gt;

All that is left to be done is pass the names of the input documents as a space separated string to the query. Which is a trivial task for the little Perl section preceding the invocation.

If one ignores this dependence on usecase, one arrives at the situation described by <a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> on http://www.<a title="saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/press/2004_11_04_saxonica.html">saxonica</a>.com/questions.html, last question: &quot;Is it true that Altova XML is three times as fast as <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a>?&quot;

I never cease to be amazed by exactly this quality of XQuery - its ability to integrate vast sets of input resources with almost no increased effort as compared to the processing of a <a title="Single Source Publishing" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/single_source_publishing.html">single resource</a>.

With kind regards,
Hans-Juergen Rennau




----- Urspr&#252;ngliche Mail ----
Von: David A. Lee &lt;http://x-query.com/mailman/listinfo/talk&gt;
An: Hans-Juergen Rennau &lt;http://x-query.com/mailman/listinfo/talk&gt;
CC: http://x-query.com/mailman/listinfo/talk; http://x-query.com/mailman/listinfo/talk
Gesendet: Freitag, den 4. September 2009, 04:09:21 Uhr
Betreff: Re:  Tool development: by Perl-wrapped XQuery


In my opinion the problem with doing this in perl is that unless the xquery implementation itself is in perl &gt; or atleast runs within the same process you will run into horrible performance problems.   See my (with Norm Walsh's) paper :

http://www.balisage.net/Proceedings/vol4/author-pkg/Lee01/BalisageVol4-Lee01.html

What we found is that for our test cases there is a 100-200x (yes 10000 % - 20000 % ) performance penalty of using a scripting language to call xml processing programs.   This *can* be optimized but the exact use cases of using a off-the-shelf scripting language to do this kind of thing is typically by the audience of people who do not want to spend the extra effort to optimize it, or who are not experts in the type of software development/languages required to  do it, or both. i.e its exactly why they are using scripting - so they don't have to do all that extra work.

This is the primary reason xmlsh was invented instead of re-using an existing scripting language.   I took a &quot;toy&quot; program in a scripting language it worked great.
But when I loaded up all the files I needed it to run it died a horrible death.   This is what I call &quot;The Brick Wall&quot; and why scripting XML processes fail so many of us.   The presentation cited above has some good charts and figures as well as the full test case code.

This is why I suggest either (both)

* Use a scripting language that already is 'in process' with all the XML core languages you want to use (xquery, xslt etc)
-&gt; examples XProc, xmlsh

* Encourage scripting languages developers to embed these XML languages directly into the scripting languages (say perl).
-&gt; This is hard work and may in fact involve re-implementing many of the core tools from scratch.
-&gt; Some of the work is done but is incomplete ... I've seen references to XSLT implementions native in perl where the author quoted  something like
  &quot;This isnt a complete implementation of XSLT 1.0 but it works pretty good for me&quot;.


-- David A. Lee


      


</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003503.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003503.html" /><updated>2009-09-04T10:11:56Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Fri, Sep 4, 2009 at 5:03 AM, David A. Lee&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> But equally important, IMHO, &#160;is to be able to &quot;glue&quot; the data from one
</I>&gt;<i> module to another efficiently. &#160;That needs common in-memory formats.
</I>&gt;<i> And a way in the language to make calling these modules and passing data
</I>&gt;<i> to/from them easy in a way thats 'natural' for that language.
</I>&gt;<i> That may mean, for example, that the language runtime define a standard XML
</I>&gt;<i> in-memory representation and every module can use it natively.
</I>&gt;<i> So that you can have say variables of XML Documents and not have to
</I>&gt;<i> transform them to each module's internal representation (rebuild the
</I>&gt;<i> document).
</I>
This is a very important point. I am mostly dealing with XSLT, XQuery,
and the rest of the stack from .NET perspective. There, we actually do
have a standard representation of XML - IXPathNavigable factory
interface and the associated XPathNavigator cursor class. In fact, it
is specifically designed in a way that makes a straightforward mapping
to XDM possible (to quote MSDN: &quot;The XPathNavigator class in the
<a title="System.Xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/microsoft/systemxml.html">System.Xml</a>.<a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a> namespace is an abstract class which defines a cursor
model for navigating and <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_views.html">editing XML</a> information items as instances of
the XQuery 1.0 and XPath 2.0 <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">Data Model</a>.&quot;). All .NET XML APIs provide
support for those interfaces one way or another - all in-memory XML
tree representations (and there are three of them in the standard
library) can be treated as IXPathNavigable, .NET stock XSLT 1.0
implementation takes an IXPathNavigable as a source, stock XML Schema
validator also works with it, and so on. The interface is also simple
enough that I can take virtually any data source (e.g., an object
graph), easily expose it as an XDM instance, and <a title="feed" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">feed</a> that to any
XML-<a title="XML Pipeline Example" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/pipeline.html">processing pipeline</a> (<a title="XSLT Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xsltedit1/xsltedit1.html">usually XSLT</a>) as an input, with no need to
copy data back and forth.

So, all stock components integrate really well together, with no
representation mismatch (and yet representation itself being nicely
abstracted away), but they are dated (XSLT 1.0... 'nuff said). And
third-party components often don't integrate that well. For example,
there's no XSLT 2.0 implementation for .NET that works directly over
IXPathNavigable input trees (without making an extra copy), or that
provides output in a form for which an XPathNavigator can be
immediately provided without copies. And the first and only XQuery
implementation which supports all of the above that I'm aware of is
the recently released XQSharp.

</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003502.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003502.html" /><updated>2009-09-04T09:39:50Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
&gt;<i>
</I>&gt;<i> That's the downside of issuing <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">specifications</a> and waiting for the
</I>&gt;<i> implementations to happen. Thank God <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> does have a standard
</I>&gt;<i> serialization, so any document can migrate from one implementation
</I>&gt;<i> to another :-)
</I>&gt;<i>
</I>I wish that were true.  Its true for &quot;Documents&quot; but not for everything 
XML <a title="tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a> want to process and consume.
My current peeve is sequences.
There is *NO* standard representation of sequences period.  (please 
please tell me I'm wrong !)
A real example:
    toolA : produces a sequence of nodes
    toolB : accepts a sequence of nodes

There is no standard way of glueing these together in any language or 
serialization format that I know of.  Its all vendor specific.
And you cant even rely on the worse case of text serialization
. 
A typical part-solution/hack is to wrap the sequences in a document, 
then unwrap them on the target.  This works sometimes.
It fails miserably for things like sequences of attributes,  or even 
sequences of integers.



&gt;<i>
</I>&gt;<i> Isn't .NET a solution to that problem?
</I>&gt;<i>
</I>It is a nice framework.  But someone still has to write all the pieces 
and agree to as common representation for all the data interfaces.
And the common .NET languages are about at the same level as <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a> ... 
although there is a windows .net scripting language I wouldn't call it 
&quot;simple&quot;.
So I dont agree that .NET is a &quot;solution&quot;.   Its a technology framework 
not a solution in itself.
<a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> has a great .NET <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">binding</a> (runs the JVM directly within .NET but 
exposes pure .NET interfaces).
But its at the same level of complexity to use as java and doesnt have 
*all* the pieces.  Its got lots, but not all.

I'd love to see a comprehensive XML tools framework in .NET which is 
actually as simple to use as scripting.  I think it could be done.
But to be 'really simple' , IMHO, would require a .NET implementation of 
a scripting syntax.

ruby.net anyone :) ?


-David

-- 
David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224






</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003499.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003499.html" /><updated>2009-09-04T09:03:21Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>

&gt;<i>
</I>&gt;&gt;<i> * Use a scripting language that already is 'in process' with all the
</I>&gt;&gt;<i> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> core languages you want to use (<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>, <a title="xslt" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">xslt</a> etc)
</I>&gt;&gt;<i>  -&gt; examples XProc, xmlsh
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> * Encourage scripting languages developers to embed these XML
</I>&gt;&gt;<i> languages directly into the scripting languages (say perl).
</I>&gt;<i>
</I>&gt;<i> More precisely, write <a title="bindings" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a> to implementations in C/C++.
</I>&gt;<i>
</I>Only if the scripting language itself is written in C/C++ or has easy 
bindings to it.  If its in another language then bindings in that 
language are useful.

But equally important, IMHO,  is to be able to &quot;glue&quot; the data from one 
module to another efficiently.  That needs common in-memory formats.
And a way in the language to make calling these modules and passing data 
to/from them easy in a way thats 'natural' for that language.
That may mean, for example, that the language runtime define a <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> 
XML in-memory representation and every module can use it natively.
So that you can have say variables of XML Documents and not have to 
transform them to each module's internal representation (rebuild the 
document).

To do this well I suggest is more then just writing bindings.  Its a 
language level problem as well as a binding problem.

-D






David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224


</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003497.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003497.html" /><updated>2009-09-04T08:51:15Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>xmlstar looks very useful !!!

Taking a quick look though it seems it will suffer exactly the same 
performance problems as most other scripting languages because it has no 
way to &quot;glue&quot; the commands together in process.  So you end up having a 
process execution for each command and full text serialization in and out.
( also missing the one key thing this list is about aka &quot;<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>&quot; ).


David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224



Jakob Fix wrote:
&gt;<i> Talking of <a title="tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a>, what is the experience of people on this list with
</I>&gt;<i> xmlstarlet (http://xmlstar.sourceforge.net/) which seems to me like a
</I>&gt;<i> close contender to xmlsh (but haven't looked closely)?
</I>&gt;<i>
</I>&gt;<i> cheers,
</I>&gt;<i> Jakob.
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> On Fri, Sep 4, 2009 at 13:09, David A. Lee&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
</I>&gt;<i>   
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>     
</I>&gt;&gt;&gt;<i> Now my questions: - would you recommend alternatives for rapid tool
</I>&gt;&gt;&gt;<i> development? - if taking a similar approach - would you like to recommend
</I>&gt;&gt;&gt;<i> special details, perhaps the script language actually used, or other aspect?
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i>       
</I>&gt;&gt;<i> In my opinion the problem with doing this in perl is that unless the xquery
</I>&gt;&gt;<i> implementation itself is in perl or atleast runs within the same process you
</I>&gt;&gt;<i> will run into horrible performance problems.   See my (with Norm Walsh's)
</I>&gt;&gt;<i> paper :
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> http://www.balisage.net/Proceedings/vol4/author-pkg/Lee01/BalisageVol4-Lee01.html
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> What we found is that for our test cases there is a 100-200x (yes 10000 % -
</I>&gt;&gt;<i> 20000 % ) performance penalty of using a scripting language to call xml
</I>&gt;&gt;<i> processing programs.   This *can* be optimized but the exact <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use cases</a> of
</I>&gt;&gt;<i> using a off-the-shelf scripting language to do this kind of thing is
</I>&gt;&gt;<i> typically by the audience of people who do not want to spend the extra
</I>&gt;&gt;<i> effort to optimize it, or who are not experts in the type of software
</I>&gt;&gt;<i> development/languages required to  do it, or both. i.e its exactly why they
</I>&gt;&gt;<i> are using scripting - so they don't have to do all that extra work.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> This is the primary reason xmlsh was invented instead of re-using an
</I>&gt;&gt;<i> existing scripting language.   I took a &quot;toy&quot; program in a scripting
</I>&gt;&gt;<i> language it worked great.
</I>&gt;&gt;<i> But when I loaded up all the files I needed it to run it died a horrible
</I>&gt;&gt;<i> death.   This is what I call &quot;The Brick Wall&quot; and why scripting XML
</I>&gt;&gt;<i> processes fail so many of us.   The presentation cited above has some good
</I>&gt;&gt;<i> charts and figures as well as the full test case code.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> This is why I suggest either (both)
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> * Use a scripting language that already is 'in process' with all the XML
</I>&gt;&gt;<i> core languages you want to use (xquery, <a title="xslt" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">xslt</a> etc)
</I>&gt;&gt;<i> -&gt; examples XProc, xmlsh
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> * Encourage scripting languages developers to embed these XML languages
</I>&gt;&gt;<i> directly into the scripting languages (say perl).
</I>&gt;&gt;<i> -&gt; This is hard work and may in fact involve re-implementing many of the
</I>&gt;&gt;<i> core tools from scratch.
</I>&gt;&gt;<i> -&gt; Some of the work is done but is incomplete ... I've seen references to
</I>&gt;&gt;<i> XSLT implementions native in perl where the author quoted  something like
</I>&gt;&gt;<i>  &quot;This isnt a complete <a title="How To Build XSLT Applications" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xsltedit1/xsltedit1.html">implementation of XSLT 1.0</a> but it works pretty good
</I>&gt;&gt;<i> for me&quot;.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> --
</I>&gt;&gt;<i> David A. Lee
</I>&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk  http://www.calldei.com
</I>&gt;&gt;<i> http://www.xmlsh.org
</I>&gt;&gt;<i> 812-482-5224
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> _______________________________________________
</I>&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>     
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>   
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090904/c0df45fc/attachment.htm
</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003495.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003495.html" /><updated>2009-09-04T08:46:52Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>

&gt;<i> While XProc is probably the cleanest solution, another approach in
</I>&gt;<i> particular for ad-hoc scripting might be to use an existing scripting
</I>&gt;<i> language that can run on top of the <a title="JVM" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">JVM</a> (1), e.g. jython or jruby.
</I>&gt;<i> This gives you the flexibility of handy scripting but doesn't incur
</I>&gt;<i> the overhead of re-parsing huge documents. And of course on the JVM
</I>&gt;<i> you'll find implementations for everything-XML, from XSLT via XQuery
</I>&gt;<i> and XML databases to various validation tools etc., all nicely
</I>&gt;<i> co-existing based on the <a title="org.w3c.dom" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">DOM</a> and <a title="SAX" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/sax.html">SAX</a> (2).
</I>&gt;<i>
</I>&gt;<i> Regards
</I>&gt;<i> Martin
</I>&gt;<i>   
</I>
jypthon or jruby solve the performance problem but they dont solve the 
complexity problem.
The fact is these XML API technologies are a royal pain to call and 
worse to glue to together.
If you can find one vendor/ implementation that has all the pices its a 
tad easier (document types match !) but its still a bit of hell.
Then add technologies that VendorA doesnt do and try to wrap VendorB's 
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">data type</a> and push it through VendorA's API.
I think you'll find it about as painful to to use jruby or jython to say 
call  xinclude , then rng validate then xquery then pass its results to 
xslt as writing it in pure java.
In xproc this is very clean, but admittedly verbose.  (guess about 40 
lines of xproc code).
In xmlsh its as simple as 
    xinclude file | rngvalidate schema | xquery -f schema | xslt -f 
<a title="Stylesheet Designer" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/publisher1/publisher1.html">stylesheet</a>

To get these kind of languages (jruby etc) into shape where XML is 
actually *easy to use* is going to require work.  
Possibly at the language level to make it really easy.
If this is done to more scripting languages (making it both efficient 
and simple to use) rather then just &quot;possible&quot; I suspect adoption of the 
core technologies would skyrocket.  

Thats what we need, IMHO, is more *simplicity* of using and intemixing 
the core xml tools in a way that doesn't incur huge performance costs.
But if they dont include the core technologies such as XQuery , XSLT 
(2.0 ideally) , xinclude , validation ... in such a way that they can be 
easily intermixed accessed then people wont use them.  The reason people 
are using scripting languages is for ease of use.
I talked to a Ruby programmer at work after a demonstration on XQuery 
and his answer was &quot;I can do that in ruby ... why would I want to <a title="XQuery Examples" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery_primer.html">learn 
xquery</a> ?  And ruby can do a LOT more then just xml processing &quot; ... 
After seeing some of his code I had to admit he had a point.  I still 
have been unable to successfully convince him the value of xquery over 
Ruby's XML API's.  Although he's never had to do anything *complicated* 
... but because of that he cant envision the need for a different 
language.   He's at the stage I was when I first started <a title="XML Programming" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/sqlxml_tutorial.html">XML Programming</a> 
in java ... I would look at XSLT programs &quot;Why would I want to write 
something that complicated when I can just use the easy DOM calls in 
java.   It wasn't until several years of having to do *difficult* 
transformations that I finally realized how big my java programs were 
getting.



David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224


</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003492.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003492.html" /><updated>2009-09-04T08:09:21Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>


&gt;<i>
</I>&gt;<i> Now my questions: 
</I>&gt;<i> - would you recommend alternatives for rapid <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tool</a> development? 
</I>&gt;<i> - if taking a similar approach - would you like to recommend special details, perhaps the script language actually used, or other aspect?
</I>&gt;<i>   
</I>In my opinion the problem with doing this in perl is that unless the 
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> implementation itself is in perl or atleast runs within the same 
process you will run into horrible performance problems.   See my (with 
Norm Walsh's) paper :

http://www.balisage.net/Proceedings/vol4/author-pkg/Lee01/BalisageVol4-Lee01.html

What we found is that for our test cases there is a 100-200x (yes 10000 
% - 20000 % ) performance penalty of using a scripting language to call 
xml processing programs.   This *can* be optimized but the exact <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use 
cases</a> of using a off-the-shelf scripting language to do this kind of 
thing is typically by the audience of people who do not want to spend 
the extra effort to optimize it, or who are not experts in the type of 
software development/languages required to  do it, or both. i.e its 
exactly why they are using scripting - so they don't have to do all that 
extra work.

This is the primary reason xmlsh was invented instead of re-using an 
existing scripting language.   I took a &quot;toy&quot; program in a scripting 
language it worked great.
But when I loaded up all the files I needed it to run it died a horrible 
death.   This is what I call &quot;The Brick Wall&quot; and why scripting XML 
processes fail so many of us.   The presentation cited above has some 
good charts and figures as well as the full test case code.

This is why I suggest either (both)

* Use a scripting language that already is 'in process' with all the XML 
core languages you want to use (xquery, <a title="xslt" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">xslt</a> etc)
 -&gt; examples XProc, xmlsh

* Encourage scripting languages developers to embed these XML languages 
directly into the scripting languages (say perl).
-&gt; This is hard work and may in fact involve re-implementing many of the 
core tools from scratch.
-&gt; Some of the work is done but is incomplete ... I've seen references 
to XSLT implementions native in perl where the author quoted  something like
   &quot;This isnt a complete <a title="How To Build XSLT Applications" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xsltedit1/xsltedit1.html">implementation of XSLT 1.0</a> but it works pretty 
good for me&quot;.


-- 
David A. Lee
http://x-query.com/mailman/listinfo/talk  
http://www.calldei.com
http://www.xmlsh.org
812-482-5224



</PRE>
]]></content></entry><entry><title>  Tool development: by Perl-wrapped XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003490.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003490.html" /><updated>2009-09-04T00:08:09Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>As <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/daniela_florescu.html">Daniela Florescu</a> emphasized, <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> is an information processing language, rather than a query language, and this makes it a great implementation language for <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tool</a> development. But two problems discourage the use of &quot;raw queries&quot; - without frontent or wrapping of any sort - as tools:

a) no default parameters
b) no <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a>-based access to system commands, namely no file discovery

a) is in conflict with the requirement of powerful tools to offer a great number of options; and b) forces the caller to specifiy all input files - possibly hundreds or more - explicitly. (Or to provide secondary input files containing the file names, making things complicated..)

So David A. Lee recently wrote:
&quot;I had to write a bunch of &quot;framework&quot; code in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a> just to arrange to *call* xquery ( you know, find the input files, get the xquery files, setup the parameters, call it, serialize the results etc).&quot;

David's contribution drew my attention to xmlsh which seems to me a fascinating approach. But I feel that (at least presently) tool development per XQuery needs a lightweight approach to wrapping. (No?) I have taken to an extremely simple technique of wrapping queries in Perl, thus overcoming the problems mentioned above: 

a) get the powerful command line interface of Perl scripts (options and arguments, defaulting)
b) leave the preliminary file discovery to Perl (e.g. per glob)

The queries themselves I insert as here documents right into the Perl code, one function per query, like this:

sub xq_foo {       
    return &lt;&lt; 'EOF';
(: here comes query 'foo', possibly thousands of lines ...  :)
EOF
}

This is significant for keeping things simple: one Perl script can infact be a library with dozens of queries of unlimited complexity. (This way the tool software can be structured into a small number of deliverables each of which is a whole application, rather than a script in the conventional sense.) The approach is rounded off by letting Perl select the query, construct the command line invocation of your XQuery processor (e.g. <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a>), calling the processor and returning the output on stdout. Having written a couple of such Perl-XQuery-hybrids you recognize a uniform pattern of how to organize this little translation of Perl input into XQuery invocation, including input checks, so that from the third specimen onwards you have, in terms of effort, virtually no overhead, just write query after query INTO your Perl frame, and add invocation branch after invocation branch.

Now my questions: 
- would you recommend alternatives for rapid tool development? 
- if taking a similar approach - would you like to recommend special details, perhaps the script language actually used, or other aspect?

Any feedback would be highly welcome!

With kind regards,
Hans-Juergen Rennau


      


</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003489.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003489.html" /><updated>2009-09-03T17:00:32Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Thu, Sep 3, 2009 at 8:21 AM, Gary Lewis&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> ... but the various implementors might want to consider what they
</I>&gt;<i> have in common and then do something (eg, create an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/">xquery learning</a>
</I>&gt;<i> resource site) that would benefit all <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquerytalk/">xquery developers</a> regardless of
</I>&gt;<i> the flavor of xquery they use.
</I>
I think the XQuery Wikibook http://en.wikibooks.org/<a title="The Stylus Studio Wiki" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://wiki.stylusstudio.com/">wiki</a>/XQuery is an
ideal starting point.  It's got a great base of material already.
It's currently very eXist-centric, but there's no reason that there
couldn't be articles about other implementations.

- Joe
</PRE>
]]></content></entry><entry><title>  [ANN] XQSharp 1.0 (XQuery for the .NET Framework)
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003488.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003488.html" /><updated>2009-09-03T14:57:01Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>The XQSharp team are pleased to announce the long-awaited release of 
XQSharp 1.0

XQSharp is an <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> processor for <a title="System.XML 1.0" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/microsoft/systemxml.html">the .NET Framework</a>.  It is developed 
by Clinical &amp; Biomedical Computing Limited, a member of the <a title="W3C" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">W3C</a>.

XQSharp 1.0 is the first complete release of XQSharp containing our .NET 
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/api/">API</a>, which has been designed to work in conjunction with the classes in 
the System.Xml namespace.  The full API Reference can be viewed at 
http://www.xqsharp.com/xqsharp/doc/.

Key Features:
* Up-to-date and Standards Compliant (exemplary performance in the 
XQuery Test Suite)
* <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">Schema-Aware</a>
* High performance
* Comprehensive and well documented API, with full IntelliSense 
documentation.
* All optional XQuery features implemented
* Full implementation of the XDM Serialization specification.
* <a title="XPath 1.0" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath 2.0</a> support sharing the same optimization and runtime engine as 
XQuery.
* Can be used in Low and Medium Trust environments.

It is completely free for non-commercial use; commercial <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/buy/">licenses</a> are 
also available.

For more information please visit http://www.xqsharp.com/ or contact us 
at http://x-query.com/mailman/listinfo/talk

Oliver Hallam
http://www.xqsharp.com
</PRE>
]]></content></entry><entry><title>  How XML Threatens Big Data
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003486.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003486.html" /><updated>2009-09-03T12:35:18Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Ivan Pedruzzi schrieb:
&gt;<i> On Wed, Sep 2, 2009 at 4:49 AM, Michael Ludwig &lt;http://x-query.com/mailman/listinfo/talk&gt;
</I>&gt;<i> wrote:
</I>
&gt;&gt;<i> Also, it never fails to amaze me how people can think that documents
</I>&gt;&gt;<i> exceeding a certain size - 1 MB, okay: 5 MB - are a good idea. Just
</I>&gt;&gt;<i> imagine the amount of processing that has to be done before
</I>&gt;&gt;<i> discovering on parse completion that something's wrong.
</I>&gt;<i>
</I>&gt;<i> If you consider 5 MB documents a bad idea may be you are not using the
</I>&gt;<i> appropriate <a title="tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a> :)
</I>&gt;<i>
</I>&gt;<i> Ivan Pedruzzi
</I>&gt;<i> Progress DataDirect Technologies
</I>
If I control the whole <a title="XML Pipeline Example" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/pipeline.html">processing pipeline</a> I can use the tools I want.
But if I publish documents over the wire I may not be in a position to
tell consumers what tools to use.

-- 
Michael Ludwig
</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003485.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003485.html" /><updated>2009-09-03T11:21:39Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>The difference between R and <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> however is that R is a language
with one implementation.
Thus the site for downloading R can also provide all this information
to users, for XQuery it is too fragmented.

Best Regards,
Bryan Rasmussen

On Tue, Sep 1, 2009 at 5:40 PM, Gary Lewis&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> On Wed Aug 26 17:39:05 PDT 2009, <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/daniela_florescu.html">Daniela Florescu</a> wrote:
</I>&gt;<i>
</I>&gt;&gt;<i> ... XQuery has tremendous potential for adding
</I>&gt;&gt;<i> value to customers, but the proof isn't there yet, and the path isn't
</I>&gt;&gt;<i> clear either.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> There has to be a larger XQuery pool of expertise ...
</I>&gt;<i>
</I>&gt;<i> Hi Daniela - I finally got around to reading this entire thread thru
</I>&gt;<i> to 9/1. It's truly humbling to see how much about XQuery, XML, etc I
</I>&gt;<i> do not know.
</I>&gt;<i>
</I>&gt;<i> But perhaps my newcomer status will provide a useful perspective.
</I>&gt;<i>
</I>&gt;<i> First some quick background. I definitely don't yet qualify as an
</I>&gt;<i> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquerytalk/">XQuery developer</a>. But I've been working pretty conscientiously over
</I>&gt;<i> the past 4 or 5 months. I come to XQuery with decades of SQL, data
</I>&gt;<i> warehouse design, and policy analysis background (ie, I see databases
</I>&gt;<i> as a means to analysis, not an end in themselves). I got interested in
</I>&gt;<i> XQuery because I needed a tool that would let me query the Web in a
</I>&gt;<i> similar fashion to querying relational databases. The Web and web
</I>&gt;<i> query tools are still primitive by comparison, but I've been quite
</I>&gt;<i> pleased with what's possible. For example, my latest XQuery
</I>&gt;<i> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_videos.html">demonstration</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_project.html">project</a> mashed up US Dept of Education data with Federal
</I>&gt;<i> Reserve data to examine the question of whether higher education in
</I>&gt;<i> the US is countercyclical. See:
</I>&gt;<i> http://garymlewis.com/instchg/2009/08/10/another-xquery-use-case-is-higher-education-countercyclical/
</I>&gt;<i>
</I>&gt;<i> Given a choice, I'll almost always choose tools with power and
</I>&gt;<i> capability versus those with ease-of-use but limited application. So,
</I>&gt;<i> for example, I'm willing to curse and beat my head against a wall
</I>&gt;<i> every time I use the R stat programs because I know that somehow
</I>&gt;<i> there's a solution in R and that someone in the R community will know
</I>&gt;<i> what the solution is.
</I>&gt;<i>
</I>&gt;<i> I've probably written several thousand XQuery programs now. But I only
</I>&gt;<i> feel comfortable in a very narrow niche. There is just oodles about
</I>&gt;<i> XML and all the other X standards and tools that I do not know. Some
</I>&gt;<i> of this is surely just beginner's lament (ie, the notion that anything
</I>&gt;<i> you can't learn instantly is way too complex). But some too is a steep
</I>&gt;<i> learning curve in the absence of adequate support for learning.
</I>&gt;<i>
</I>&gt;<i> You ask why there is not more XQuery expertise. The XQuery community
</I>&gt;<i> might benefit from looking at the R community [see:
</I>&gt;<i> http://www.r-project.org/ ] and the considerable help resources
</I>&gt;<i> available there. It's easier for a developer to get untracked with any
</I>&gt;<i> new tool if there is visible help available. With regard to R, I'm
</I>&gt;<i> talking here about specialized search sites, repositories of learning
</I>&gt;<i> materials, open source and free tools, dozens upon dozens of <a title="forums" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">forums</a>,
</I>&gt;<i> examples as code fragments, online <a title="books" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_book.html">books</a> and manuals, and a community
</I>&gt;<i> of very active R developers/enhancers.
</I>&gt;<i>
</I>&gt;<i> I like XQuery a lot. I will continue to use it. And no doubt in the
</I>&gt;<i> course of using it, I'll fill in the many holes of what I don't know.
</I>&gt;<i> But I could sure benefit from something like an XQuery learning
</I>&gt;<i> resource site.
</I>&gt;<i>
</I>&gt;<i> Gary
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I></PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003487.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003487.html" /><updated>2009-09-03T09:21:52Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> The difference between R and <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> however is that R is a language
</I>&gt;<i> with one implementation.
</I>&gt;<i> Thus the site for downloading R can also provide all this information
</I>&gt;<i> to users, for XQuery it is too fragmented.
</I>&gt;<i>
</I>&gt;<i> Best Regards,
</I>&gt;<i> Bryan Rasmussen
</I>
Hi Bryan - Absolutely true. And that's part of the point I was trying
to make. If the community of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquerytalk/">xquery developers</a> is small, part of the
reason is the multitude of xquery implementations. That's not going to
change, but the various implementors might want to consider what they
have in common and then do something (eg, create an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/">xquery learning</a>
resource site) that would benefit all xquery developers regardless of
the flavor of xquery they use.

Yes, very definitely I am saying that part of the cause for Daniela's
lament originates in the balkanization of the xquery community.

Gary
</PRE>
]]></content></entry><entry><title>  request: get the attribute value
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003483.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003483.html" /><updated>2009-09-02T17:15:33Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>dengping wei wrote:

&gt;<i> staticContext.declareNamespace(&quot;sawsdl&quot;,
</I>&gt;<i> &quot;&#160;&#160;&#160; http://www.<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/ns/sawsdl&quot;);
</I>
&gt;<i> xmlns:sawsdl=&quot;http://www.w3.org/ns/sawsdl&quot;
</I>
  Both strings do not match (see the extra whitespaces in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a>.)

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/























      


</PRE>
]]></content></entry><entry><title>  request: get the attribute value
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003482.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003482.html" /><updated>2009-09-02T14:08:46Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> But when I want to get value of attribute &quot;sawsdl:modelReference&quot;, I use the
</I>&gt;<i> query
</I>&gt;<i>
</I>&gt;<i> for $x in
</I>&gt;<i> doc(\&quot;aa.<a title="WSDL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/webservices/wsdl_editor.html">wsdl</a>\&quot;)/wsdl:definitions/wsdl:types/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xsd:schema</a>/xsd:complexType
</I>&gt;<i> return &lt;node&gt;{$x/@sawsdl:modelReference}&lt;/node&gt;
</I>&gt;<i>
</I>&gt;<i> It returns nothing. How could I get the value of the attribute &quot;
</I>&gt;<i> sawsdl:modelReference&quot;?
</I>Only to be sure about that: did you declare the namespace? You would
do that by adding the line

declare namespace sawsdl=&quot;http://www.w3.org/ns/sawsdl&quot;;

As an alternative you could use the query

for $x in doc(\&quot;aa.wsdl\&quot;)/wsdl:definitions/wsdl:types/xsd:schema/xsd:complexType
return &lt;node&gt;{$x/@*:modelReference}&lt;/node&gt;

which looks for attributes &quot;modelReference&quot; in all namespaces.

Markus

On Wed, Sep 2, 2009 at 12:36 PM, dengping wei&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Dear all,
</I>&gt;<i>
</I>&gt;<i> I have a question when I using <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> the get the attribute value of an
</I>&gt;<i> element.
</I>&gt;<i>
</I>&gt;<i> when my query is
</I>&gt;<i> for $x in doc(\&quot;aa.wsdl\&quot;)/wsdl:
</I>&gt;<i> definitions/wsdl:types/xsd:schema/xsd:complexType
</I>&gt;<i> return &lt;node&gt;{$x}&lt;/node&gt;
</I>&gt;<i> It returns the results as follows:
</I>&gt;<i> &lt;node&gt;
</I>&gt;<i> &#160;&#160; &lt;xsd:complexType xmlns:tns=&quot;http://schemas.dmas.dfki.de/venetianblind&quot;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:wsdl=&quot;http://schemas.xmlsoap.org/wsdl/&quot;
</I>&gt;<i>
</I>&gt;<i> xmlns:impl=&quot;http://dmas.dfki.de/axis/services/CarPrice-impl&quot;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:sawsdl=&quot;http://www.w3.org/ns/sawsdl&quot;
</I>&gt;<i>
</I>&gt;<i> xmlns:<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/ws_tester.html">SOAP</a>-ENC=&quot;http://schemas.xmlsoap.org/soap/<a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a>/&quot;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:intf=&quot;http://dmas.dfki.de/axis/services/CarPrice&quot;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:<a title="Axis Server" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/apache/axis.html">apachesoap</a>=&quot;http://<a title="Apache FAQ" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/apache/xml.html">xml.apache.org</a>/xml-soap&quot;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:wsdlsoap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns=&quot;http://dmas.dfki.de/axis/services/CarPrice&quot;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; name=&quot;PriceType&quot;
</I>&gt;<i>
</I>&gt;<i> sawsdl:modelReference=&quot;http://127.0.0.1/ontology/concept.owl#Price&quot;&gt;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;xsd:sequence&gt;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;xsd:element name=&quot;currency&quot; type=&quot;Currency&quot;/&gt;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;xsd:element name=&quot;amount&quot; type=&quot;xsd:float&quot;/&gt;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/xsd:sequence&gt;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160; &lt;/xsd:complexType&gt;
</I>&gt;<i> &lt;/node&gt;
</I>&gt;<i>
</I>&gt;<i> Then I want to get the value of attribute &quot;name&quot;, I use the query
</I>&gt;<i> for $x in
</I>&gt;<i> doc(\&quot;aa.wsdl\&quot;)/wsdl:definitions/wsdl:types/xsd:schema/xsd:complexType
</I>&gt;<i> return &lt;node&gt;{$x/@name}&lt;/node&gt;
</I>&gt;<i>
</I>&gt;<i> It works and return the results: &lt;node name=&quot;PriceType&quot;/&gt;
</I>&gt;<i>
</I>&gt;<i> But when I want to get value of attribute &quot;sawsdl:modelReference&quot;, I use the
</I>&gt;<i> query
</I>&gt;<i>
</I>&gt;<i> for $x in
</I>&gt;<i> doc(\&quot;aa.wsdl\&quot;)/wsdl:definitions/wsdl:types/xsd:schema/xsd:complexType
</I>&gt;<i> return &lt;node&gt;{$x/@sawsdl:modelReference}&lt;/node&gt;
</I>&gt;<i>
</I>&gt;<i> It returns nothing. How could I get the value of the attribute &quot;
</I>&gt;<i> sawsdl:modelReference&quot;?
</I>&gt;<i>
</I>&gt;<i> Thanks very much.
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> Dengping WEI
</I>&gt;<i> School of Computer Science,
</I>&gt;<i> National University of Defense Technology,
</I>&gt;<i> Changsha, Hunan &#160;410073
</I>&gt;<i> P.R. China
</I>&gt;<i>
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>
</PRE>
]]></content></entry><entry><title>  request: get the attribute value
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003479.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003479.html" /><updated>2009-09-02T13:36:50Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Dear all,

I have a question when I using <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> the get the attribute value of an
element.

when my query is
for $x in doc(\&quot;aa.<a title="WSDL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/webservices/wsdl_editor.html">wsdl</a>\&quot;)/wsdl:
definitions/wsdl:types/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xsd:schema</a>/xsd:complexType
return &lt;node&gt;{$x}&lt;/node&gt;
It returns the results as follows:
&lt;node&gt;
   &lt;xsd:complexType xmlns:tns=&quot;http://schemas.dmas.dfki.de/venetianblind&quot;
                    xmlns:wsdl=&quot;http://schemas.xmlsoap.org/wsdl/&quot;
                    xmlns:impl=&quot;
http://dmas.dfki.de/axis/services/CarPrice-impl&quot;
                    xmlns:sawsdl=&quot;http://www.w3.org/ns/sawsdl&quot;
                    xmlns:<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/ws_tester.html">SOAP</a>-ENC=&quot;
http://schemas.xmlsoap.org/soap/<a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a>/&quot;
                    xmlns:intf=&quot;http://dmas.dfki.de/axis/services/CarPrice&quot;
                    xmlns:<a title="Axis Server" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/apache/axis.html">apachesoap</a>=&quot;http://<a title="Apache FAQ" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/apache/xml.html">xml.apache.org</a>/xml-soap&quot;
                    xmlns:wsdlsoap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot;
                    xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
                    xmlns=&quot;http://dmas.dfki.de/axis/services/CarPrice&quot;
                    name=&quot;PriceType&quot;
                    sawsdl:modelReference=&quot;
http://127.0.0.1/ontology/concept.owl#Price&quot;&gt;
        &lt;xsd:sequence&gt;
          &lt;xsd:element name=&quot;currency&quot; type=&quot;Currency&quot;/&gt;
          &lt;xsd:element name=&quot;amount&quot; type=&quot;xsd:float&quot;/&gt;
        &lt;/xsd:sequence&gt;
      &lt;/xsd:complexType&gt;
&lt;/node&gt;

Then I want to get the value of attribute &quot;name&quot;, I use the query
for $x in
doc(\&quot;aa.wsdl\&quot;)/wsdl:definitions/wsdl:types/xsd:schema/xsd:complexType
return &lt;node&gt;{$x/@name}&lt;/node&gt;

It works and return the results: &lt;node name=&quot;PriceType&quot;/&gt;

But when I want to get value of attribute &quot;sawsdl:modelReference&quot;, I use the
query

for $x in
doc(\&quot;aa.wsdl\&quot;)/wsdl:definitions/wsdl:types/xsd:schema/xsd:complexType
return &lt;node&gt;{$x/@sawsdl:modelReference}&lt;/node&gt;

It returns nothing. How could I get the value of the attribute &quot;
sawsdl:modelReference&quot;?

Thanks very much.



-- 
Dengping WEI
School of Computer Science,
National University of Defense Technology,
Changsha, Hunan  410073
P.R. China
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090902/5f143868/attachment-0001.htm
</PRE>
]]></content></entry><entry><title>  request: get the attribute value
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003481.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003481.html" /><updated>2009-09-02T11:57:41Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>dengping wei wrote:

  Hi,

&gt;<i> Then I want to get the value of attribute &quot;name&quot;,
</I>&gt;<i> I use the query [...] return &lt;node&gt;{$x/@name}&lt;/node&gt;
</I>
  BTW, that does not give you the value of the attribute @name but that gives you the attribute node itself (that's why you end up with an attribute on your element 'node'.

&gt;<i> [...]
</I>&gt;<i> &lt;node&gt;{$x/@sawsdl:modelReference}&lt;/node&gt;
</I>
&gt;<i> It returns nothing. How could I get the value of the
</I>&gt;<i> attribute &quot; sawsdl:modelReference&quot;? 
</I>
  Because you wrote doc(\&quot;aa.<a title="WSDL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/webservices/wsdl_editor.html">wsdl</a>\&quot;) (with the backslashes) I guess you evaluate your queries directly from <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a> or another similar language.  How do you bind the prefix 'sawsdl' to the correct URI on the static context?

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/























      


</PRE>
]]></content></entry><entry><title>  How XML Threatens Big Data
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003478.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003478.html" /><updated>2009-09-02T11:49:57Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>A. Steven Anderson schrieb:
&gt;<i> How timely....;-)
</I>&gt;<i> http://dataspora.com/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/blogs/">blog</a>/<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>-and-big-data/
</I>
Well, if data is <a title="tabular" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_grid_view.html">tabular</a>, what benefits can be obtained by storing it as
XML? None that I could see. If you later need XML, it is really easy to
generate. So why would you store it as XML in the first place? Because
you've fallen victim to some hype? That does not mean that &quot;XML fails&quot;.
(See Nestor's comment on the blog.)

If your data is full of optional stuff and pretty irregular in general,
XML can mean a significant improvement. A twenty-table-join is not easy
to understand. I've never set up Hibernate, but I think that isn't easy
either - a handy 700 page manual is required to bridge the OO/RDBMS/OO
mismatch. For those situations, objects or document databases may be a
much better match. There's more than one <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tool</a> in the box.

Also, it never fails to amaze me how people can think that documents
exceeding a certain size - 1 MB, okay: 5 MB - are a good idea. Just
imagine the amount of processing that has to be done before discovering
on parse completion that something's wrong.

-- 
Michael Ludwig
</PRE>
]]></content></entry><entry><title>  Tuple types
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003480.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003480.html" /><updated>2009-09-02T11:44:02Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>John Snelson wrote:

  Hi,

&gt;<i> &gt; This makes sense, though it would be a nuisance to have to
</I>&gt;<i> &gt; define ref() and deref() every time.  Is there any
</I>&gt;<i> &gt; consideration to make them <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> library functions?
</I>
&gt;<i> My recollection is that the WG considered adding them and
</I>&gt;<i> rejected the idea on the grounds that functions that can be
</I>&gt;<i> defined in <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> itself better belong in something like EXPath
</I>&gt;<i> function modules.  It's highly likely that I'll submit such a
</I>&gt;<i> module to EXPath in the future.
</I>
  My first reaction was: &quot;Why? Just use the HOF <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_feature_overview.html">feature</a> directly.&quot;
But defining ref() and deref() would actually have the double
advantage to 1/ make the intent clearer and 2/ enable one to
provide them on a processor that does not support HOFs (yet.)

  Good idea.

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/



      


</PRE>
]]></content></entry><entry><title>  Tuple types
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003484.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003484.html" /><updated>2009-09-02T10:36:59Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Wed, Sep 2, 2009 at 3:44 AM, Florent Georges&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;&gt;<i> &gt; This makes sense, though it would be a nuisance to have to
</I>&gt;&gt;<i> &gt; define ref() and deref() every time. &#160;Is there any
</I>&gt;&gt;<i> &gt; consideration to make them <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> library functions?
</I>&gt;<i>
</I>&gt;&gt;<i> My recollection is that the WG considered adding them and
</I>&gt;&gt;<i> rejected the idea on the grounds that functions that can be
</I>&gt;&gt;<i> defined in <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> itself better belong in something like EXPath
</I>&gt;&gt;<i> function modules. &#160;It's highly likely that I'll submit such a
</I>&gt;&gt;<i> module to EXPath in the future.
</I>&gt;<i>
</I>&gt;<i> &#160;My first reaction was: &quot;Why? Just use the HOF <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_feature_overview.html">feature</a> directly.&quot;
</I>
It's an obvious solution in case of deref(), but having to type out
identity lambdas in full every time will get repetitive fast, which is
why I think ref() is still handy regardless.

</PRE>
]]></content></entry><entry><title>  Help with multiple deletes
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003477.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003477.html" /><updated>2009-09-02T10:33:10Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>I guess your approach is a bit different than what the spec planned -
their idea was that you'd just want to perform the updates, but not
&quot;witness&quot; the effects.

A different approach would be this:
copy $x := doc(&quot;tree.<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>&quot;)
modify (
       let $node := $x//tree[@ID = 1] /branch[@ID = 2] /branch[@ID =
13] /branch[@ID = 65]
           /branch[@ID = 15] /leaf[@ID = 25]
       let $empty-branches := $x//branch[count(.//leaf except $node) = 0]
       let $empty-trees := $x//tree[count(.//branch except $empty-branches) = 0]
       return delete nodes ($empty-trees, $empty-branches, $node)
)
return $x

There might be more efficient ways to find the nodes that need
pruning, in particular if your implementation would support the
ancestor:: axis, you could walk upwards from $node instead of scanning
the whole tree for the $empty-* variables.

Martin
</PRE>
]]></content></entry><entry><title>  How XML Threatens Big Data
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003475.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003475.html" /><updated>2009-09-02T00:31:57Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>How timely....;-)
http://dataspora.com/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/blogs/">blog</a>/<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>-and-big-data/

-- 
A. Steven Anderson
Independent Consultant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090901/ddaefb71/attachment.htm
</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003476.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003476.html" /><updated>2009-09-01T21:37:30Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Ron Bourret wrote:
&gt;&gt;<i>&#160;What's the single killer app for SQL?
</I>
Ad hoc queries.

For the most part, the&#160;DBMS platforms that&#160;preceded the arrival of SQL, the hierarchical and CODASYL models, implemented queries with&#160;traversal logic in application programs. There were exceptions, including IBM GIS and TRW GIM, that actually used English-like commands for searching, deleting, inserting and updating.

But IMS and CODASYL were the defacto and de jure <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> and&#160;writing a program&#160;<a title="using a known schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">using a known schema</a> and sub-schema was how you implemented a query.

</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003473.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003473.html" /><updated>2009-09-01T20:41:00Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hmmmmm. What's the single killer app for SQL?

In both cases, I don't think there is one, in the sense that the Web is 
the killer app for the Internet or spreadsheets were the killer app for PCs.

I think that the combination of <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> and <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> databases simply make it 
possible to build applications that weren't feasible before because of 
limitations of the relational model to represent certain kinds of data, 
such as documents and semi-structured data.

Whether any of these is killer really depends on what business you're 
in. If you're an accountant, I doubt you'll be interested. If you're a 
<a title="XML Publisher" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/publisher.html">publisher</a>, you probably are.

-- Ron

Andrew Welch wrote:
&gt;<i> 2009/8/31 <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/daniela_florescu.html">Daniela Florescu</a> &lt;http://x-query.com/mailman/listinfo/talk&gt;:
</I>&gt;&gt;&gt;<i> why do developers and architects so stubbornly refuse just to _listen_ ?
</I>&gt;&gt;<i> Because we don't talk to them (a) enough and (b) with a message that they
</I>&gt;&gt;<i> understand.
</I>&gt;<i> 
</I>&gt;<i> What is the number one &quot;killer app&quot; for XQuery, shining example that
</I>&gt;<i> can be given to people when talking about XML databases - one that is
</I>&gt;<i> high profile enough that they may have heard of it?
</I></PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003472.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003472.html" /><updated>2009-09-01T20:36:42Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>I agree with Daniela. For some real-world examples of this kind of 
thing, see:

   http://www.rpbourret.com/xml/<a title="UseCases" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">UseCases</a>.htm

It's worth noting that people tried to build many of these applications 
on relational databases and failed. The article explains some of the 
reasons why.

This article is based on a non-scientific survey of XML database 
companies. It was done in 2005 and included about half of the XML 
database companies at the time, including most of the major ones.

-- Ron

<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/daniela_florescu.html">Daniela Florescu</a> wrote:
&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I honestly think that all the talk about XDM as a <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">data model</a> and XQ as 
</I>&gt;&gt;<i> a turing complete declarative language, etc., is sort of moot unless 
</I>&gt;&gt;<i> they do somehow enable something that RDBMS/BI/Data warehouses/search 
</I>&gt;&gt;<i> vendors can't readily do with existing approaches.
</I>&gt;<i> 
</I>&gt;<i> Well, that's relatively simple to answer, I would say.
</I>&gt;<i> 
</I>&gt;<i> Here is are some examples of what you could do with XML/XQuery that you 
</I>&gt;<i> cannot do with the traditional three
</I>&gt;<i> tier stack (communication + application logic written in an imperative 
</I>&gt;<i> language + declarative query layer)
</I>&gt;<i> 
</I>&gt;<i> 1. Have <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> flexibility. Start writing code without a fixed idea of 
</I>&gt;<i> your schema, and/or change
</I>&gt;<i> your mind later. (one schema is evil enough, three layers of 
</I>&gt;<i> superimposed schemas, in three different models,
</I>&gt;<i> are exponentially evil for flexibility and customizability. Almost no 
</I>&gt;<i> evolution of schema is possible.)
</I>&gt;<i> 
</I>&gt;<i> 2. Integrate text and documents into your information processing flow 
</I>&gt;<i> without adding software license, yet another layer,
</I>&gt;<i> more mappings, and different programming languages.
</I>&gt;<i> 
</I>&gt;<i> 3. Optimize the performance of your information processing program 
</I>&gt;<i> globally, not locally, layer by layer,
</I>&gt;<i> by adding more and more intermediate caches and shortcuts, which in turn 
</I>&gt;<i> will turn your code <a title="maintenance" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/maintenance_policy.html">maintenance</a> a nightmare.
</I>&gt;<i> 
</I>&gt;<i> 4. Be done in 2 weeks instead of 10 months. Time to market, by writing 
</I>&gt;<i> significantly less amount
</I>&gt;<i> of code, layer to layer connectors, plus data mappers from one model to 
</I>&gt;<i> another, etc, etc. Less
</I>&gt;<i> useless and redundant code to write and later deal  with.
</I>&gt;<i> 
</I>&gt;<i> 5. Spend less time maintaining the code. If the XQuery optimizer is 
</I>&gt;<i> doing a good <a title="job" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jobs.html">job</a>, you don't need
</I>&gt;<i> to constantly rewrite your code to fix performance problems, as you do 
</I>&gt;<i> in <a title="java" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">java</a>. Plus less number of lines of
</I>&gt;<i> code usually means less bugs. So smaller total cost of ownership of the 
</I>&gt;<i> code.
</I>&gt;<i> 
</I>&gt;<i> That would be my quick personal answer.
</I>&gt;<i> 
</I>&gt;<i> But that of course works if you know what you are doing with XQuery ....
</I>&gt;<i> 
</I>&gt;<i> Best
</I>&gt;<i> Dana
</I></PRE>
]]></content></entry><entry><title>  Tuple types
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003469.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003469.html" /><updated>2009-09-01T17:38:41Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Pavel Minaev wrote:
&gt;<i> On Tue, Sep 1, 2009 at 6:44 AM, John Snelson&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
</I>&gt;&gt;<i> Tuple types won't make it into <a title="XQuery 1.1" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery 1.1</a>, but the closures support in
</I>&gt;&gt;<i> higher order functions allows you to effectively return sequences of
</I>&gt;&gt;<i> sequences:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> (: Wrap a sequence as a function item :)
</I>&gt;&gt;<i> declare function local:ref($arg as item()*) as function() as item()*
</I>&gt;&gt;<i> {
</I>&gt;&gt;<i>    function() { $arg }
</I>&gt;&gt;<i> };
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> (: Unwrap a sequence from a function item :)
</I>&gt;&gt;<i> declare function local:deref($arg as function() as item()*) as item()*
</I>&gt;&gt;<i> {
</I>&gt;&gt;<i>    $arg()
</I>&gt;&gt;<i> };
</I>&gt;<i> 
</I>&gt;<i> This makes sense, though it would be a nuisance to have to define
</I>&gt;<i> ref() and deref() every time. Is there any consideration to make them
</I>&gt;<i> <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> library functions?
</I>
My recollection is that the WG considered adding them and rejected the 
idea on the grounds that functions that can be defined in XQuery itself 
better belong in something like EXPath function modules. It's highly 
likely that I'll submit such a module to EXPath in the future.

John

-- 
John Snelson, <a title="Oracle" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/oracle.html">Oracle</a> Corporation            http://snelson.org.uk/john
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dbxml.html">Berkeley DB XML</a>:            http://oracle.com/database/berkeley-db/xml
XQilla:                                  http://xqilla.sourceforge.net
</PRE>
]]></content></entry><entry><title>  Help with multiple deletes
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003463.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003463.html" /><updated>2009-09-01T16:35:13Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Thanks Martin, that works.  Except the 3rd delete doesn't run on the updated tree from the 2nd delete, so 2 copy statements are necessary.  Is there a different way to do this, so the delete statements operate on the updated tree w/o doing a copy each time?  i.e. some sort of piping construct ?

copy $x := doc(&quot;tree.<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>&quot;)
modify (
	delete node $x//tree[@ID = 1] /branch[@ID = 2] /branch[@ID = 13] /branch[@ID = 65] /branch[@ID = 15] /leaf[@ID = 25]
)
return
	copy $y := $x
	modify (
		delete node $y//tree//branch[count(.//leaf) = 0]
	)
	return
		copy $z := $y
		modify (
			delete node $z//tree[count(.//branch) = 0]
		)
		return $z

Thanks



-----Original Message-----
From: Martin Probst [mailto:http://x-query.com/mailman/listinfo/talk] 
Sent: Saturday, August 29, 2009 10:47 AM
To: Newman, John W
Cc: <a title="Michael Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>; http://x-query.com/mailman/listinfo/talk
Subject: Re:  Help with multiple deletes

&gt;<i> After I spent a nice chunk of time testing this in stylus studio, I took the
</I>&gt;<i> concept and ported it into our application.&#160; Only to discover that the
</I>&gt;<i> implementation we are using, MXQuery 0.6.0, does not support ancestor!
</I>&gt;<i> Argh..&#160; =)&#160; So if anyone thinks it can possibly be rewritten without using
</I>&gt;<i> ancestor (or any other axes I'm guessing), please share your thoughts.&#160; But
</I>&gt;<i> I think we are going to end up <a title="XSL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xsltedit1/xsltedit1.html">using an XSLT</a> for this operation.
</I>
You could simply transform twice, which might be less efficient, but
its certainly simpler to write:

copy $x := doc(&quot;tree.xml&quot;)
     modify (
         delete node $x//tree[@ID = 1] /branch[@ID = 2] /branch[@ID =
13] /branch[@ID = 65] /branch[@ID = 15] /leaf[@ID = 25]
     )
return
  copy $y := $x
  modify (
         delete node $x//tree//branch[count(.//leaf) = 0]
                ,
         delete node $x//tree[count(.//branch) = 0]
  )
  return $y

Martin

</PRE>
]]></content></entry><entry><title>  Tuple types
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003471.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003471.html" /><updated>2009-09-01T15:44:36Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi Pavel,

Tuple types won't make it into <a title="XQuery 1.1" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery 1.1</a>, but the closures support in 
higher order functions allows you to effectively return sequences of 
sequences:

(: Wrap a sequence as a function item :)
declare function local:ref($arg as item()*) as function() as item()*
{
     function() { $arg }
};

(: Unwrap a sequence from a function item :)
declare function local:deref($arg as function() as item()*) as item()*
{
     $arg()
};

John

Pavel Minaev wrote:
&gt;<i> I can't find the link now, but I recall seeing some mentions of a
</I>&gt;<i> possibility of introducing some form of tuple type (in a sense of an
</I>&gt;<i> aggregate of arbitrary-typed values - including sequences) in XQuery
</I>&gt;<i> 1.1, specifically to tackle the multiple-return-values and
</I>&gt;<i> sequences-of-sequences problems. Are there any recent developments on
</I>&gt;<i> the subject? I don't see anything like this in the most recent draft,
</I>&gt;<i> but then higher-order functions aren't there either, and yet, judging
</I>&gt;<i> by their presence in <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> 9.2, they are well-shaped by now.
</I>&gt;<i> 
</I>&gt;<i> If this isn't going to make it into 1.1, are there any other new
</I>&gt;<i> <a title="features" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_feature_overview.html">features</a> that I might have missed that would make it possible, for
</I>&gt;<i> example, for a function to return two sequences?
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>

-- 
John Snelson, <a title="Oracle" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/oracle.html">Oracle</a> Corporation            http://snelson.org.uk/john
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dbxml.html">Berkeley DB XML</a>:            http://oracle.com/database/berkeley-db/xml
XQilla:                                  http://xqilla.sourceforge.net
</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003470.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003470.html" /><updated>2009-09-01T13:34:02Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> why do developers and architects so stubbornly refuse just to _listen_ ?
</I>
Maybe we should try listening to them? To&#160;find out why they are not including xquery products in their architectures.
I can make a few guesses - 
&#160;
This are somethings that customers might tell you:
&#160;
1) until recently, no update was available - making it simply not a choice. 
2) there are some queries in my&#160;xquery <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_project.html">project</a>&#160;that don't&#160;perform well.&#160;Is this problem intrinsic to Xquery? The implementation? My xquery code? &#160;How do I fix it?(This is usually related to a join or predicate not pushed to a database because of the way the xquery was written.&#160; Often in a function that calls several other functions, that call other functions... eventually involving a thousand lines of xquery or so - making the exact problem difficult to locate)
3) I found the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_book.html">Books</a>/Authors <a title="An Introduction to XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery_primer.html">xquery examples</a> helpful.&#160;&#160;Now, I have 5,000 database tables, and I need to join up to 50 of them at a time.
Do you have any samples like that?
4) I want to include the output of a stored procedure that retuns an Object type in my xquery. How do I do that?
5) How can I use Xquery for <a title="ETL Tutorials" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/etl/">ETL</a>? (it needs to be better than my existing ETL tool).
&#160;
- Mike
&#160;
&#160;
&#160;
&#160; _____ &#160;

From: <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/daniela_florescu.html">Daniela Florescu</a> [mailto:http://x-query.com/mailman/listinfo/talk] 
Sent: Monday, August 31, 2009 3:39 PM
To: Hans-Juergen Rennau
Cc: http://x-query.com/mailman/listinfo/talk
Subject: Re:  size of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquerytalk/">XQuery developer</a> community




Only a few days ago it occurred to me that &quot;information processing language&quot; may be better than &quot;data processing language&quot;, 


Thanks for saying this. As soon as I hit the send button I remembered that I promised
myself never use &quot;data&quot; in connection to XML, but &quot;information&quot;.
(I am a database person, certain habits are hard to break....)

But yes, I would think too that XQuery is a declarative information processing language.



why do developers and architects so stubbornly refuse just to _listen_ ?



Because we don't talk to them (a) enough and (b) with a message that they understand.

I remember years ago, when I was really frustrated that architects would not _listen_ that Xquery
was this wonderful and useful thing, I asked advice from Jim Gray. He was always ready to listen and help,
and, even though he was too much of a believer in SQL and schemas to start embracing XQuery, he gave me&#160;
the following advice.

If you want people to listen then (a) write articles and give talks, (b) write software that works,&#160;
(c) make interesting <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_videos.html">demos</a>. Then repeat, and don't loose patience.

I think that at this point we have around XQuery lots of software that does work: databases, in memory
processors, etc.

What&#160;we&#160;can&#160;do&#160;is&#160;write&#160;more&#160;articles,&#160;give&#160;more&#160;talks (Web 2.0, eGov 2.0 anyone ?),&#160;and&#160;make more&#160;
interesting&#160;demos.

About demos: I am still surprised that nobody is trying XQuery's mashup strength on the examples
on&#160;http://www.programmableweb.com/. &#160;Wonderful site, BTW.

Or that noone is using XQuery on the http://www.data.gov/&#160;site and win the price of the best eGovernment application....


Best regards
Dana







With kind regards,
Hans-Juergen






----- Urspr&#252;ngliche Mail ----
Von: Daniela Florescu &lt;HYPERLINK &quot;mailto:http://x-query.com/mailman/listinfo/talk&quot;http://x-query.com/mailman/listinfo/talk&gt;
An: Hans-Juergen Rennau &lt;HYPERLINK &quot;mailto:http://x-query.com/mailman/listinfo/talk&quot;http://x-query.com/mailman/listinfo/talk&gt;
CC: HYPERLINK &quot;mailto:http://x-query.com/mailman/listinfo/talk&quot;http://x-query.com/mailman/listinfo/talk
Gesendet: Montag, den 31. August 2009, 08:58:34 Uhr
Betreff: Re:  size of XQuery developer community



a widespread lack of a _deep_ understanding of XML.



Hans-Juergen,

Yes, you are right. &#160;There is a deep misunderstanding in IT of our core message
about the role of XML in the new architectures. XML is not syntax, it can/should be
the primary way of modeling data. XQuery is not a query language (oh well), but a
full blown (declarative) data processing language.

However, if the world misunderstands it, it is hardly the world's fault.

It is that we do not express this message in a clear, concise and convincing enough
manner -- and probably not in the right places, either.

I hope we don't have to wait 20 years for the message to be heard....

Best regards
Dana





_______________________________________________
HYPERLINK &quot;mailto:http://x-query.com/mailman/listinfo/talk&quot;http://x-query.com/mailman/listinfo/talk
http://x-query.com/mailman/listinfo/talk


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090901/3ff1d2a6/attachment.htm
</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003462.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003462.html" /><updated>2009-09-01T13:13:18Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hans-Juergen Rennau schrieb:
&gt;<i>
</I>&gt;<i> of course you are right in that <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a> and <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> are built on the XDM,
</I>&gt;<i> not on <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> as a serialization format, and you are right in that the
</I>&gt;<i> XDM can be completely separated from the serialization format. But I
</I>&gt;<i> prefer to view XML and the XDM as one organic whole, and exactly this
</I>&gt;<i> is what I meant by the term &quot;deep understanding&quot;: an understanding
</I>&gt;<i> covering three _levels_ of XML: level #1: the lexical; level #2: the
</I>&gt;<i> inforset (= structural model totally unconcerned with aspects of
</I>&gt;<i> processing); level #3: the XDM extending the infoset in order to
</I>&gt;<i> embrace the reality of processing = a global information model which
</I>&gt;<i> preserves the structural achievements of the infoset and embeds it
</I>&gt;<i> into a stunningly flexible definition of information value. Each level
</I>&gt;<i> evolved from the previous one, I think, was it not so, historically?
</I>
Hallo Hans-J&#252;rgen,

historically, I'm a newbie; but the other day on <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xmldev/">XML-Dev</a>, one SGML/XML
veteran said that it was rather the work of &quot;ladling committees&quot; (had to
look up the word - seems similar to &quot;anflanschen&quot; in what it conveys)
ladling on patch after patch to XML.

RE: [xml-dev] Xml Revisited - Len Bullard
http://markmail.org/message/n5zscmypan4rzmaj

I really like this realistic view of things, but I also have a lot of
sympathy for idealistic interpretations.

As for the three levels you're referring to, I don't know enough about
level 2 - the XML InfoSet - in order to locate it in the scheme of
things.

What I've learnt (from Ken Holman) is that with XML, syntax came first,
and <a title="data models" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">data models</a> (plural) are an afterthought. Maybe a simple and obvious
thing to many, but - at least to me - crucial to understanding this
whole XML business. Like a lot of things, it only makes sense seen with
history in mind.

&gt;<i> This evolution is a wonderful achievement
</I>
Why not call it an Evolution? The process that has brought forth XML is
too visible in order for us to call it a Creation. And it works too well
to call it a Fabrication. (Although unfortunately, some fabrications
work pretty well, too.)

&gt;<i> and I am emphatically against &quot;marketing&quot; XQuery and XSLT as tree
</I>&gt;<i> processing languages, as if you could come along with some tree and
</I>&gt;<i> get it processed.
</I>
Well, you can. You just have to make sure your tree is represented in a
format amenable to an XML processing chain. Quite often, I start out
with documents like &lt;Urmel/&gt;, parse those into a <a title="org.w3c.dom" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">DOM</a> or XOM, and then
append data retrieved from various sources (HTTP, SQL, XQuery) to then
finally hand off the XML tree to XSLT and generate an HTML tree.

&gt;<i> What should be done is rather: encourage people to get familiar with
</I>&gt;<i> the new reality which XML (via XDM) constitutes: a global information
</I>&gt;<i> model of stunning power and flexibility, enabling <a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a>, XSLT, XQuery
</I>&gt;<i> and what is to come.
</I>&gt;<i>
</I>&gt;<i> A poet (Joseph Brodsky) once wrote: it is not so that the poets should
</I>&gt;<i> adopt the language of the masses; common people should adopt the
</I>&gt;<i> language of literature.
</I>
But common people have, to my knowledge, never done so; which is fine.
And if you take a look around today, I fear you'll have to concede that
there is movement, but in the opposite sense of what Brodsky deemed
desirable.

&gt;<i> In the realm of IT, XDM/XPath/XSLT/XQuery are like literature, and I
</I>&gt;<i> would not sell them for something else.
</I>
I agree there is beauty in it: the power and flexibility of the tree
navigation model.

Just consider that the computer has to perform some work to set up this
nice machinery; and while I find it often worth while doing so and
pretty convenient for me, I have to concede that it is not always
necessary.

-- 
Michael Ludwig
</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003474.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003474.html" /><updated>2009-09-01T12:40:42Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Wed Aug 26 17:39:05 PDT 2009, <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/daniela_florescu.html">Daniela Florescu</a> wrote:

&gt;<i> ... XQuery has tremendous potential for adding
</I>&gt;<i> value to customers, but the proof isn't there yet, and the path isn't
</I>&gt;<i> clear either.
</I>&gt;<i>
</I>&gt;<i> There has to be a larger XQuery pool of expertise ...
</I>
Hi Daniela - I finally got around to reading this entire thread thru
to 9/1. It's truly humbling to see how much about XQuery, XML, etc I
do not know.

But perhaps my newcomer status will provide a useful perspective.

First some quick background. I definitely don't yet qualify as an
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquerytalk/">XQuery developer</a>. But I've been working pretty conscientiously over
the past 4 or 5 months. I come to XQuery with decades of SQL, data
warehouse design, and policy analysis background (ie, I see databases
as a means to analysis, not an end in themselves). I got interested in
XQuery because I needed a tool that would let me query the Web in a
similar fashion to querying relational databases. The Web and web
query tools are still primitive by comparison, but I've been quite
pleased with what's possible. For example, my latest XQuery
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_videos.html">demonstration</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_project.html">project</a> mashed up US Dept of Education data with Federal
Reserve data to examine the question of whether higher education in
the US is countercyclical. See:
http://garymlewis.com/instchg/2009/08/10/another-xquery-use-case-is-higher-education-countercyclical/

Given a choice, I'll almost always choose tools with power and
capability versus those with ease-of-use but limited application. So,
for example, I'm willing to curse and beat my head against a wall
every time I use the R stat programs because I know that somehow
there's a solution in R and that someone in the R community will know
what the solution is.

I've probably written several thousand XQuery programs now. But I only
feel comfortable in a very narrow niche. There is just oodles about
XML and all the other X standards and tools that I do not know. Some
of this is surely just beginner's lament (ie, the notion that anything
you can't learn instantly is way too complex). But some too is a steep
learning curve in the absence of adequate support for learning.

You ask why there is not more XQuery expertise. The XQuery community
might benefit from looking at the R community [see:
http://www.r-project.org/ ] and the considerable help resources
available there. It's easier for a developer to get untracked with any
new tool if there is visible help available. With regard to R, I'm
talking here about specialized search sites, repositories of learning
materials, open source and free tools, dozens upon dozens of <a title="forums" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">forums</a>,
examples as code fragments, online <a title="books" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_book.html">books</a> and manuals, and a community
of very active R developers/enhancers.

I like XQuery a lot. I will continue to use it. And no doubt in the
course of using it, I'll fill in the many holes of what I don't know.
But I could sure benefit from something like an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/">XQuery learning</a>
resource site.

Gary
</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003468.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003468.html" /><updated>2009-09-01T12:33:51Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>This really is the interesting question.  My bet is something in search.
Given that all Excel/Word/Outlook/etc. documents are or can be represented
in XML, and that <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> text search doesn't do a great <a title="job " class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jobs.html">job </a>generally in
the space (top vendors in the <a title="enterprise" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/buy/why_enterprise.html">enterprise</a> use facets, entity extraction, and
other tricks to help the problem), <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> has a chance to be the syntax that
enables custom search solutions.  Someone on this list brought up MarkMail;
that's really all that is.  Banging out a search solution in a standard
language like XQ that's really good at dealing with semi-structured data is
simply easier than using other <a title="tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a>.

I honestly think that all the talk about XDM as a <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">data model</a> and XQ as a
turing complete declarative language, etc., is sort of moot unless they do
somehow enable something that RDBMS/BI/Data warehouses/search vendors can't
readily do with existing approaches.  If XQ is just an incremental
improvement, it will always be a marginal language (for example, that's how
I see the XQ scripting in the browser situation; it's simply not THAT much
better than JavaScript, and has the disadvantage of not having a million
libraries and code snippets and programmers).  I actually think that it is
much more than incremental in search, and it may be elsewhere as well.

-Rob


On Tue, Sep 1, 2009 at 4:50 AM, Andrew Welch &lt;http://x-query.com/mailman/listinfo/talk&gt;wrote:

&gt;<i> 2009/8/31 <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/daniela_florescu.html">Daniela Florescu</a> &lt;http://x-query.com/mailman/listinfo/talk&gt;:
</I>&gt;<i> &gt;&gt; why do developers and architects so stubbornly refuse just to _listen_ ?
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Because we don't talk to them (a) enough and (b) with a message that they
</I>&gt;<i> &gt; understand.
</I>&gt;<i>
</I>&gt;<i> What is the number one &quot;killer app&quot; for XQuery, shining example that
</I>&gt;<i> can be given to people when talking about XML databases - one that is
</I>&gt;<i> high profile enough that they may have heard of it?
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> Andrew Welch
</I>&gt;<i> http://andrewjwelch.com
</I>&gt;<i> Kernow: http://kernowforsaxon.sf.net/
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090901/9f688093/attachment.htm
</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003461.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003461.html" /><updated>2009-09-01T12:30:54Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> With all due respect, one major reason why <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a>/<a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a> isn't as popular
</I>&gt;<i> as many other programming languages has less to do with ignorance of it's
</I>&gt;<i> capabilities and more to do with it's 1) lack of performance, 2) overall
</I>&gt;<i> information bloat, and 3) unintuitive language constructs.
</I>
Regarding performance, we're certainly not at the performance levels
of relational databases, but I think for many cases we're &quot;good
enough&quot; (even though faster is always better/cheaper).

About language constructs: yes, there are some things which could have
been better in my opinion, but probably everyone has its own opinion
about that. My pet peeves are xmlns=&quot;&quot; declarations in literals that
change namespace scope, &quot;return&quot; that does not return, and the general
wordiness of the language. For my taste in languages, XQuery has much
too much syntax. This is one of the reasons why I wouldn't recommend
it as a general purpose programming language.

&gt;<i> Sure disk space is cheap and bandwidth is getting more *broad* every day,
</I>&gt;<i> and &quot;many elegant designs have been sacrificed for the sake of
</I>&gt;<i> performance...yada...yada...yada...&quot;, but at the end of the day, the same
</I>&gt;<i> data that can be represented in XML can be represented a lot more concise in
</I>&gt;<i> other platform-independent formats.
</I>
If you look at XML databases, you might find that they do not go
around and store angle brackets. In xDB's case, what ends up on the
hard drive is usually quite a bit smaller than the original XML (you
know, the one with angle brackets). So if you need to store and
process large amounts of XML, just pick the right <a title="tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a> - this is not
an inherent problem with XML.

What I find much more problematic is the amount of cruft XML by now
has, and which greatly complicates anything built on it. We have
processing instructions, <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dtd.html">DTDs</a>, notations, entity references, internal
DTD subsets, document fragments, and so on. All of these need to be
supported by XML processors at least to some degree, and they greatly
increase the conceptual surface of the language. I'd be willing to bet
that you can find some XML construct that behaves at least
unexpectedly in any larger XML processing tool, just because it's
getting increasingly difficult to cover all cases. This is where
simplified schemes such <a title="JSON XML Performance" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.xmlconverters.com/tutorials/json-and-xquery.html">as JSON</a> shine - they have a much smaller
&quot;surface&quot;.

Martin
</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003460.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003460.html" /><updated>2009-09-01T12:21:06Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Andrew Welch schrieb:

&gt;<i> What is the number one &quot;killer app&quot; for <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>, shining example that
</I>&gt;<i> can be given to people when talking about <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> databases - one that is
</I>&gt;<i> high profile enough that they may have heard of it?
</I>
Maybe Markmail. But being a commercial endeavour, it does not attract
a so-called &quot;community&quot;.

I haven't used eXist yet, but it looks very appealing.

Build a new open source bugtracker using XQuery on an app server like
eXist. If it works and looks nice and shiny, it'll catch the attention
of some developers. That way they will become interested in XQuery.

-- 
Michael Ludwig
</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003459.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003459.html" /><updated>2009-09-01T10:52:33Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>2009/8/29 Martin Probst &lt;http://x-query.com/mailman/listinfo/talk&gt;:
&gt;<i> <a title="JSON vs XML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.xmlconverters.com/tutorials/json-and-xquery.html">JSON</a> [expletive deleted] for mixed content, while XML/XQuery is pretty bad at
</I>&gt;<i> supporting key/value maps. Both is possible in each of them, but
</I>&gt;<i> painful.
</I>
Sequences of sequences would help here...



-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003458.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003458.html" /><updated>2009-09-01T10:50:48Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>2009/8/31 <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/daniela_florescu.html">Daniela Florescu</a> &lt;http://x-query.com/mailman/listinfo/talk&gt;:
&gt;&gt;<i> why do developers and architects so stubbornly refuse just to _listen_ ?
</I>&gt;<i>
</I>&gt;<i> Because we don't talk to them (a) enough and (b) with a message that they
</I>&gt;<i> understand.
</I>
What is the number one &quot;killer app&quot; for <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>, shining example that
can be given to people when talking about <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> databases - one that is
high profile enough that they may have heard of it?




-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003466.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003466.html" /><updated>2009-09-01T10:09:08Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i>  it will always be a marginal language (for example, that's how I  
</I>&gt;<i> see the XQ scripting in the browser situation; it's simply not THAT  
</I>&gt;<i> much better than JavaScript, and has the disadvantage of not having  
</I>&gt;<i> a million libraries and code snippets and programmers).
</I>

<a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> in the broswer's advantage is not the fact that you write  
better code then in Javascript
(I agree, good enough is good enough, and javascript is good enough).

The major advantage of XQuery in the browser is the fact that you can  
do data and query shipping from the
  server to the browser and back. The fact that you don't need to  
write the processing twice : once in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a> when
you want it to run  it on the App server, and once in Javascript when  
you want to run it in the client.

Same <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> data can be used on both sides, and same XQuery code can run  
on server and client, and you can decide
what to run where LATER.

That's a major problem with existing applications servers today: they  
cannot run in disconnected mode. You cannot take
your relational data and <a title="How to Access SQL Server Tables as XML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/sqlserver.html">SQL server</a> with you, plus the app server and  
download them on your laptop before you take a plane.

You CAN do that with XML and XQuery.

Best regards
Dana
</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003465.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003465.html" /><updated>2009-09-01T10:09:05Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>And let me add two more things that you could do with <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> that you  
can hardy do otherwise
-- because there are more cool :-)

6) virtualize it for the cloud execution.  Scale it up and down for  
cloud execution.
The more layers, and less declarative the layers, the harder is this  
to do.

7) automatically translate Xquery programs into parallel Hadoop  
programs.
This doesn't work with imperative programs.

Best regards
Dana




On Sep 1, 2009, at 8:55 AM, <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/daniela_florescu.html">Daniela Florescu</a> wrote:

&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I honestly think that all the talk about XDM as a <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">data model</a> and XQ  
</I>&gt;&gt;<i> as a turing complete declarative language, etc., is sort of moot  
</I>&gt;&gt;<i> unless they do somehow enable something that RDBMS/BI/Data  
</I>&gt;&gt;<i> warehouses/search vendors can't readily do with existing approaches.
</I>&gt;<i>
</I>&gt;<i> Well, that's relatively simple to answer, I would say.
</I>&gt;<i>
</I>&gt;<i> Here is are some examples of what you could do with XML/XQuery that  
</I>&gt;<i> you cannot do with the traditional three
</I>&gt;<i> tier stack (communication + application logic written in an  
</I>&gt;<i> imperative language + declarative query layer)
</I>&gt;<i>
</I>&gt;<i> 1. Have <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> flexibility. Start writing code without a fixed idea  
</I>&gt;<i> of your schema, and/or change
</I>&gt;<i> your mind later. (one schema is evil enough, three layers of  
</I>&gt;<i> superimposed schemas, in three different models,
</I>&gt;<i> are exponentially evil for flexibility and customizability. Almost  
</I>&gt;<i> no evolution of schema is possible.)
</I>&gt;<i>
</I>&gt;<i> 2. Integrate text and documents into your information processing  
</I>&gt;<i> flow without adding software license, yet another layer,
</I>&gt;<i> more mappings, and different programming languages.
</I>&gt;<i>
</I>&gt;<i> 3. Optimize the performance of your information processing program  
</I>&gt;<i> globally, not locally, layer by layer,
</I>&gt;<i> by adding more and more intermediate caches and shortcuts, which in  
</I>&gt;<i> turn will turn your code <a title="maintenance" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/maintenance_policy.html">maintenance</a> a nightmare.
</I>&gt;<i>
</I>&gt;<i> 4. Be done in 2 weeks instead of 10 months. Time to market, by  
</I>&gt;<i> writing significantly less amount
</I>&gt;<i> of code, layer to layer connectors, plus data mappers from one model  
</I>&gt;<i> to another, etc, etc. Less
</I>&gt;<i> useless and redundant code to write and later deal  with.
</I>&gt;<i>
</I>&gt;<i> 5. Spend less time maintaining the code. If the XQuery optimizer is  
</I>&gt;<i> doing a good <a title="job" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jobs.html">job</a>, you don't need
</I>&gt;<i> to constantly rewrite your code to fix performance problems, as you  
</I>&gt;<i> do in <a title="java" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">java</a>. Plus less number of lines of
</I>&gt;<i> code usually means less bugs. So smaller total cost of ownership of  
</I>&gt;<i> the code.
</I>&gt;<i>
</I>&gt;<i> That would be my quick personal answer.
</I>&gt;<i>
</I>&gt;<i> But that of course works if you know what you are doing with  
</I>&gt;<i> XQuery ....
</I>&gt;<i>
</I>&gt;<i> Best
</I>&gt;<i> Dana
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;&gt;<i> If XQ is just an incremental improvement, it will always be a  
</I>&gt;&gt;<i> marginal language (for example, that's how I see the XQ scripting  
</I>&gt;&gt;<i> in the browser situation; it's simply not THAT much better than  
</I>&gt;&gt;<i> JavaScript, and has the disadvantage of not having a million  
</I>&gt;&gt;<i> libraries and code snippets and programmers).  I actually think  
</I>&gt;&gt;<i> that it is much more than incremental in search, and it may be  
</I>&gt;&gt;<i> elsewhere as well.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> -Rob
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> On Tue, Sep 1, 2009 at 4:50 AM, Andrew Welch &lt;http://x-query.com/mailman/listinfo/talk 
</I>&gt;&gt;<i> &gt; wrote:
</I>&gt;&gt;<i> 2009/8/31 Daniela Florescu &lt;http://x-query.com/mailman/listinfo/talk&gt;:
</I>&gt;&gt;<i> &gt;&gt; why do developers and architects so stubbornly refuse just to  
</I>&gt;&gt;<i> _listen_ ?
</I>&gt;&gt;<i> &gt;
</I>&gt;&gt;<i> &gt; Because we don't talk to them (a) enough and (b) with a message  
</I>&gt;&gt;<i> that they
</I>&gt;&gt;<i> &gt; understand.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> What is the number one &quot;killer app&quot; for XQuery, shining example that
</I>&gt;&gt;<i> can be given to people when talking about XML databases - one that is
</I>&gt;&gt;<i> high profile enough that they may have heard of it?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> --
</I>&gt;&gt;<i> Andrew Welch
</I>&gt;&gt;<i> http://andrewjwelch.com
</I>&gt;&gt;<i> Kernow: http://kernowforsaxon.sf.net/
</I>&gt;&gt;<i> _______________________________________________
</I>&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090901/d6058752/attachment.htm
</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003464.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003464.html" /><updated>2009-09-01T09:55:54Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> I honestly think that all the talk about XDM as a <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">data model</a> and XQ  
</I>&gt;<i> as a turing complete declarative language, etc., is sort of moot  
</I>&gt;<i> unless they do somehow enable something that RDBMS/BI/Data  
</I>&gt;<i> warehouses/search vendors can't readily do with existing approaches.
</I>
Well, that's relatively simple to answer, I would say.

Here is are some examples of what you could do with XML/<a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> that  
you cannot do with the traditional three
tier stack (communication + application logic written in an imperative  
language + declarative query layer)

1. Have <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> flexibility. Start writing code without a fixed idea of  
your schema, and/or change
your mind later. (one schema is evil enough, three layers of  
superimposed schemas, in three different models,
are exponentially evil for flexibility and customizability. Almost no  
evolution of schema is possible.)

2. Integrate text and documents into your information processing flow  
without adding software license, yet another layer,
more mappings, and different programming languages.

3. Optimize the performance of your information processing program  
globally, not locally, layer by layer,
by adding more and more intermediate caches and shortcuts, which in  
turn will turn your code <a title="maintenance" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/maintenance_policy.html">maintenance</a> a nightmare.

4. Be done in 2 weeks instead of 10 months. Time to market, by writing  
significantly less amount
of code, layer to layer connectors, plus data mappers from one model  
to another, etc, etc. Less
useless and redundant code to write and later deal  with.

5. Spend less time maintaining the code. If the XQuery optimizer is  
doing a good <a title="job" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jobs.html">job</a>, you don't need
to constantly rewrite your code to fix performance problems, as you do  
in <a title="java" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">java</a>. Plus less number of lines of
code usually means less bugs. So smaller total cost of ownership of  
the code.

That would be my quick personal answer.

But that of course works if you know what you are doing with XQuery ....

Best
Dana








&gt;<i> If XQ is just an incremental improvement, it will always be a  
</I>&gt;<i> marginal language (for example, that's how I see the XQ scripting in  
</I>&gt;<i> the browser situation; it's simply not THAT much better than  
</I>&gt;<i> JavaScript, and has the disadvantage of not having a million  
</I>&gt;<i> libraries and code snippets and programmers).  I actually think that  
</I>&gt;<i> it is much more than incremental in search, and it may be elsewhere  
</I>&gt;<i> as well.
</I>&gt;<i>
</I>&gt;<i> -Rob
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> On Tue, Sep 1, 2009 at 4:50 AM, Andrew Welch  
</I>&gt;<i> &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
</I>&gt;<i> 2009/8/31 <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/daniela_florescu.html">Daniela Florescu</a> &lt;http://x-query.com/mailman/listinfo/talk&gt;:
</I>&gt;<i> &gt;&gt; why do developers and architects so stubbornly refuse just to  
</I>&gt;<i> _listen_ ?
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Because we don't talk to them (a) enough and (b) with a message  
</I>&gt;<i> that they
</I>&gt;<i> &gt; understand.
</I>&gt;<i>
</I>&gt;<i> What is the number one &quot;killer app&quot; for XQuery, shining example that
</I>&gt;<i> can be given to people when talking about XML databases - one that is
</I>&gt;<i> high profile enough that they may have heard of it?
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> Andrew Welch
</I>&gt;<i> http://andrewjwelch.com
</I>&gt;<i> Kernow: http://kernowforsaxon.sf.net/
</I>&gt;<i> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090901/8519c99c/attachment.htm
</PRE>
]]></content></entry><entry><title>  Tuple types
   </title><id>http://www.stylusstudio.com/xquerytalk/200909/003467.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200909/003467.html" /><updated>2009-09-01T09:21:28Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Tue, Sep 1, 2009 at 6:44 AM, John Snelson&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Tuple types won't make it into <a title="XQuery 1.1" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery 1.1</a>, but the closures support in
</I>&gt;<i> higher order functions allows you to effectively return sequences of
</I>&gt;<i> sequences:
</I>&gt;<i>
</I>&gt;<i> (: Wrap a sequence as a function item :)
</I>&gt;<i> declare function local:ref($arg as item()*) as function() as item()*
</I>&gt;<i> {
</I>&gt;<i> &#160; &#160;function() { $arg }
</I>&gt;<i> };
</I>&gt;<i>
</I>&gt;<i> (: Unwrap a sequence from a function item :)
</I>&gt;<i> declare function local:deref($arg as function() as item()*) as item()*
</I>&gt;<i> {
</I>&gt;<i> &#160; &#160;$arg()
</I>&gt;<i> };
</I>
This makes sense, though it would be a nuisance to have to define
ref() and deref() every time. Is there any consideration to make them
<a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> library functions?

</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200908/003451.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200908/003451.html" /><updated>2009-08-31T20:55:03Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE><a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/daniela_florescu.html">Daniela Florescu</a> schrieb:
&gt;&gt;<i> a widespread lack of a _deep_ understanding of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a>.
</I>&gt;<i>
</I>&gt;<i> Hans-Juergen,
</I>&gt;<i>
</I>&gt;<i> Yes, you are right.  There is a deep misunderstanding in IT of our
</I>&gt;<i> core message about the role of XML in the new architectures.
</I>
What is that core message? (If it is not what I'm going to write below.)

&gt;<i> XML is not syntax, it can/should be the primary way of modeling data.
</I>
To <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a> and <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>, XML is <a title="XPath Software" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">the XPath</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">Data Model</a>, which - I think - could
exist quite merrily without a serialization format.

To the Programming World, XML is the angle-bracket serialization format.
I've heard XML experts say that the Programming World does not like
angle brackets. (I don't know if this is true, but I've seen a lot of
editors that hide the angle brackets.) I think that some people do not
like the verboseness of the XML serialization format.

XML, which isn't SGML, cannot change its serialization format without
major disruptions.

The XPath Data Model seems to have an alternative serialization format
in XQuery: element bla { attribute blub { ... } }.

But instead of mucking about with the serialization format, wouldn't it
be more clever to market XQuery and XSLT as Tree Processing Languages?

(Being very careful, bien entendu, not to come dangerously close
to deforestation operations in order not to scare away the
environmentalists.)

Trees enjoy a pretty good reputation. Much better than angle brackets!

&gt;<i> XQuery is not a query language (oh well), but a full blown
</I>&gt;<i> (declarative) data processing language.
</I>
Well, but it typically lives where there is XML data, and it is
typically used to query that data. It looks very well integrated
to me. Isn't this a big plus?

-- 
Michael Ludwig
</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200908/003454.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200908/003454.html" /><updated>2009-08-31T19:21:35Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>With all due respect, one major reason why <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a>/<a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a> isn't as popular
as many other programming languages has less to do with ignorance of it's
capabilities and more to do with it's 1) lack of performance, 2) overall
information bloat, and 3) unintuitive language constructs.

Sure disk space is cheap and bandwidth is getting more *broad* every day,
and &quot;many elegant designs have been sacrificed for the sake of
performance...yada...yada...yada...&quot;, but at the end of the day, the same
data that can be represented in XML can be represented a lot more concise in
other platform-independent formats.  I won't even get into the whole
information density argument which can be Googled.

It's been my experience (19+ years of professional software development)
that there is not a one-size-fits-all solution.  i.e. my <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tool</a> belt has more
than just a hammer. ;-)


On Mon, Aug 31, 2009 at 5:37 PM, Hans-Juergen Rennau &lt;http://x-query.com/mailman/listinfo/talk&gt;wrote:

&gt;<i> Hello Michael,
</I>&gt;<i>
</I>&gt;<i> of course you are right in that XSLT and XQuery are built on the XDM, not
</I>&gt;<i> on XML as a serialization format, and you are right in that the XDM can be
</I>&gt;<i> completely separated from the serialization format. But I prefer to view XML
</I>&gt;<i> and the XDM as one organic whole, and exactly this is what I meant by the
</I>&gt;<i> term &quot;deep understanding&quot;: an understanding covering three _levels_ of XML:
</I>&gt;<i> level #1: the lexical; level #2: the inforset (= structural model totally
</I>&gt;<i> unconcerned with aspects of processing); level #3: the XDM extending the
</I>&gt;<i> infoset in order to embrace the reality of processing = a global information
</I>&gt;<i> model which preserves the structural achievements of the infoset and embeds
</I>&gt;<i> it into a stunningly flexible definition of information value. Each level
</I>&gt;<i> evolved from the previous one, I think, was it not so, historically?
</I>&gt;<i>
</I>&gt;<i> This evolution is a wonderful achievement, and I am emphatically against
</I>&gt;<i> &quot;marketing&quot; XQuery and XSLT as tree processing languages, as if you could
</I>&gt;<i> come along with some tree and get it processed. What should be done is
</I>&gt;<i> rather: encourage people to get familiar with the new reality which XML (via
</I>&gt;<i> XDM) constitutes: a global information model of stunning power and
</I>&gt;<i> flexibility, enabling <a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a>, XSLT, XQuery and what is to come.
</I>&gt;<i>
</I>&gt;<i> A poet (Joseph Brodsky) once wrote: it is not so that the poets should
</I>&gt;<i> adopt the language of the masses; common people should adopt the language of
</I>&gt;<i> literature. In the realm of IT, XDM/XPath/XSLT/XQuery are like literature,
</I>&gt;<i> and I would not sell them for something else.
</I>&gt;<i>
</I>
-- 
A. Steven Anderson
Independent Consultant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090831/23f3f12b/attachment.htm
</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200908/003457.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200908/003457.html" /><updated>2009-08-31T17:32:46Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> I remember years ago, when I was really frustrated that architects  
</I>&gt;<i> would not _listen_ that <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">Xquery</a>
</I>&gt;<i> was this wonderful and useful thing, I asked advice from Jim Gray.  
</I>&gt;<i> He was always ready to listen and help,
</I>&gt;<i> and, even though he was too much of a believer in SQL and schemas to  
</I>&gt;<i> start embracing XQuery, he gave me
</I>&gt;<i> the following advice.
</I>&gt;<i>
</I>&gt;<i> If you want people to listen then (a) write articles and give talks,  
</I>&gt;<i> (b) write software that works,
</I>&gt;<i> (c) make interesting <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_videos.html">demos</a>. Then repeat, and don't loose patience.
</I>&gt;<i>
</I>&gt;<i> I think that at this point we have around XQuery lots of software  
</I>&gt;<i> that does work: databases, in memory
</I>&gt;<i> processors, etc.
</I>&gt;<i>
</I>&gt;<i> What we can do is write more articles, give more talks (Web 2.0,  
</I>&gt;<i> eGov 2.0 anyone ?), and make more
</I>&gt;<i> interesting demos.
</I>&gt;<i>
</I>&gt;<i> About demos: I am still surprised that nobody is trying XQuery's  
</I>&gt;<i> mashup strength on the examples
</I>&gt;<i> on http://www.programmableweb.com/.  Wonderful site, BTW.
</I>

I just don't think a language that feels it is acceptable for more  
than a few typeswitch cases is worthwhile (OK, I have my helmet on).  
XQuery has the simplicity to be able to run on an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> DB. That is it's  
main selling point. <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSL</a> can do much better if it could run on an XML  
DB. As for XQuery as a web application or scripting language, I think  
there are better.


&gt;<i>
</I>&gt;<i> Or that noone is using XQuery on the http://www.data.gov/ site and  
</I>&gt;<i> win the <a title="price" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/buy/">price</a> of the best eGovernment application....
</I>
Or, why isn't the data transparent so we can see what we pay for?
</PRE>
]]></content></entry><entry><title> AW:  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200908/003456.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200908/003456.html" /><updated>2009-08-31T16:52:55Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Yes, of course there are <a title="DOM Specification" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">domains where XML</a> cannot be afforded due to performance and data volume issues. I suggest that we take this for granted, I assure you there is no &quot;one-size-fits-all&quot; ambition - let us now consider the domains where those issues do not play a primary role.

Your hints interest me very much: you speak of other, more concise and platform-independent formats. So they may be regarded as siblings of XML as a serialization format - siblings of level #1 XML, so to speak. Please tell me - are they also embedded into an information model which might be compared with level #3 XML - the XDM - supporting hierarchy, order and processing? An information model that does, or in principle could, support a pure expression language like <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>?

With kind regards,
Hans-Juergen Rennau





________________________________
Von: A. Steven Anderson &lt;http://x-query.com/mailman/listinfo/talk&gt;
An: Hans-Juergen Rennau &lt;http://x-query.com/mailman/listinfo/talk&gt;
CC: http://x-query.com/mailman/listinfo/talk; http://x-query.com/mailman/listinfo/talk; http://x-query.com/mailman/listinfo/talk
Gesendet: Montag, den 31. August 2009, 15:21:35 Uhr
Betreff: Re:  size of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquerytalk/">XQuery developer</a> community

With all due respect, one major reason why XML/XQuery/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a> isn't as popular as many other programming languages has less to do with ignorance of it's capabilities and more to do with it's 1) lack of performance, 2) overall information bloat, and 3) unintuitive language constructs.

Sure disk space is cheap and bandwidth is getting more *broad* every day, and &quot;many elegant designs have been sacrificed for the sake of performance...yada...yada...yada...&quot;, but at the end of the day, the same data that can be represented in XML can be represented a lot more concise in other platform-independent formats.  I won't even get into the whole information density argument which can be Googled.

It's been my experience (19+ years of professional software development) that there is not a one-size-fits-all solution.  i.e. my <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tool</a> belt has more than just a hammer. ;-)

-- 
A. Steven Anderson
Independent Consultant


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090831/6ea3f8a3/attachment-0001.htm
</PRE>
]]></content></entry><entry><title>  size of XQuery developer community
   </title><id>http://www.stylusstudio.com/xquerytalk/200908/003455.html</id><link rel="alternate" type="text/html" href="http://www.styl