﻿<?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>2010-02-09T16:22:33Z</updated><entry><title>  Function Copy error
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003815.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003815.html" /><updated>2010-02-08T19:30:01Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Yes. Its very easy to do <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>. Just I want try to do any
possibility using <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>.

I saw that

Generating Multiple XML documents Using XQuery

http://www.datadirect.com/developer/data-integration/tutorials/xml-output/index.ssp


Thanks
Byomokesh


On Mon, Feb 8, 2010 at 6:32 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;<i>
</I>&gt;<i> There is no function called copy(). What made you think there was, and what did you expect it do?
</I>&gt;<i>
</I>&gt;<i> XQuery doesn't really have a way to write multiple result documents. You could do it by returning a sequence of document nodes to the application, and then having the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a> application serialize them and write them to disk, but it would have to know where to write them. It's easier to achieve this in XSLT:
</I>&gt;<i>
</I>&gt;<i> &lt;xsl:template match=&quot;row&quot;&gt;
</I>&gt;<i> &#160; &lt;xsl:result-document href=&quot;{Term}.xml&quot;&gt;
</I>&gt;<i> &#160;&#160;&#160;&#160; &lt;xsl:copy-of select=&quot;.&quot;/&gt;
</I>&gt;<i> &#160; &lt;/xsl:result-document&gt;
</I>&gt;<i> &lt;/xsl:template&gt;
</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 Behalf Of Byomokesh Sahoo
</I>&gt;<i> Sent: 08 February 2010 12:14
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject:  Function Copy error
</I>&gt;<i>
</I>&gt;<i> Hi,
</I>&gt;<i>
</I>&gt;<i> I want split the one xml to multiple <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> using xquery. But it showing error function copy. Please see the below code and give some point out.
</I>&gt;<i>
</I>&gt;<i> XML
</I>&gt;<i>
</I>&gt;<i> &lt;root&gt;
</I>&gt;<i> &#160;&#160;&#160; &lt;row&gt;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Term&gt;Hi&lt;/Term&gt;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Definition&gt;An informal short greeting.&lt;/Definition&gt;
</I>&gt;<i> &#160;&#160;&#160; &lt;/row&gt;
</I>&gt;<i> &#160;&#160;&#160; &lt;row&gt;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Term&gt;Hello&lt;/Term&gt;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Definition&gt;A more formal greeting.&lt;/Definition&gt;
</I>&gt;<i> &#160;&#160;&#160; &lt;/row&gt;
</I>&gt;<i> &lt;/root&gt;
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> let $input-document := 'splitfile.xml'
</I>&gt;<i> let $collection := 'file///D:/temp'
</I>&gt;<i>
</I>&gt;<i> &#160;&#160;&#160;&#160; for $term-data in doc($input-document)/root/row
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160; let $term-name := $term-data/Term/text()
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160; let $documentname := concat($term-name, '.xml')
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160; let $store-return := copy($collection, $documentname, $term-data)
</I>&gt;<i>
</I>&gt;<i> &#160;&#160;&#160;&#160; return
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;store-result&gt;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;store&gt;{$term-name}&lt;/store&gt;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;documentname&gt;{$documentname}&lt;/documentname&gt;
</I>&gt;<i> &#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/store-result&gt;
</I>&gt;<i>
</I>&gt;<i> I am using <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
</I>&gt;<i>
</I>&gt;<i> Thanks
</I>&gt;<i> Byomokesh
</I>
</PRE>
]]></content></entry><entry><title>  Function Copy error
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003813.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003813.html" /><updated>2010-02-08T17:43:42Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,

I want split the one <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> to multiple <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> using <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>. But it showing
error function copy. Please see the below code and give some point out.

XML

&lt;root&gt;
    &lt;row&gt;
        &lt;Term&gt;Hi&lt;/Term&gt;
        &lt;Definition&gt;An informal short greeting.&lt;/Definition&gt;
    &lt;/row&gt;
    &lt;row&gt;
        &lt;Term&gt;Hello&lt;/Term&gt;
        &lt;Definition&gt;A more formal greeting.&lt;/Definition&gt;
    &lt;/row&gt;
&lt;/root&gt;



let $input-document := 'splitfile.xml'
let $collection := 'file///D:/temp'

     for $term-data in doc($input-document)/root/row
                let $term-name := $term-data/Term/text()
        let $documentname := concat($term-name, '.xml')
        let $store-return := copy($collection, $documentname, $term-data)

     return
        &lt;store-result&gt;
           &lt;store&gt;{$term-name}&lt;/store&gt;
           &lt;documentname&gt;{$documentname}&lt;/documentname&gt;
        &lt;/store-result&gt;

I am using <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

Thanks
Byomokesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100208/d21cecb4/attachment.htm
</PRE>
]]></content></entry><entry><title>  Function Copy error
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003817.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003817.html" /><updated>2010-02-08T16:00:56Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>The example uses ddtek:serialize-to-uri() which is a DataDirect vendor
extension. It doesn't use copy().

You could use similar logic 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> (and any other product that supports
<a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> Updates) by enabling XQuery Update and using the put() function. 

http://www.w3.org/TR/xquery-update-10/#id-func-put

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 Byomokesh Sahoo
</I>&gt;<i> Sent: 08 February 2010 14:00
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject: Re:  Function Copy error
</I>&gt;<i> 
</I>&gt;<i> Yes. Its very easy to do <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>. Just I want try to do 
</I>&gt;<i> any possibility using XQuery.
</I>&gt;<i> 
</I>&gt;<i> I saw that
</I>&gt;<i> 
</I>&gt;<i> Generating Multiple XML documents Using XQuery
</I>&gt;<i> 
</I>&gt;<i> http://www.datadirect.com/developer/data-integration/tutorials
</I>&gt;<i> /xml-output/index.ssp
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i> Thanks
</I>&gt;<i> Byomokesh
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i> On Mon, Feb 8, 2010 at 6:32 PM, Michael Kay &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; There is no function called copy(). What made you think 
</I>&gt;<i> there was, and what did you expect it do?
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; XQuery doesn't really have a way to write multiple result 
</I>&gt;<i> documents. You could do it by returning a sequence of 
</I>&gt;<i> document nodes to the application, and then having the <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>&gt;<i> application serialize them and write them to disk, but it 
</I>&gt;<i> would have to know where to write them. It's easier to 
</I>&gt;<i> achieve this in XSLT:
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; &lt;xsl:template match=&quot;row&quot;&gt;
</I>&gt;<i> &gt; &#160; &lt;xsl:result-document href=&quot;{Term}.xml&quot;&gt;
</I>&gt;<i> &gt; &#160;&#160;&#160;&#160; &lt;xsl:copy-of select=&quot;.&quot;/&gt;
</I>&gt;<i> &gt; &#160; &lt;/xsl:result-document&gt;
</I>&gt;<i> &gt; &lt;/xsl:template&gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Regards,
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Michael Kay
</I>&gt;<i> &gt; http://www.saxonica.com/
</I>&gt;<i> &gt; http://twitter.com/michaelhkay
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; ________________________________
</I>&gt;<i> &gt; From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On 
</I>&gt;<i> &gt; Behalf Of Byomokesh Sahoo
</I>&gt;<i> &gt; Sent: 08 February 2010 12:14
</I>&gt;<i> &gt; To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> &gt; Subject:  Function Copy error
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Hi,
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; I want split the one xml to multiple <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> using xquery. 
</I>&gt;<i> But it showing error function copy. Please see the below code 
</I>&gt;<i> and give some point out.
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; XML
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; &lt;root&gt;
</I>&gt;<i> &gt; &#160;&#160;&#160; &lt;row&gt;
</I>&gt;<i> &gt; &#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Term&gt;Hi&lt;/Term&gt;
</I>&gt;<i> &gt; &#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Definition&gt;An informal short greeting.&lt;/Definition&gt;
</I>&gt;<i> &gt; &#160;&#160;&#160; &lt;/row&gt;
</I>&gt;<i> &gt; &#160;&#160;&#160; &lt;row&gt;
</I>&gt;<i> &gt; &#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Term&gt;Hello&lt;/Term&gt;
</I>&gt;<i> &gt; &#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Definition&gt;A more formal greeting.&lt;/Definition&gt;
</I>&gt;<i> &gt; &#160;&#160;&#160; &lt;/row&gt;
</I>&gt;<i> &gt; &lt;/root&gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; let $input-document := 'splitfile.xml'
</I>&gt;<i> &gt; let $collection := 'file///D:/temp'
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; &#160;&#160;&#160;&#160; for $term-data in doc($input-document)/root/row
</I>&gt;<i> &gt; &#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160; let $term-name := $term-data/Term/text()
</I>&gt;<i> &gt; &#160;&#160;&#160;&#160;&#160;&#160;&#160; let $documentname := concat($term-name, '.xml')
</I>&gt;<i> &gt; &#160;&#160;&#160;&#160;&#160;&#160;&#160; let $store-return := copy($collection, $documentname, 
</I>&gt;<i> &gt; $term-data)
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; &#160;&#160;&#160;&#160; return
</I>&gt;<i> &gt; &#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;store-result&gt;
</I>&gt;<i> &gt; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;store&gt;{$term-name}&lt;/store&gt;
</I>&gt;<i> &gt; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;documentname&gt;{$documentname}&lt;/documentname&gt;
</I>&gt;<i> &gt; &#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/store-result&gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; I am using saxon 9.2
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Thanks
</I>&gt;<i> &gt; Byomokesh
</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>  Function Copy error
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003814.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003814.html" /><updated>2010-02-08T13:02:35Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>There is no function called copy(). What made you think there was, and what
did you expect it do?
 
<a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> doesn't really have a way to write multiple result documents. You
could do it by returning a sequence of document nodes to the application,
and then having the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a> application serialize them and write them to disk,
but it would have to know where to write them. It's easier to achieve this
in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>:
 
&lt;xsl:template match=&quot;row&quot;&gt;
  &lt;xsl:result-document href=&quot;{Term}.xml&quot;&gt;
     &lt;xsl:copy-of select=&quot;.&quot;/&gt;
  &lt;/xsl:result-document&gt;
&lt;/xsl:template&gt;
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 Byomokesh Sahoo
Sent: 08 February 2010 12:14
To: http://x-query.com/mailman/listinfo/talk
Subject:  Function Copy error


Hi,

I want split the one xml to multiple <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> using xquery. But it showing
error function copy. Please see the below code and give some point out.

XML

&lt;root&gt;
    &lt;row&gt;
        &lt;Term&gt;Hi&lt;/Term&gt;
        &lt;Definition&gt;An informal short greeting.&lt;/Definition&gt;
    &lt;/row&gt;
    &lt;row&gt;
        &lt;Term&gt;Hello&lt;/Term&gt;
        &lt;Definition&gt;A more formal greeting.&lt;/Definition&gt;
    &lt;/row&gt;
&lt;/root&gt;



let $input-document := 'splitfile.xml'
let $collection := 'file///D:/temp'
 
     for $term-data in doc($input-document)/root/row
                let $term-name := $term-data/Term/text()
        let $documentname := concat($term-name, '.xml')
        let $store-return := copy($collection, $documentname, $term-data)

     return
        &lt;store-result&gt;
           &lt;store&gt;{$term-name}&lt;/store&gt;
           &lt;documentname&gt;{$documentname}&lt;/documentname&gt;
        &lt;/store-result&gt;

I am using <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

Thanks
Byomokesh


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100208/085d4c59/attachment.htm
</PRE>
]]></content></entry><entry><title>  Function Copy error
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003816.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003816.html" /><updated>2010-02-08T09:39:47Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>This (<a title="Multi-Channel Publishing" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/multi_channel_publishing.html">multiple output</a> files)  is a data direct specific feature.

If you'd like to use <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 XQuery but avoid writing custom <a title="java" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">java</a> code, 
you might consider xmlsh.
www.xmlsh.org

The command &quot;xsplit&quot; will split documents of the sort you describe.
http://www.xmlsh.org/CommandXsplit

Combined with the the command  xmove
http://www.xmlsh.org/CommandXmove

Will rename the files in bulk based on an <a title="XPath Syntax" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath_evaluator.html">xpath expression</a>.


But the xslt example Mr. Kay suggested looks easier :)

( fyi you can run xslt as a post process to your xquery code in your 
language of choice, including xmlsh).
   xquery ... | xslt ...




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


--------------------------------------------------
From: &quot;Byomokesh Sahoo&quot; &lt;http://x-query.com/mailman/listinfo/talk&gt;
Sent: Monday, February 08, 2010 9:00 AM
To: &lt;http://x-query.com/mailman/listinfo/talk&gt;
Subject: Re:  Function Copy error

&gt;<i> Yes. Its very easy to do <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>. Just I want try to do any
</I>&gt;<i> possibility using XQuery.
</I>&gt;<i>
</I>&gt;<i> I saw that
</I>&gt;<i>
</I>&gt;<i> Generating Multiple XML documents Using XQuery
</I>&gt;<i>
</I>&gt;<i> http://www.datadirect.com/developer/data-integration/tutorials/xml-output/index.ssp
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Thanks
</I>&gt;<i> Byomokesh
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> On Mon, Feb 8, 2010 at 6:32 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:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> There is no function called copy(). What made you think there was, and 
</I>&gt;&gt;<i> what did you expect it do?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> XQuery doesn't really have a way to write multiple result documents. You 
</I>&gt;&gt;<i> could do it by returning a sequence of document nodes to the application, 
</I>&gt;&gt;<i> and then having the Java application serialize them and write them to 
</I>&gt;&gt;<i> disk, but it would have to know where to write them. It's easier to 
</I>&gt;&gt;<i> achieve this in XSLT:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &lt;xsl:template match=&quot;row&quot;&gt;
</I>&gt;&gt;<i>   &lt;xsl:result-document href=&quot;{Term}.xml&quot;&gt;
</I>&gt;&gt;<i>      &lt;xsl:copy-of select=&quot;.&quot;/&gt;
</I>&gt;&gt;<i>   &lt;/xsl:result-document&gt;
</I>&gt;&gt;<i> &lt;/xsl:template&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Regards,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Michael Kay
</I>&gt;&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;&gt;<i> http://twitter.com/michaelhkay
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> ________________________________
</I>&gt;&gt;<i> From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On 
</I>&gt;&gt;<i> Behalf Of Byomokesh Sahoo
</I>&gt;&gt;<i> Sent: 08 February 2010 12:14
</I>&gt;&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i> Subject:  Function Copy error
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Hi,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I want split the one xml to multiple xml file using xquery. But it 
</I>&gt;&gt;<i> showing error function copy. Please see the below code and give some 
</I>&gt;&gt;<i> point out.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> XML
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &lt;root&gt;
</I>&gt;&gt;<i>     &lt;row&gt;
</I>&gt;&gt;<i>         &lt;Term&gt;Hi&lt;/Term&gt;
</I>&gt;&gt;<i>         &lt;Definition&gt;An informal short greeting.&lt;/Definition&gt;
</I>&gt;&gt;<i>     &lt;/row&gt;
</I>&gt;&gt;<i>     &lt;row&gt;
</I>&gt;&gt;<i>         &lt;Term&gt;Hello&lt;/Term&gt;
</I>&gt;&gt;<i>         &lt;Definition&gt;A more formal greeting.&lt;/Definition&gt;
</I>&gt;&gt;<i>     &lt;/row&gt;
</I>&gt;&gt;<i> &lt;/root&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> let $input-document := 'splitfile.xml'
</I>&gt;&gt;<i> let $collection := 'file///D:/temp'
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>      for $term-data in doc($input-document)/root/row
</I>&gt;&gt;<i>                 let $term-name := $term-data/Term/text()
</I>&gt;&gt;<i>         let $documentname := concat($term-name, '.xml')
</I>&gt;&gt;<i>         let $store-return := copy($collection, $documentname, $term-data)
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>      return
</I>&gt;&gt;<i>         &lt;store-result&gt;
</I>&gt;&gt;<i>            &lt;store&gt;{$term-name}&lt;/store&gt;
</I>&gt;&gt;<i>            &lt;documentname&gt;{$documentname}&lt;/documentname&gt;
</I>&gt;&gt;<i>         &lt;/store-result&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I am using saxon 9.2
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Thanks
</I>&gt;&gt;<i> Byomokesh
</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>  attribute value change
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003812.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003812.html" /><updated>2010-02-05T13:14:39Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>There is a slight improvement, to the solution I posted earlier. The
earlier solution, didn't check that &quot;id&quot; attribute belonged to &quot;chap&quot;
element (I think, this was mentioned in your requirement).

The solution below has this improvement.

declare namespace local = &quot;http://example.com/functions&quot;;

declare function local:copy($element as element()) {
  element {node-name($element)}
    {$element/@*[../self::chap and not(name() eq 'id')], if
(local-name($element) eq 'chap') then
	                                  (attribute id {
concat($element/preceding::bn, '_', $element/@id) }) else (),
     for $child in $element/node()
        return if ($child instance of element())
          then local:copy($child)
          else $child
    }
};

local:copy(doc('test.<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>')/*)

On Fri, Feb 5, 2010 at 12:26 PM, Mukul Gandhi &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> The following seems to work:
</I>&gt;<i>
</I>&gt;<i> declare namespace local = &quot;http://example.com/functions&quot;;
</I>&gt;<i>
</I>&gt;<i> declare function local:copy($element as element()) {
</I>&gt;<i> &#160;element {node-name($element)}
</I>&gt;<i> &#160; &#160;{$element/@*[not(name() eq 'id')], if (local-name($element) eq 'chap') then
</I>&gt;<i> &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; (attribute id {
</I>&gt;<i> concat($element/preceding::bn, '_', &#160; &#160; &#160; &#160; &#160; &#160;$element/@id) }) else
</I>&gt;<i> (),
</I>&gt;<i> &#160; &#160; for $child in $element/node()
</I>&gt;<i> &#160; &#160; &#160; &#160;return if ($child instance of element())
</I>&gt;<i> &#160; &#160; &#160; &#160; &#160;then local:copy($child)
</I>&gt;<i> &#160; &#160; &#160; &#160; &#160;else $child
</I>&gt;<i> &#160; &#160;}
</I>&gt;<i> };
</I>&gt;<i>
</I>&gt;<i> local:copy(doc('test.xml')/*)
</I>


-- 
Regards,
Mukul Gandhi

</PRE>
]]></content></entry><entry><title>  attribute value change
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003811.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003811.html" /><updated>2010-02-05T12:26:10Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>The following seems to work:

declare namespace local = &quot;http://example.com/functions&quot;;

declare function local:copy($element as element()) {
  element {node-name($element)}
    {$element/@*[not(name() eq 'id')], if (local-name($element) eq 'chap') then
	                                             (attribute id {
concat($element/preceding::bn, '_',            $element/@id) }) else
(),
     for $child in $element/node()
        return if ($child instance of element())
          then local:copy($child)
          else $child
    }
};

local:copy(doc('test.<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>')/*)

On Fri, Feb 5, 2010 at 10:43 AM, Byomokesh Sahoo
&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Would someone show me what the syntax is for replacing the value of an
</I>&gt;<i> attribute node?
</I>&gt;<i> &lt;art&gt;
</I>&gt;<i> &lt;tit&gt;Title here&lt;/tit&gt;
</I>&gt;<i> &lt;bn&gt;46793&lt;/bn&gt;
</I>&gt;<i> &lt;p&gt;some text here&lt;/p&gt;
</I>&gt;<i> &lt;chap id=&quot;ch1&quot;&gt;
</I>&gt;<i> &lt;p&gt;some text here&lt;/p&gt;
</I>&gt;<i> &lt;/chap&gt;
</I>&gt;<i> &lt;chap id=&quot;ch2&quot;&gt;
</I>&gt;<i> &lt;p&gt;some text here&lt;/p&gt;
</I>&gt;<i> &lt;/chap&gt;
</I>&gt;<i> &lt;/art&gt;
</I>&gt;<i>
</I>&gt;<i> Output
</I>&gt;<i>
</I>&gt;<i> &lt;art&gt;
</I>&gt;<i> &lt;tit&gt;Title here&lt;/tit&gt;
</I>&gt;<i> &lt;bn&gt;46793&lt;/bn&gt;
</I>&gt;<i> &lt;p&gt;some text here&lt;/p&gt;
</I>&gt;<i> &lt;chap id=&quot;46793_ch1&quot;&gt; &lt;!-- add &lt;bn&gt;46793&lt;/bn&gt; in id value. --&gt;
</I>&gt;<i> &lt;p&gt;some text here&lt;/p&gt;
</I>&gt;<i> &lt;/chap&gt;
</I>&gt;<i> &lt;chap id=&quot;46793_ch2&quot;&gt;
</I>&gt;<i> &lt;p&gt;some text here&lt;/p&gt;
</I>&gt;<i> &lt;/chap&gt;
</I>&gt;<i> &lt;/art&gt;
</I>&gt;<i>
</I>&gt;<i> I want using <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> to change &lt;bin&gt; number value add in all chap id.
</I>&gt;<i>
</I>&gt;<i> Thank you!
</I>&gt;<i> Byomokesh
</I>


-- 
Regards,
Mukul Gandhi
</PRE>
]]></content></entry><entry><title>  attribute value change
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003810.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003810.html" /><updated>2010-02-05T10:43:48Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Would someone show me what the syntax is for replacing the value of an
attribute node?
&lt;art&gt;
&lt;tit&gt;Title here&lt;/tit&gt;
&lt;bn&gt;46793&lt;/bn&gt;
&lt;p&gt;some text here&lt;/p&gt;
&lt;chap id=&quot;ch1&quot;&gt;
&lt;p&gt;some text here&lt;/p&gt;
&lt;/chap&gt;
&lt;chap id=&quot;ch2&quot;&gt;
&lt;p&gt;some text here&lt;/p&gt;
&lt;/chap&gt;
&lt;/art&gt;

Output

&lt;art&gt;
&lt;tit&gt;Title here&lt;/tit&gt;
&lt;bn&gt;46793&lt;/bn&gt;
&lt;p&gt;some text here&lt;/p&gt;
&lt;chap id=&quot;46793_ch1&quot;&gt; &lt;!-- add &lt;bn&gt;46793&lt;/bn&gt; in id value. --&gt;
&lt;p&gt;some text here&lt;/p&gt;
&lt;/chap&gt;
&lt;chap id=&quot;46793_ch2&quot;&gt;
&lt;p&gt;some text here&lt;/p&gt;
&lt;/chap&gt;
&lt;/art&gt;


I want using <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> to change &lt;bin&gt; number value add in all chap id.


Thank you!
Byomokesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100205/c2e9a5c8/attachment.htm
</PRE>
]]></content></entry><entry><title>  Absolute path of a selected xml snippet
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003809.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003809.html" /><updated>2010-02-04T16:06:38Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Ricardo

o pessoal citou algumas  fun&#231;&#245;es q vc poderia usar  , mas  se for o caso  vc
pode criar  algo customizado tambem , usando  o eixo  ancestor-or-self e  as
propriedades name() ou local-name()

algo tipo :

for  $entrada in doc(&quot;testeGroup.<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>&quot;)/*   return

    let $elementoProcurado := 'B' , $posicao :='1'
    for $i  in $entrada//*[name()=
$elementoProcurado][position()=1]/ancestor-or-self::node()  return
        if (name($i)!=$elementoProcurado) then
        concat(name($i),'/')
        else
        name($i)


passando como entrada o nome do elementoe  a posi&#231;&#227;o   dele....

espero ter ajudado

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

Ricardo

You can use  a  function  from  functx  or  try to make a  customized  one
using   ancestor-or-self  axis  , and  name()  or local-name() properties...
something like:

for  $entrada in doc(&quot;testeGroup.xml&quot;)/*   return

    let $elementoProcurado := 'B' , $posicao :='1'
    for $i  in $entrada//*[name()=
$elementoProcurado][position()=1]/ancestor-or-self::node()  return
        if (name($i)!=$elementoProcurado) then
        concat(name($i),'/')
        else
        name($i)




Em 4 de fevereiro de 2010 11:14, Ricardo Queir&#243;s
&lt;http://x-query.com/mailman/listinfo/talk&gt;escreveu:

&gt;<i> Hi to all,
</I>&gt;<i>
</I>&gt;<i> I have the following XML document in a text box:
</I>&gt;<i>
</I>&gt;<i> &lt;A&gt;
</I>&gt;<i> &lt;B&gt; 1 &lt;/ B&gt;
</I>&gt;<i> &lt;B&gt; 2 &lt;/ B&gt;
</I>&gt;<i> &lt;/ A&gt;
</I>&gt;<i>
</I>&gt;<i> By selecting &quot;&lt;B&gt; 1 &lt;/ B&gt;&quot;
</I>&gt;<i>
</I>&gt;<i> I want to get your absolute path <a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a>, ie, &quot;/A/B [1]&quot;
</I>&gt;<i> You can do this 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;<i> What do you advise?
</I>&gt;<i>
</I>&gt;<i> Best regards!
</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>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100204/674fddf8/attachment.htm
</PRE>
]]></content></entry><entry><title>  Absolute path of a selected xml snippet
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003805.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003805.html" /><updated>2010-02-04T14:42:39Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi Ricardo,

You can use the functx library that contains such functions:
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_path-to-node.html.
Functx is very easy to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/deployment/">deploy</a> in your XQuery app since it is not bound
to a specific XQuery engine or library.

Best regards,

William

2010/2/4 Ricardo Queir&#243;s &lt;http://x-query.com/mailman/listinfo/talk&gt;:
&gt;<i> Hi to all,
</I>&gt;<i> I have the following <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> document in a text box:
</I>&gt;<i>
</I>&gt;<i> &lt;A&gt;
</I>&gt;<i> &lt;B&gt; 1 &lt;/ B&gt;
</I>&gt;<i> &lt;B&gt; 2 &lt;/ B&gt;
</I>&gt;<i> &lt;/ A&gt;
</I>&gt;<i>
</I>&gt;<i> By selecting &quot;&lt;B&gt; 1 &lt;/ B&gt;&quot;
</I>&gt;<i>
</I>&gt;<i> I want to get your absolute path <a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a>, ie, &quot;/A/B [1]&quot;
</I>&gt;<i> You can do this using XQuery?
</I>&gt;<i> What do you advise?
</I>&gt;<i> Best regards!
</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>  Absolute path of a selected xml snippet
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003807.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003807.html" /><updated>2010-02-04T14:16:46Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Thanks to all!
I'm using <a title="JAVA" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">JAVA</a>.
The best approach is use <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/api/">API</a> for Java (XQJ)?

Thanks!

On 4 February 2010 14:05, David Lee &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:

&gt;<i> In your case you might want instead
</I>&gt;<i>
</I>&gt;<i> 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_path-to-node-with-pos.html
</I>&gt;<i>
</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
</I>&gt;<i> http://www.calldei.com
</I>&gt;<i> http://www.xmlsh.org
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> --------------------------------------------------
</I>&gt;<i> From: &quot;William Candillon&quot; &lt;http://x-query.com/mailman/listinfo/talk&gt;
</I>&gt;<i> Sent: Thursday, February 04, 2010 8:42 AM
</I>&gt;<i> To: &quot;Ricardo Queir&#243;s&quot; &lt;http://x-query.com/mailman/listinfo/talk&gt;
</I>&gt;<i> Cc: &lt;http://x-query.com/mailman/listinfo/talk&gt;
</I>&gt;<i> Subject: Re:  Absolute path of a selected <a title="xml snippet" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://blogs.stylusstudio.com/">xml snippet</a>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>  Hi Ricardo,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> You can use the functx library that contains such functions:
</I>&gt;&gt;<i> http://www.xqueryfunctions.com/xq/functx_path-to-node.html.
</I>&gt;&gt;<i> Functx is very easy to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/deployment/">deploy</a> in your XQuery app since it is not bound
</I>&gt;&gt;<i> to a specific XQuery engine or library.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Best regards,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> William
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> 2010/2/4 Ricardo Queir&#243;s &lt;http://x-query.com/mailman/listinfo/talk&gt;:
</I>&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> Hi to all,
</I>&gt;&gt;&gt;<i> I have the following XML document in a text box:
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> &lt;A&gt;
</I>&gt;&gt;&gt;<i> &lt;B&gt; 1 &lt;/ B&gt;
</I>&gt;&gt;&gt;<i> &lt;B&gt; 2 &lt;/ B&gt;
</I>&gt;&gt;&gt;<i> &lt;/ A&gt;
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> By selecting &quot;&lt;B&gt; 1 &lt;/ B&gt;&quot;
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> I want to get your absolute path <a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a>, ie, &quot;/A/B [1]&quot;
</I>&gt;&gt;&gt;<i> You can do this using XQuery?
</I>&gt;&gt;&gt;<i> What do you advise?
</I>&gt;&gt;&gt;<i> Best regards!
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> --
</I>&gt;&gt;&gt;<i> Ricardo Queir&#243;s
</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;&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>

-- 
Ricardo Queir&#243;s
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100204/d950aa14/attachment.htm
</PRE>
]]></content></entry><entry><title>  Absolute path of a selected xml snippet
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003804.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003804.html" /><updated>2010-02-04T13:14:31Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi to all,

I have the following <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> document in a text box:

&lt;A&gt;
&lt;B&gt; 1 &lt;/ B&gt;
&lt;B&gt; 2 &lt;/ B&gt;
&lt;/ A&gt;

By selecting &quot;&lt;B&gt; 1 &lt;/ B&gt;&quot;

I want to get your absolute path <a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a>, ie, &quot;/A/B [1]&quot;
You can do this using <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>?
What do you advise?

Best regards!

-- 
Ricardo Queir&#243;s
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100204/d41c7a8a/attachment.htm
</PRE>
]]></content></entry><entry><title>  Absolute path of a selected xml snippet
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003808.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003808.html" /><updated>2010-02-04T09:36:27Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Since you posted to xquery-talk I think we all assumed you were using XQuery not native <a title="java" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">java</a>.

If your not already using XQuery in your app, I might suggest you implement this in pure java, its not that difficult.
But how to do it will depend on what XML API your currently using.

But if you plan on using XQuery, the first choice is to pick a Java XQuery implementation (before picking the API).
The API interface (XQJ) doesn't actually provide an implementation.

My personal favorite for embedded xquery in java is <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a>,  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
And if your using Saxon I'd suggest its S9API over XQJ



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



From: Ricardo Queir&#243;s 
Sent: Thursday, February 04, 2010 9:16 AM
To: David Lee 
Cc: http://x-query.com/mailman/listinfo/talk ; William Candillon 
Subject: Re:  Absolute path of a selected <a title="xml snippet" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://blogs.stylusstudio.com/">xml snippet</a>


Thanks to all! 
I'm using JAVA.
The best approach is use XQuery API for Java (XQJ)?


Thanks!


On 4 February 2010 14:05, David Lee &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:

  In your case you might want instead

  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_path-to-node-with-pos.html



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


  --------------------------------------------------
  From: &quot;William Candillon&quot; &lt;http://x-query.com/mailman/listinfo/talk&gt;
  Sent: Thursday, February 04, 2010 8:42 AM
  To: &quot;Ricardo Queir&#243;s&quot; &lt;http://x-query.com/mailman/listinfo/talk&gt;
  Cc: &lt;http://x-query.com/mailman/listinfo/talk&gt;
  Subject: Re:  Absolute path of a selected xml snippet 



    Hi Ricardo,

    You can use the functx library that contains such functions:
    http://www.xqueryfunctions.com/xq/functx_path-to-node.html.
    Functx is very easy to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/deployment/">deploy</a> in your XQuery app since it is not bound
    to a specific XQuery engine or library.

    Best regards,

    William

    2010/2/4 Ricardo Queir&#243;s &lt;http://x-query.com/mailman/listinfo/talk&gt;:

      Hi to all,
      I have the following XML document in a text box:

      &lt;A&gt;
      &lt;B&gt; 1 &lt;/ B&gt;
      &lt;B&gt; 2 &lt;/ B&gt;
      &lt;/ A&gt;

      By selecting &quot;&lt;B&gt; 1 &lt;/ B&gt;&quot;

      I want to get your absolute path <a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a>, ie, &quot;/A/B [1]&quot;
      You can do this using XQuery?
      What do you advise?
      Best regards!

      --
      Ricardo Queir&#243;s

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



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





-- 
Ricardo Queir&#243;s



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


_______________________________________________
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/20100204/2a558a55/attachment-0001.htm
</PRE>
]]></content></entry><entry><title>  Absolute path of a selected xml snippet
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003806.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003806.html" /><updated>2010-02-04T09:05:22Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>In your case you might want instead

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_path-to-node-with-pos.html



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


--------------------------------------------------
From: &quot;William Candillon&quot; &lt;http://x-query.com/mailman/listinfo/talk&gt;
Sent: Thursday, February 04, 2010 8:42 AM
To: &quot;Ricardo Queir&#243;s&quot; &lt;http://x-query.com/mailman/listinfo/talk&gt;
Cc: &lt;http://x-query.com/mailman/listinfo/talk&gt;
Subject: Re:  Absolute path of a selected <a title="xml snippet" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://blogs.stylusstudio.com/">xml snippet</a>

&gt;<i> Hi Ricardo,
</I>&gt;<i>
</I>&gt;<i> You can use the functx library that contains such functions:
</I>&gt;<i> http://www.xqueryfunctions.com/xq/functx_path-to-node.html.
</I>&gt;<i> Functx is very easy to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/deployment/">deploy</a> in your XQuery app since it is not bound
</I>&gt;<i> to a specific XQuery engine or library.
</I>&gt;<i>
</I>&gt;<i> Best regards,
</I>&gt;<i>
</I>&gt;<i> William
</I>&gt;<i>
</I>&gt;<i> 2010/2/4 Ricardo Queir&#243;s &lt;http://x-query.com/mailman/listinfo/talk&gt;:
</I>&gt;&gt;<i> Hi to all,
</I>&gt;&gt;<i> I have the following XML document in a text box:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &lt;A&gt;
</I>&gt;&gt;<i> &lt;B&gt; 1 &lt;/ B&gt;
</I>&gt;&gt;<i> &lt;B&gt; 2 &lt;/ B&gt;
</I>&gt;&gt;<i> &lt;/ A&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> By selecting &quot;&lt;B&gt; 1 &lt;/ B&gt;&quot;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I want to get your absolute path <a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a>, ie, &quot;/A/B [1]&quot;
</I>&gt;&gt;<i> You can do this using XQuery?
</I>&gt;&gt;<i> What do you advise?
</I>&gt;&gt;<i> Best regards!
</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>&gt;<i> 
</I></PRE>
]]></content></entry><entry><title>  effect of namespace on collection function; weird
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003803.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003803.html" /><updated>2010-02-03T11:15:09Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> Not quite my problem, I think. I want to use an <a title="How to Write XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath_evaluator.html">XPath expression</a> that
</I>&gt;<i> queries a non-namespaced source document inside a default namespaced
</I>&gt;<i> output element. Do I now have to bind a prefix to no namespace? e.g.
</I>&gt;<i>
</I>&gt;<i> declare &#160;namespace pre &quot;&quot;;
</I>&gt;<i>
</I>&gt;<i> &lt;html xmlns=&quot;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/1999/xhtml&quot;&gt;
</I>&gt;<i> {
</I>&gt;<i> let $num := count(collection(&quot;/db/quotes&quot;)/pre:quote)
</I>&gt;<i> return $num
</I>&gt;<i> }
</I>&gt;<i> &lt;/html&gt;
</I>
That's not possible, you can't have an empty namespace, and there is
no equivalent of xpath-default-namespace.

Instead you either move the xpath outside the containing element,
either as a function or a variable:

let $num := count(collection(&quot;/db/quotes&quot;)/quote)
return
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
{$num}
&lt;/html&gt;

or you leave off the default namespace and generate <a title="well formed" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_well_formed.html">well formed</a> html,
changing your output to xhtml as the last step in the process, using
either a transform or a processor extension.



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

</PRE>
]]></content></entry><entry><title>  [ANN] Qizx 3.1 released
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003800.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003800.html" /><updated>2010-02-03T10:19:32Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Qizx Free Engine can be downloaded from
http://www.xmlmind.com/qizx/download.shtml

Qizx/open can be downloaded from
http://www.xmlmind.com/qizx/qizxopen.shtml

Qizx customers, please <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/maintenance_policy.html">upgrade</a> using this form:
http://www.xmlmind.com/store/download.php

(The above form is usually accessed through
http://www.xmlmind.com/qizx/upgrade.html.)

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

Qizx is an embeddable, high-speed, native <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a>
indexing and query engine written 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>(TM),
with the querying and processing capabilities
of a fully fledged XML Query implementation.


What is new in version 3.1:
---------------------------

* Simplified full-text query syntax.

* Full-text convenience functions for scoring,
   highlighting, extracting document snippets,
   looking up indexes.

* Improved full-text scoring.

* Upgraded <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> Update support (complies with
   June 2009 Recommendation)

Please visit http://www.xmlmind.com/qizx/changes.html
for more details.

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

Qizx is available in several editions:

* The commercial product has 3 liberal <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/buy/">licenses</a>
   both for corporate application development, and
   for royalty-free distributable products.

* The Free Engine edition is a fully functional
   version of Qizx which can be used for developing
   or in production.  It is limited in database
   size (one gigabyte of XML approximately).

* Qizx/open is an open-source version of the XML
   Query interpreter of Qizx.  Qizx/open has been
   available since 2003 and is recognized as one
   of the most advanced and fastest XML Query
   implementations.

Please visit http://www.xmlmind.com/qizx/ for more
information about Qizx.



--
Qizx Information List
http://x-query.com/mailman/listinfo/talk
http://www.xmlmind.com/mailman/listinfo/qizx-announce








</PRE>
]]></content></entry><entry><title>  effect of namespace on collection function; weird
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003802.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003802.html" /><updated>2010-02-03T06:01:27Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Tue, Feb 2, 2010 at 7:42 AM, James Fuller
&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> yes frustrating, but dont forget you can use:
</I>&gt;<i>
</I>&gt;<i> declare default element namespace &quot;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/1999/xhtml&quot;;
</I>&gt;<i>
</I>&gt;<i> to change the default element namespace in <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>
Not quite my problem, I think. I want to use an <a title="How to Write XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath_evaluator.html">XPath expression</a> that
queries a non-namespaced source document inside a default namespaced
output element. Do I now have to bind a prefix to no namespace? e.g.

declare  namespace pre &quot;&quot;;

&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
{
let $num := count(collection(&quot;/db/quotes&quot;)/pre:quote)
return $num
}
&lt;/html&gt;


-- 
Elliotte Rusty Harold
http://x-query.com/mailman/listinfo/talk
</PRE>
]]></content></entry><entry><title>  effect of namespace on collection function; weird
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003801.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003801.html" /><updated>2010-02-03T05:58:55Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Tue, Feb 2, 2010 at 9:57 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;<i> Just scream at the insanity of namespaces in general.
</I>
Yes, but I got tired of that years ago. :-)

This, however, is a whole new level of insanity. Who thought it would
be a good idea to break practice with <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>, every <a title="XPath Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">single XPath
implementation</a> on the planet, and years of experience and
documentation?

There's an argument to be made for default namespaces applying in path
expressions, but the time for that argument to be made was 1998. Once
the choice was made, the cost of switching was far higher than any
incremental improvement you might make. Stare decisis isn't just for
the supreme court.

-- 
Elliotte Rusty Harold
http://x-query.com/mailman/listinfo/talk
</PRE>
]]></content></entry><entry><title> AW:  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003796.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003796.html" /><updated>2010-02-03T00:00:27Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>David,

xmlsh seems to me a fascinating approach, and I wonder if the <a title="W3C" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">W3C</a> has considered developing a related standard: If it has decided against it I would like to know&#160;the reasons. It is simply strange that we <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a>-minded people have on the one hand a deep conviction about the value&#160;of structured information; and on the other hand accept it meekly, day by day, that our&#160;workhorse - the&#160;unix shell - consumes and delivers lines of text only... that it delivers, say, the result of a find command in a pityfully unstructured way to be parsed... It is an anachronism.

The basic <a title="tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a> concept, as you explain it on the philosophy page of xmlsh, is convincing, and it is a background before which the worth of interoperability of &quot;small programs&quot; gets very clear. If one accepts the tools concept as a general idea, I think it is but a little step to the thought&#160;that the&#160;interoperability of <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> queries may be an interesting issue. 

What concerns the interaction of queries in the context of xmlsh I have not yet quite understood what is supported or not (yet?) supported. Can one, for example, profit from pipes in order to link two queries? If you gave me a hint where to look, or said a few words in explanation, I would be grateful.

Hans-Juergen


----- Urspr&#252;ngliche Mail ----
Von: David Lee &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: Dienstag, den 2. Februar 2010, 13:42:40 Uhr
Betreff: Re: AW:  XQuery frameworks

You might want to look at xmlsh which was designed to solve this problem of managing the efficient interactions of many xqueries (as well as may non-xquery XML and non-xml pieces of a larger integration),
although perhaps not in the way you express.

__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verf&#252;gt &#252;ber einen herausragenden Schutz gegen Massenmails. 
http://mail.yahoo.com 

</PRE>
]]></content></entry><entry><title>  effect of namespace on collection function; weird
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003794.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003794.html" /><updated>2010-02-02T21:10:29Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>I remember having this raised as a usability issue but we decided at the time that we do not want to keep track of two default element namespaces :(.

Best regards
Michael

-----Original Message-----
From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf Of <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>
Sent: Tuesday, February 02, 2010 7:00 AM
To: 'James Fuller'; 'Elliotte Rusty Harold'
Cc: http://x-query.com/mailman/listinfo/talk
Subject: RE:  effect of namespace on collection function; weird


&gt;<i> yes frustrating, but dont forget you can use:
</I>&gt;<i> 
</I>&gt;<i> declare default element namespace &quot;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/1999/xhtml&quot;;
</I>&gt;<i> 
</I>&gt;<i> to change the default element namespace in <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>
But it still changes the default both for constructing new elements and for accessing existing ones. What the user wants here is different defaults for the two cases.

Regards,

Michael Kay
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 


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


</PRE>
]]></content></entry><entry><title> AW:  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003798.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003798.html" /><updated>2010-02-02T20:15:29Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Wed, 2010-02-03 at 00:00 +0000, Hans-Juergen Rennau wrote:

&gt;<i> xmlsh seems to me a fascinating approach, and I wonder if the <a title="W3C" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">W3C</a> has
</I>&gt;<i> considered developing a related standard: If it has decided against it
</I>&gt;<i> I would like to know the reasons. 
</I>
I do not believe it has been considered -- generally, W3C Member
organizations come to us (W3C) and propose work items; often we
then arrange a public Workshop, and if that goes well, start a
Working Group. 

Years ago I worked on an SGML Shell (never released, it used
proprietary software) and tried to get some people interested.

Liam

-- 
Liam Quin - <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old <a title="books" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_book.html">books</a>: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org

</PRE>
]]></content></entry><entry><title>  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003797.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003797.html" /><updated>2010-02-02T20:11:59Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Tue, 2010-02-02 at 11:23 +0100, James Fuller wrote:
&gt;<i> in web applications may I proffer that REST is maybe the abstraction
</I>&gt;<i> layer you desire, in eXist (where there is a default RESTful
</I>&gt;<i> interface) u also get rewriting which when combined cover most of my
</I>&gt;<i> needs in this 'space'.
</I>
But then you are using one particular implementation...
And using eXist to handle incoming forms seemed to involve
some weird kludgery with eval() last time I looked, although
that was a while ago, and I didn't look too deeply because
I'd already written my own little framework.

I'd really like to see more standardization - even informally -
at the level &quot;beyond the query&quot;, because I think we (the
<a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> world) are missing out on a lot of opportunities for
more adoption.

I don't think XProc is the answer - it might be part of an
answer, especially some future putative more powerful
XProc based on sequences of XDM instances and synchronization
points - because then you need an XProc Framework...

Liam

-- 
Liam Quin - <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> Activity Lead, <a title="W3C" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">W3C</a>, http://www.w3.org/People/Quin/
Pictures from old <a title="books" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_book.html">books</a>: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org

</PRE>
]]></content></entry><entry><title> AW:  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003799.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003799.html" /><updated>2010-02-02T17:27:02Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi all,

Just for the sake of completeness: I hope people on this thread  
realize that there is
more to <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> then a query language. It's also a *scripting* language.
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-sx-10/

The XQuery scripting extension does provide control flow capabilities  
around queries,
updates and Web function calls. It's smoothly integrated with the rest  
of  XQuery, such that it
  avoids the paradigm shift that usually costs productivity and  
performance.

(this makes XQuery a direct competitor to other scripting  
languages...Javascript, Ruby, etc..
and I think XQuery will be in the long term winning, but that's  
another story, and maybe another
email)

This is of course no excuse for not having a more sophisticated  
servlet-like framework around
XQuery/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a> for ease of Web application building.

I believe <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> needs some work in this area, hopefully standardized by  
the W3C for the
benefit of all.


Best regards
Dana

P.S. For everybody who will attending XML Prague, maybe we can have an  
evening of beer
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> around this. I am looking forward to it.













On Feb 2, 2010, at 4:00 PM, Hans-Juergen Rennau wrote:

&gt;<i> David,
</I>&gt;<i>
</I>&gt;<i> xmlsh seems to me a fascinating approach, and I wonder if the W3C  
</I>&gt;<i> has considered developing a related standard: If it has decided  
</I>&gt;<i> against it I would like to know the reasons. It is simply strange  
</I>&gt;<i> that we XML-minded people have on the one hand a deep conviction  
</I>&gt;<i> about the value of structured information; and on the other hand  
</I>&gt;<i> accept it meekly, day by day, that our workhorse - the unix shell -  
</I>&gt;<i> consumes and delivers lines of text only... that it delivers, say,  
</I>&gt;<i> the result of a find command in a pityfully unstructured way to be  
</I>&gt;<i> parsed... It is an anachronism.
</I>&gt;<i>
</I>&gt;<i> The basic <a title="tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a> concept, as you explain it on the philosophy page of  
</I>&gt;<i> xmlsh, is convincing, and it is a background before which the worth  
</I>&gt;<i> of interoperability of &quot;small programs&quot; gets very clear. If one  
</I>&gt;<i> accepts the tools concept as a general idea, I think it is but a  
</I>&gt;<i> little step to the thought that the interoperability of XQuery  
</I>&gt;<i> queries may be an interesting issue.
</I>&gt;<i>
</I>&gt;<i> What concerns the interaction of queries in the context of xmlsh I  
</I>&gt;<i> have not yet quite understood what is supported or not (yet?)  
</I>&gt;<i> supported. Can one, for example, profit from pipes in order to link  
</I>&gt;<i> two queries? If you gave me a hint where to look, or said a few  
</I>&gt;<i> words in explanation, I would be grateful.
</I>&gt;<i>
</I>&gt;<i> Hans-Juergen
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> ----- Urspr&#252;ngliche Mail ----
</I>&gt;<i> Von: David 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;; http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> CC: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Gesendet: Dienstag, den 2. Februar 2010, 13:42:40 Uhr
</I>&gt;<i> Betreff: Re: AW:  XQuery frameworks
</I>&gt;<i>
</I>&gt;<i> You might want to look at xmlsh which was designed to solve this  
</I>&gt;<i> problem of managing the efficient interactions of many xqueries (as  
</I>&gt;<i> well as may non-xquery XML and non-xml pieces of a larger  
</I>&gt;<i> integration),
</I>&gt;<i> although perhaps not in the way you express.
</I>&gt;<i>
</I>&gt;<i> __________________________________________________
</I>&gt;<i> Do You Yahoo!?
</I>&gt;<i> Sie sind Spam leid? Yahoo! Mail verf&#252;gt &#252;ber einen herausragenden  
</I>&gt;<i> Schutz gegen Massenmails.
</I>&gt;<i> http://mail.yahoo.com
</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>  effect of namespace on collection function; weird
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003795.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003795.html" /><updated>2010-02-02T16:30:16Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>In hindsight, that's too bad  :(
In most of the cases where I work with <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> with namespaces, I'm generating 
in a different namespaces (or none) then I am querying.
My own experience would suggest that's the common, not the outlying case.


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


--------------------------------------------------
From: &quot;<a title="Michael Rys" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_rys.html">Michael Rys</a>&quot; &lt;http://x-query.com/mailman/listinfo/talk&gt;
Sent: Tuesday, February 02, 2010 4:10 PM
To: &quot;<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>&quot; &lt;http://x-query.com/mailman/listinfo/talk&gt;; &quot;'James Fuller'&quot; 
&lt;http://x-query.com/mailman/listinfo/talk&gt;; &quot;'Elliotte Rusty Harold'&quot; 
&lt;http://x-query.com/mailman/listinfo/talk&gt;
Cc: &lt;http://x-query.com/mailman/listinfo/talk&gt;
Subject: RE:  effect of namespace on collection function; weird

&gt;<i> I remember having this raised as a usability issue but we decided at the 
</I>&gt;<i> time that we do not want to keep track of two default element namespaces 
</I>&gt;<i> :(.
</I>&gt;<i>
</I>&gt;<i> Best regards
</I>&gt;<i> Michael
</I>&gt;<i>
</I>&gt;<i> -----Original Message-----
</I>&gt;<i> From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf 
</I>&gt;<i> Of Michael Kay
</I>&gt;<i> Sent: Tuesday, February 02, 2010 7:00 AM
</I>&gt;<i> To: 'James Fuller'; 'Elliotte Rusty Harold'
</I>&gt;<i> Cc: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject: RE:  effect of namespace on collection function; 
</I>&gt;<i> weird
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;&gt;<i> yes frustrating, but dont forget you can use:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> declare default element namespace &quot;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/1999/xhtml&quot;;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> to change the default element namespace in <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> But it still changes the default both for constructing new elements and 
</I>&gt;<i> for accessing existing ones. What the user wants here is different 
</I>&gt;<i> defaults for the two cases.
</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> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</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>  effect of namespace on collection function; weird
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003793.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003793.html" /><updated>2010-02-02T14:59:51Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
&gt;<i> yes frustrating, but dont forget you can use:
</I>&gt;<i> 
</I>&gt;<i> declare default element namespace &quot;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/1999/xhtml&quot;;
</I>&gt;<i> 
</I>&gt;<i> to change the default element namespace in <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>
But it still changes the default both for constructing new elements and for
accessing existing ones. What the user wants here is different defaults for
the two cases.

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>  effect of namespace on collection function; weird
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003792.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003792.html" /><updated>2010-02-02T14:57:52Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> Is <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> really supposed to be applying default namespaces 
</I>&gt;<i> to unqualified names in path expressions? 
</I>
Yes.

&gt;<i> Do I report this as 
</I>&gt;<i> a bug in the XQuery processor or do I scream at the insanity 
</I>&gt;<i> of the XQuery working group?
</I>&gt;<i> 
</I>
Just scream at the insanity of namespaces in general.

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>  effect of namespace on collection function; weird
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003790.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003790.html" /><updated>2010-02-02T13:42:13Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>yes frustrating, but dont forget you can use:

declare default element namespace &quot;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/1999/xhtml&quot;;

to change the default element namespace in <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>

James Fuller


On Tue, Feb 2, 2010 at 1:08 PM, Elliotte Rusty Harold
&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Can this possibly be right? After much debugging I have bolied a
</I>&gt;<i> really confusing bug down to this test case. The following query
</I>&gt;<i> prints 3097:
</I>&gt;<i>
</I>&gt;<i> &lt;html&gt;
</I>&gt;<i> {
</I>&gt;<i> let $num := count(collection(&quot;/db/quotes&quot;)/quote)
</I>&gt;<i> return $num
</I>&gt;<i> }
</I>&gt;<i> &lt;/html&gt;
</I>&gt;<i>
</I>&gt;<i> and this query prints 0:
</I>&gt;<i>
</I>&gt;<i> &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
</I>&gt;<i> {
</I>&gt;<i> let $num := count(collection(&quot;/db/quotes&quot;)/quote)
</I>&gt;<i> return $num
</I>&gt;<i> }
</I>&gt;<i> &lt;/html&gt;
</I>&gt;<i>
</I>&gt;<i> The only difference is the default namespace declaration. In the
</I>&gt;<i> documents being queried the quote elements are indeed in no namespace.
</I>&gt;<i> Is XQuery really supposed to be applying default namespaces to
</I>&gt;<i> unqualified names in path expressions? Do I report this as a bug in
</I>&gt;<i> the XQuery processor or do I scream at the insanity of the XQuery
</I>&gt;<i> working group?
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> Elliotte Rusty Harold
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</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>  effect of namespace on collection function; weird
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003789.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003789.html" /><updated>2010-02-02T12:19:10Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On 2 February 2010 12:08, Elliotte Rusty Harold &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Can this possibly be right? After much debugging I have bolied a
</I>&gt;<i> really confusing bug down to this test case. The following query
</I>&gt;<i> prints 3097:
</I>&gt;<i>
</I>&gt;<i> &lt;html&gt;
</I>&gt;<i> {
</I>&gt;<i> let $num := count(collection(&quot;/db/quotes&quot;)/quote)
</I>&gt;<i> return $num
</I>&gt;<i> }
</I>&gt;<i> &lt;/html&gt;
</I>&gt;<i>
</I>&gt;<i> and this query prints 0:
</I>&gt;<i>
</I>&gt;<i> &lt;html xmlns=&quot;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/1999/xhtml&quot;&gt;
</I>&gt;<i> {
</I>&gt;<i> let $num := count(collection(&quot;/db/quotes&quot;)/quote)
</I>&gt;<i> return $num
</I>&gt;<i> }
</I>&gt;<i> &lt;/html&gt;
</I>&gt;<i>
</I>&gt;<i> The only difference is the default namespace declaration. In the
</I>&gt;<i> documents being queried the quote elements are indeed in no namespace.
</I>&gt;<i> Is <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> really supposed to be applying default namespaces to
</I>&gt;<i> unqualified names in path expressions? Do I report this as a bug in
</I>&gt;<i> the XQuery processor or do I scream at the insanity of the XQuery
</I>&gt;<i> working group?
</I>
It's not a bug, and yes it does make you want to scream.

Have a look at: http://markmail.org/thread/sbwubypg4kcv7trg



-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
</PRE>
]]></content></entry><entry><title>  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003786.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003786.html" /><updated>2010-02-02T11:32:18Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> in web applications may I proffer that REST is maybe the abstraction
</I>&gt;<i> layer you desire, in eXist (where there is a default RESTful
</I>&gt;<i> interface) u also get rewriting which when combined cover most of my
</I>&gt;<i> needs in this 'space'.
</I>
The nicest approach to this I have seen so far is in day's Sling
framework. Basically you have a hierarchical repository of
files/documents that have MIME types (multiple though), and if a
request hits a file, handlers are triggered on MIME type and
conditions of the request (method, headers, accept, ...). Of course
they also support rewriting and path mapping, but I find the first
approach nicer. If you have side effect free handlers (hello <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>)
you could also get proper HTTP cache support for free.

Pointing a browser at /path/to/my/script that then does something
magic (maybe even based on sessions!) feels so 1999 PHP style.

However this requires some relatively application specific decisions
to be taken by the framework, e.g. in xDB which metadata properties
describe the MIME types.

And frankly, the last time I looked I found eXists approach of calling
into impure functions to manipulate sessions, headers, etc. relatively
ugly. It just feels very wrong to have impurity in XQuery, at least to
me.

&gt;<i> this reminds me of a quote (which I cannot remember) that basically
</I>&gt;<i> says any problem can be solved with yet another layer of abstraction,
</I>&gt;<i> except for the problem of too many layers of abstraction.
</I>
Yes, I was sort of quoting that. One of my all time favorites ;-)

Martin
</PRE>
]]></content></entry><entry><title>  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003785.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003785.html" /><updated>2010-02-02T11:23:50Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>in web applications may I proffer that REST is maybe the abstraction
layer you desire, in eXist (where there is a default RESTful
interface) u also get rewriting which when combined cover most of my
needs in this 'space'.

this reminds me of a quote (which I cannot remember) that basically
says any problem can be solved with yet another layer of abstraction,
except for the problem of too many layers of abstraction.

James Fuller

On Tue, Feb 2, 2010 at 11:13 AM, Martin Probst &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;&gt;<i> But remains the question: is there no need for additional integrators between the <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> level and the XProc level? I believe that such integrators can be designed and could be useful.
</I>&gt;<i>
</I>&gt;<i> What would they do? What purpose would they have? Of course you can
</I>&gt;<i> introduce any number of indirections between XProc and XQuery, but why
</I>&gt;<i> would you want to?
</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>&gt;<i>
</I></PRE>
]]></content></entry><entry><title>  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003783.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003783.html" /><updated>2010-02-02T11:13:56Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> But remains the question: is there no need for additional integrators between the <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> level and the XProc level? I believe that such integrators can be designed and could be useful.
</I>
What would they do? What purpose would they have? Of course you can
introduce any number of indirections between XProc and XQuery, but why
would you want to?

Martin
</PRE>
]]></content></entry><entry><title> AW:  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003787.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003787.html" /><updated>2010-02-02T11:02:50Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Martin,

yes, what purpose whould they have? Two purposes I can immediately think of is to organize document flow from query to query, and automated input selection for batch processing, e.g. based on document properties and selection criteria. Let me briefly expand&#160;ideas about document flow. Imagine we introduced the concept of a &quot;document type&quot;, not in the conventional - literal - way referring to <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> and <a title="DTD" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dtd.html">DTD</a>, but&#160;as an abstract component&#160;identified by a QName&#160;and properties; and imagine we possess a simple language for characterizing queries in terms of input and output document types (in the sense just introduced); then things can get really in motion. And note the aspect that the whole approach is very concept minded, systematically building on new kinds of components and the semantics of their properties. Practically, this can get efficient and attractive, indeed, 

With kind regards
Hans-Juergen Rennau



----- Urspr&#252;ngliche Mail ----
Von: Martin Probst &lt;http://x-query.com/mailman/listinfo/talk&gt;
An: Hans-Juergen Rennau &lt;http://x-query.com/mailman/listinfo/talk&gt;
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> &lt;http://x-query.com/mailman/listinfo/talk&gt;; http://x-query.com/mailman/listinfo/talk; http://x-query.com/mailman/listinfo/talk; http://x-query.com/mailman/listinfo/talk
Gesendet: Dienstag, den 2. Februar 2010, 11:13:56 Uhr
Betreff: Re:  <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> frameworks

&gt;<i> But remains the question: is there no need for additional integrators between the XQuery level and the XProc level? I believe that such integrators can be designed and could be useful.
</I>
What would they do? What purpose would they have? Of course you can
introduce any number of indirections between XProc and XQuery, but why
would you want to?

Martin


__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verf&#252;gt &#252;ber einen herausragenden Schutz gegen Massenmails. 
http://mail.yahoo.com 

</PRE>
]]></content></entry><entry><title>  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003784.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003784.html" /><updated>2010-02-02T10:23:32Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On 2 February 2010 10:13, Martin Probst &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;&gt;<i> But remains the question: is there no need for additional integrators between the <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> level and the XProc level? I believe that such integrators can be designed and could be useful.
</I>&gt;<i>
</I>&gt;<i> What would they do? What purpose would they have? Of course you can
</I>&gt;<i> introduce any number of indirections between XProc and XQuery, but why
</I>&gt;<i> would you want to?
</I>
Didn't someone once say &quot;Any problem in computer science can be solved
with another level of indirection&quot; :)

But then according to this:

http://en.<a title="XML Wikipedia" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://wiki.stylusstudio.com/">wikipedia</a>.org/wiki/David_Wheeler_%28computer_scientist%29

...he followed it with &quot;But that usually will create another problem.&quot;





-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
</PRE>
]]></content></entry><entry><title> AW:  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003782.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003782.html" /><updated>2010-02-02T09:53:32Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Michael,

no doubt about the importance of XProc as an integration language above <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>, and no doubt we need such a language which is not confined to orchestrating XQuery queries, but &quot;application components in different languages&quot;, namely X...-components. I would position XProc two levels above XQuery, whereas&#160;an&#160;&quot;XQuery-only integrator&quot; would be only one level above. If&#160;we could afford only one single language above XQuery, the choice should certainly be the higher alternative, opening&#160;much larger space for integration. But remains the question: is there no need for additional integrators between the XQuery level and the XProc level? I believe that such integrators can be designed and could be useful. However, if the&#160;small-scale integration can be done in such a generic way as to deserve standardization - this is a different question. (To explore it, a first step might&#160;be to define possible advantages in general terms.)&#160;Lightweight-integration language
 between XQuery and XProc, is it possible, yes or no, is it worthwhile, yes or no?

With kind regards,
Hans-Juergen Rennau



----- Urspr&#252;ngliche Mail ----
Von: <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;
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: Dienstag, den 2. Februar 2010, 5:58:30 Uhr
Betreff: RE:  XQuery frameworks

&gt;<i> 'extend standardization &quot;beyond the query&quot;' - that is an 
</I>&gt;<i> excellent formula, I think! As one of the reasons why the 
</I>&gt;<i> need is real I regard the challenge of <a title="data integration" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/deployment/">data integration</a>....
</I>&gt;<i> 
</I>&gt;<i> A movement&#160;&quot;beyond the query&quot;:&#160;how about a processing model 
</I>&gt;<i> just&#160;one level above the query level, of moderate complexity, 
</I>&gt;<i> integrating the execution of single queries, for example by 
</I>&gt;<i> assigning to them properties which would allow to automate 
</I>&gt;<i> their squencing, input provision and output delivery? 
</I>
Some of this need is satisfied by XProc. There are some who would like to
see the whole application written in XQuery and don't want to see any other
language present. But to my mind, integration is often about combining and
reusing application components written in different languages and different
technologies, and XProc meets that need admirably.

Regards,

Michael Kay
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 

__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verf&#252;gt &#252;ber einen herausragenden Schutz gegen Massenmails. 
http://mail.yahoo.com 

</PRE>
]]></content></entry><entry><title> AW:  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003791.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003791.html" /><updated>2010-02-02T07:42:40Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>You might want to look at xmlsh which was designed to solve this problem of 
managing the efficient interactions of many xqueries (as well as may 
non-<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="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> and non-xml pieces of a larger integration),
although perhaps not in the way you express.



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


--------------------------------------------------
From: &quot;Hans-Juergen Rennau&quot; &lt;http://x-query.com/mailman/listinfo/talk&gt;
Sent: Monday, February 01, 2010 6:49 PM
To: &lt;http://x-query.com/mailman/listinfo/talk&gt;
Cc: &lt;http://x-query.com/mailman/listinfo/talk&gt;
Subject: AW:  XQuery frameworks

&gt;<i> Liam,
</I>&gt;<i>
</I>&gt;<i> 'extend standardization &quot;beyond the query&quot;' - that is an excellent 
</I>&gt;<i> formula, I think! As one of the reasons why the need is real I regard the 
</I>&gt;<i> challenge of <a title="data integration" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/deployment/">data integration</a>. I have a feeling that there is a remarkable 
</I>&gt;<i> contradiction between potential and reality. XQuery has a great potential 
</I>&gt;<i> as an integrator, what with the possibility to just *name* the resource 
</I>&gt;<i> (URI) and immediately have its structured content under your fingertips. 
</I>&gt;<i> But if the actual usage of XQuery does not yet live up to the potential, 
</I>&gt;<i> one of the reasons may be that it is difficult to set up a system of many 
</I>&gt;<i> queries to a robust whole, although the *single* queries can be written so 
</I>&gt;<i> easily and efficiently. Put differently: it makes a great difference if 
</I>&gt;<i> the focus of integration lies within a single query, or beyond.
</I>&gt;<i>
</I>&gt;<i> A movement &quot;beyond the query&quot;: how about a processing model just one level 
</I>&gt;<i> above the query level, of moderate complexity, integrating the execution 
</I>&gt;<i> of single queries, for example by assigning to them properties which would 
</I>&gt;<i> allow to automate their squencing, input provision and output delivery? 
</I>&gt;<i> The XQuery spec provides for the possibility to write library modules, but 
</I>&gt;<i> it is not possible to formulate relationships between library functions. 
</I>&gt;<i> In general, we cannot say someting &quot;about&quot; a function. We cannot, for 
</I>&gt;<i> example, express that a query Q has a &quot;logical&quot; source document D, 
</I>&gt;<i> although the actual input is not (or not only) D itself, but the result 
</I>&gt;<i> produced by some other query Q0, likewise logically - or perhaps 
</I>&gt;<i> literally - processing D. A really simple XML language might  make it 
</I>&gt;<i> clear that the command &quot;apply Q to D&quot; would have to be expanded by a 
</I>&gt;<i> framework into a chain: &quot;apply Q0 to D, resulting in R; present Q to R&quot;. 
</I>&gt;<i> We do not have this level of
</I>&gt;<i> abstraction which would allow for orchestrating the individual queries. 
</I>&gt;<i> The XQuery language level knows only XDM values and expressions. I wonder 
</I>&gt;<i> if just one level above the language a simple, standardized processing 
</I>&gt;<i> model might not be possible, simple enough to be attractive and really 
</I>&gt;<i> enhancing efficiency.
</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: Liam R E Quin &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
</I>&gt;<i> Gesendet: Montag, den 1. Februar 2010, 2:14:47 Uhr
</I>&gt;<i> Betreff: Re:  XQuery frameworks
</I>&gt;<i>
</I>&gt;<i> On Fri, 2010-01-29 at 10:03 +0000, Hans-Juergen Rennau wrote:
</I>&gt;&gt;<i> Dear People,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> presently I am scribbling away at a little XQuery framework
</I>&gt;<i>
</I>&gt;<i> A few years ago when I did http://www.fromoldbooks.org/Search/
</I>&gt;<i> using XQuery, I wrote my own.  It's far from perfect -- it
</I>&gt;<i> is a perl script that checks the system load average (!), and
</I>&gt;<i> the query parameters, and then reads an xml config file, and
</I>&gt;<i> calls up an external xquery engine based on a variable -- so I
</I>&gt;<i> could easily switch between galax, qizx and saxon, initially,
</I>&gt;<i> and later dbxml too.  It keeps a cache, to avoid firing up
</I>&gt;<i> a JVM (two of those implementations are in Java) with each
</I>&gt;<i> incoming HTTP request, and does get fairly high cache hit rates.
</I>&gt;<i>
</I>&gt;<i> It'd be a reasonable question, &quot;why not use servlets&quot;, and
</I>&gt;<i> a lot of the answer to that is that, when I wrote it, Sun's
</I>&gt;<i> licence for Java was such that Linux distributions couldn't
</I>&gt;<i> easily include it, and Java was a sufficient pain to set up that
</I>&gt;<i> I avoided any architecture that depended on it.  But then I
</I>&gt;<i> started using Saxon, and, later qizx, both of which do use Java.
</I>&gt;<i>
</I>&gt;<i> More recently I've used dbxml, but not on the production system,
</I>&gt;<i> as the packaging for dbxml is even weirder than for Java, and
</I>&gt;<i> my server has changed operating systems several times over the years.
</I>&gt;<i>
</I>&gt;<i> All this is a long winded way of saying, a lot of it depends on
</I>&gt;<i> the environment.  I'm particularly interested (since I work at W3C...)
</I>&gt;<i> in what we could do to extend standardisation &quot;beyond the query&quot; into
</I>&gt;<i> more of a framework, and how, and what would be the value of that, but
</I>&gt;<i> I think the XQuery Working Group right now does not have the
</I>&gt;<i> resources to do that sort of work.
</I>&gt;<i>
</I>&gt;<i> Liam
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> -- 
</I>&gt;<i> Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
</I>&gt;<i> Pictures from old books: http://fromoldbooks.org/
</I>&gt;<i> Ankh: irc.sorcery.net irc.gnome.org www.advogato.org
</I>&gt;<i>
</I>&gt;<i> __________________________________________________
</I>&gt;<i> Do You Yahoo!?
</I>&gt;<i> Sie sind Spam leid? Yahoo! Mail verf&#252;gt &#252;ber einen herausragenden Schutz 
</I>&gt;<i> gegen Massenmails.
</I>&gt;<i> http://mail.yahoo.com
</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>  effect of namespace on collection function; weird
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003788.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003788.html" /><updated>2010-02-02T07:08:41Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Can this possibly be right? After much debugging I have bolied a
really confusing bug down to this test case. The following query
prints 3097:

&lt;html&gt;
{
let $num := count(collection(&quot;/db/quotes&quot;)/quote)
return $num
}
&lt;/html&gt;

and this query prints 0:

&lt;html xmlns=&quot;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/1999/xhtml&quot;&gt;
{
let $num := count(collection(&quot;/db/quotes&quot;)/quote)
return $num
}
&lt;/html&gt;

The only difference is the default namespace declaration. In the
documents being queried the quote elements are indeed in no namespace.
Is <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> really supposed to be applying default namespaces to
unqualified names in path expressions? Do I report this as a bug in
the XQuery processor or do I scream at the insanity of the XQuery
working group?


-- 
Elliotte Rusty Harold
http://x-query.com/mailman/listinfo/talk
</PRE>
]]></content></entry><entry><title>  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003781.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003781.html" /><updated>2010-02-02T04:58:30Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> 'extend standardization &quot;beyond the query&quot;' - that is an 
</I>&gt;<i> excellent formula, I think! As one of the reasons why the 
</I>&gt;<i> need is real I regard the challenge of <a title="data integration" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/deployment/">data integration</a>....
</I>&gt;<i> 
</I>&gt;<i> A movement&#160;&quot;beyond the query&quot;:&#160;how about a processing model 
</I>&gt;<i> just&#160;one level above the query level, of moderate complexity, 
</I>&gt;<i> integrating the execution of single queries, for example by 
</I>&gt;<i> assigning to them properties which would allow to automate 
</I>&gt;<i> their squencing, input provision and output delivery? 
</I>
Some of this need is satisfied by XProc. There are some who would like to
see the whole application written in <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> and don't want to see any other
language present. But to my mind, integration is often about combining and
reusing application components written in different languages and different
technologies, and XProc meets that need admirably.

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> AW:  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003780.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003780.html" /><updated>2010-02-01T23:49:56Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Liam,

'extend standardization &quot;beyond the query&quot;' - that is an excellent formula, I think! As one of the reasons why the need is real I regard the challenge of <a title="data integration" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/deployment/">data integration</a>. I have a feeling that there is a remarkable&#160;contradiction between potential and reality. <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> has a great&#160;potential as an integrator, what with the possibility to just *name* the resource (URI) and immediately have its structured content under your fingertips. But if the actual usage of XQuery does not yet live up to the potential, one of the reasons may be that it is difficult to set up a system of many queries to a robust whole, although the *single* queries can be written so easily and&#160;efficiently. Put differently: it makes a great difference if the focus of integration lies within a single query, or beyond.

A movement&#160;&quot;beyond the query&quot;:&#160;how about a processing model just&#160;one level above the query level, of moderate complexity, integrating the execution of single queries, for example by assigning to them properties which would allow to automate their squencing, input provision and output delivery? The XQuery spec provides for the possibility to write library modules, but it&#160;is not possible to formulate relationships between library functions. In general, we cannot say someting &quot;about&quot; a function. We cannot, for example, express that a query Q has a &quot;logical&quot; source document D, although the actual&#160;input is not&#160;(or not only) D itself, but the result produced by some other query Q0, likewise logically - or perhaps literally - processing&#160;D. A really simple <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> language might&#160; make it clear that the command &quot;apply Q to D&quot; would have to be expanded&#160;by a framework into a chain:&#160;&quot;apply Q0 to D, resulting in R;&#160;present Q to R&quot;. We do not have this level of
 abstraction which would allow for orchestrating the individual queries. The XQuery language level knows only XDM values and expressions.&#160;I wonder if&#160;just one&#160;level above the language a simple, standardized processing model might not be possible, simple enough to be attractive and really&#160;enhancing efficiency.

With kind regards,
Hans-Juergen Rennau

&#160;


----- Urspr&#252;ngliche Mail ----
Von: Liam R E Quin &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: Montag, den 1. Februar 2010, 2:14:47 Uhr
Betreff: Re:  XQuery frameworks

On Fri, 2010-01-29 at 10:03 +0000, Hans-Juergen Rennau wrote:
&gt;<i> Dear People,
</I>&gt;<i> 
</I>&gt;<i> presently I am scribbling away at a little XQuery framework 
</I>
A few years ago when I did http://www.fromoldbooks.org/Search/
using XQuery, I wrote my own.&#160; It's far from perfect -- it
is a perl script that checks the system load average (!), and
the query parameters, and then reads an xml config file, and
calls up an external xquery engine based on a variable -- so I
could easily switch between galax, qizx 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>, initially,
and later dbxml too.&#160; It keeps a cache, to avoid firing up
a <a title="JVM" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">JVM</a> (two of those implementations are in Java) with each
incoming HTTP request, and does get fairly high cache hit rates.

It'd be a reasonable question, &quot;why not use servlets&quot;, and
a lot of the answer to that is that, when I wrote it, Sun's
licence for Java was such that Linux distributions couldn't
easily include it, and Java was a sufficient pain to set up that
I avoided any architecture that depended on it.&#160; But then I
started using Saxon, and, later qizx, both of which do use Java.

More recently I've used dbxml, but not on the production system,
as the packaging for dbxml is even weirder than for Java, and
my server has changed operating systems several times over the years.

All this is a long winded way of saying, a lot of it depends on
the environment.&#160; I'm particularly interested (since I work at W3C...)
in what we could do to extend standardisation &quot;beyond the query&quot; into
more of a framework, and how, and what would be the value of that, but
I think the XQuery Working Group right now does not have the
resources to do that sort of work.

Liam


-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org

__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verf&#252;gt &#252;ber einen herausragenden Schutz gegen Massenmails. 
http://mail.yahoo.com 

</PRE>
]]></content></entry><entry><title>  XQuery frameworks    [SEC=UNCLASSIFIED]
   </title><id>http://www.stylusstudio.com/xquerytalk/201002/003778.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201002/003778.html" /><updated>2010-02-01T10:30:36Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi Hans,
The FullMoon processing framework meets the criteria you have described.
See http://<a title="projects" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_project.html">projects</a>.arcs.org.au/trac/fullmoon/<a title="The Stylus Studio Wiki" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://wiki.stylusstudio.com/">wiki</a>/FullMoon
I initially developed it in 2007 for Geoscience Australia and it was taken
over and further developed by CSIRO.
It's design is fairly generic but the packaged rule sets (<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>) are
specific to processing XMI representations of ISO19136 UML models.

Regards,
Nick Ardlie


                                                                       
             Hans-Juergen                                              
             Rennau                                                    
             &lt;http://x-query.com/mailman/listinfo/talk                                          To
             &gt;                              http://x-query.com/mailman/listinfo/talk           
             Sent by:                                                   cc
             http://x-query.com/mailman/listinfo/talk                                         
             ery.com                                               Subject
                                             XQuery       
                                            frameworks                 
             29/01/2010 09:03                              Protective Mark
             PM                                                        
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       



Dear People,

presently I am scribbling away at a little XQuery&#160;framework into which one
may plug user-supplied queries, which pulls them into a particular larger
processing model, using them as combinable building blocks. Suddenly my pen
hovers in mid-air, I raise my head and, listening to the snowflakes
rustling in the hedge, I wonder: probably some XQuery&#160;frameworks already
exist, and we <a title="XQuery developers" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquerytalk/">XQuery developers</a> might really profit from being aware of
them, so that, pushing the argument to its&#160;extreme, everytime we write a
query we might immediately consider plugging it into this or that
framework, to enhance its usefulness.

So my *question*: would anybody like to point to some XQuery&#160;framework into
which one may plug queries in order to harvest added value,&#160;perhaps hinting
at the kind of advantage one obtains?

With kind regards,
Hans-Juergen Rennau


PS: Before closing, one word about XProc. I would not regard the language
itself&#160;as such a framework, rather as a toolkit for creating such
frameworks, implementing them perhaps as a set of&#160;XProc documents.

__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verf&#252;gt &#252;ber einen herausragenden Schutz
gegen Massenmails.
http://mail.yahoo.com

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




--------------------------------------------------------------------
Important Notice: If you have received this email by mistake, please advise
the sender and delete the message and attachments immediately.  This email,
including attachments, may contain confidential, sensitive, legally privileged
and/or copyright information.  Any review, retransmission, dissemination
or other use of this information by persons or entities other than the
intended recipient is prohibited.  DIAC respects your privacy and has
obligations under the Privacy Act 1988.  The official departmental privacy
policy can be viewed on the department's website at www.immi.gov.au.  See:
http://www.immi.gov.au/functional/privacy.htm


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


</PRE>
]]></content></entry><entry><title>  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003779.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003779.html" /><updated>2010-01-31T20:14:47Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Fri, 2010-01-29 at 10:03 +0000, Hans-Juergen Rennau wrote:
&gt;<i> Dear People,
</I>&gt;<i> 
</I>&gt;<i> presently I am scribbling away at a little <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> framework 
</I>
A few years ago when I did http://www.fromoldbooks.org/Search/
using XQuery, I wrote my own.  It's far from perfect -- it
is a perl script that checks the system load average (!), and
the query parameters, and then reads an <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> config file, and
calls up an external xquery engine based on a variable -- so I
could easily switch between galax, qizx 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>, initially,
and later dbxml too.  It keeps a cache, to avoid firing up
a <a title="JVM" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">JVM</a> (two of those implementations are in Java) with each
incoming HTTP request, and does get fairly high cache hit rates.

It'd be a reasonable question, &quot;why not use servlets&quot;, and
a lot of the answer to that is that, when I wrote it, Sun's
licence for Java was such that Linux distributions couldn't
easily include it, and Java was a sufficient pain to set up that
I avoided any architecture that depended on it.  But then I
started using Saxon, and, later qizx, both of which do use Java.

More recently I've used dbxml, but not on the production system,
as the packaging for dbxml is even weirder than for Java, and
my server has changed operating systems several times over the years.

All this is a long winded way of saying, a lot of it depends on
the environment.  I'm particularly interested (since I work at <a title="W3C" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">W3C</a>...)
in what we could do to extend standardisation &quot;beyond the query&quot; into
more of a framework, and how, and what would be the value of that, but
I think the XQuery Working Group right now does not have the
resources to do that sort of work.

Liam


-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old <a title="books" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_book.html">books</a>: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org

</PRE>
]]></content></entry><entry><title>  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003775.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003775.html" /><updated>2010-01-29T22:44:37Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hans-Juergen Rennau schrieb am 29.01.2010 um 10:03:05 (+0000):

&gt;<i> So my *question*: would anybody like to point to some
</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> framework into which one may plug queries in order
</I>&gt;<i> to harvest added value,&#160;perhaps hinting at the kind of
</I>&gt;<i> advantage one obtains?
</I>
As George said, the term &quot;framework&quot; is a bit vague.

This might be of interest, although I'm not sure it is
much used or maintained:

Xaj: Simple XQuery <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/api/">API</a> 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>
http://xaj.sourceforge.net/

-- 
Michael Ludwig
</PRE>
]]></content></entry><entry><title>  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003777.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003777.html" /><updated>2010-01-29T22:04:46Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Florent, James, Dennis,

cordial thanks for your facts and comments! Trying to&#160;evaluate them. let me first&#160;indeed define&#160;the term &quot;framework&quot; for the purpose&#160;of this <a title="discussion" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discussion</a>. Taking as a starting point an isolated <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> module, a *framework* is a machinery enabling a more complex processing than provided by the XQuery module itself, thus&#160;controlling and in some way embedding the query execution within&#160;a larger processing model. So if we assume a query defines a processing P, the framework would provide for a composite processing, say, X-P-Y. A typical example is a web application, where the query execution is preceded by request evaluation and followed by response dispatchal..

Adopting this definition, I think that the following links relate to libraries, but not to frameworks:

http://www.expath.org
http://www.exquery.org
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/

And the servlet-like <a title="specification" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">specification</a> Florent spoke of would appear as a standard whose implementation would result in a framework.

The remaining links:
http://sausalito.28msec.com
http://code.google.com/p/xqmvc/

definitely refer to frameworks, and both are dedicated to creating web applications, in one case &quot;in general&quot;, in the other obeying the MVC pattern. Finally, as Florent&#160;pointed out, <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> database implementations&#160;usually contain such a framework, too.

This is an&#160;interesting first result: frameworks for creating web applications exist, and they are impressive,&#160;indeed! Frameworks for other purposes have not yet been mentioned.

Thank you again, with kind regards,
Hans-Juergen


__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verf&#252;gt &#252;ber einen herausragenden Schutz gegen Massenmails. 
http://mail.yahoo.com 

</PRE>
]]></content></entry><entry><title>  preceding:: and following:: over a collection
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003776.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003776.html" /><updated>2010-01-29T22:00:27Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> 
</I>&gt;<i> One straightforward solution is of course to generate a 
</I>&gt;<i> skeleton of the entire collection:
</I>&gt;<i> 
</I>&gt;<i> &lt;collection&gt;
</I>&gt;<i> &lt;year <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>:id=&quot;diary1797&quot;&gt;
</I>&gt;<i>  ....
</I>&gt;<i> &lt;month xml:id=&quot;diary1797-12&quot;&gt;
</I>&gt;<i> ...
</I>&gt;<i> &lt;day xml:id=&quot;diary1797-12-31/&gt;
</I>&gt;<i> &lt;/month&gt;
</I>&gt;<i> &lt;/year&gt;
</I>&gt;<i> &lt;year xml:id=&quot;diary1798&quot;&gt;
</I>&gt;<i>  &lt;month xml:id=&quot;diary1798-01&quot;&gt;
</I>&gt;<i>   &lt;day xml:id=&quot;diary1798-01-01&quot;/&gt;
</I>&gt;<i> ...
</I>&gt;<i> &lt;/month&gt;
</I>&gt;<i> &lt;/year&gt;
</I>&gt;<i> &lt;/collection&gt;
</I>&gt;<i> 
</I>
You might be able to do it by simply defining a sequence containing
(references to) the relevant nodes, rather than a newly constructed tree.
But I don't think there's a simple solution you're missing.

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>  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003774.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003774.html" /><updated>2010-01-29T16:01:47Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hans-Juergen Rennau wrote:

  Hi,

&gt;<i> So my *question*: would anybody like to point to some <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> framework into which one may plug queries in order to harvest
</I>&gt;<i> added value, perhaps hinting at the kind of advantage one
</I>&gt;<i> obtains?
</I>
  Just to add to responses sent by Jim and Dennis, I'd like to
say it depends what you mean by &quot;framework&quot;.  The definition of
this term is quite vague, and even when you have one definition,
it depends on what aspects to solve you are looking for after
frameworks.

  If you are looking for a way to evaluate queries on a server in
response to an HTTP request (well known as XQuery webapps), then
Sausalito is worth investigating.  Almost all <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> databases like
MarkLogic and eXist do also provide some way to plug queries into
their HTTP server.

  The drawback with this approach is that those solutions are all
dependent on the processor and/or the chosen framework.  As part
of EXPath, I'm trying to define a first version of a servlet-like
<a title="specification" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">specification</a>, that will be implementation-independent.  Its
success will depend on which extent implementors will adopt it.

  But I do not think this is really a framework.  This is more a
low-level technical piece to help developing larger frameworks in
a processor-independent way.  Sausalito for instance would be a
good example: if it was based on such a spec for its mapping
between HTTP and XQuery, it would be (for that part at least)
independent on the underlying processor.

  Any way, if you are interested by those matters, do not miss
the XML Prague 2010 conferences &lt;http://xmlprague.cz/&gt; :-)

  Regards,

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


      


</PRE>
]]></content></entry><entry><title>  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003773.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003773.html" /><updated>2010-01-29T15:41:46Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100129/71a4851c/attachment.htm
</PRE>
]]></content></entry><entry><title>  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003772.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003772.html" /><updated>2010-01-29T13:04:57Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>u prob know about these libraries

http://www.expath.org

http://www.exquery.org

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/

and then there is

http://code.google.com/p/xqmvc/

I am also creating a generic XQuery version (for use in eXist) that
kind of emulates xqmvc ... will release at some point soon.

James Fuller


On Fri, Jan 29, 2010 at 11:03 AM, Hans-Juergen Rennau &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Dear People,
</I>&gt;<i>
</I>&gt;<i> presently I am scribbling away at a little XQuery&#160;framework into which one may plug user-supplied queries, which pulls them into a particular larger processing model, using them as combinable building blocks. Suddenly my pen hovers in mid-air, I raise my head and, listening to the snowflakes rustling in the hedge, I wonder: probably some XQuery&#160;frameworks already exist, and we <a title="XQuery developers" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquerytalk/">XQuery developers</a> might really profit from being aware of them, so that, pushing the argument to its&#160;extreme, everytime we write a query we might immediately consider plugging it into this or that framework, to enhance its usefulness.
</I>&gt;<i>
</I>&gt;<i> So my *question*: would anybody like to point to some XQuery&#160;framework into which one may plug queries in order to harvest added value,&#160;perhaps hinting at the kind of advantage one obtains?
</I>&gt;<i>
</I>&gt;<i> With kind regards,
</I>&gt;<i> Hans-Juergen Rennau
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> PS: Before closing, one word about XProc. I would not regard the language itself&#160;as such a framework, rather as a toolkit for creating such frameworks, implementing them perhaps as a set of&#160;XProc documents.
</I>&gt;<i>
</I>&gt;<i> __________________________________________________
</I>&gt;<i> Do You Yahoo!?
</I>&gt;<i> Sie sind Spam leid? Yahoo! Mail verf&#252;gt &#252;ber einen herausragenden Schutz gegen Massenmails.
</I>&gt;<i> http://mail.yahoo.com
</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>  XQuery frameworks
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003771.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003771.html" /><updated>2010-01-29T10:03:05Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Dear People,

presently I am scribbling away at a little <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>&#160;framework into which one may plug user-supplied queries, which pulls them into a particular larger processing model, using them as combinable building blocks. Suddenly my pen hovers in mid-air, I raise my head and, listening to the snowflakes rustling in the hedge, I wonder: probably some XQuery&#160;frameworks already exist, and we <a title="XQuery developers" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquerytalk/">XQuery developers</a> might really profit from being aware of them, so that, pushing the argument to its&#160;extreme, everytime we write a query we might immediately consider plugging it into this or that framework, to enhance its usefulness.

So my *question*: would anybody like to point to some XQuery&#160;framework into which one may plug queries in order to harvest added value,&#160;perhaps hinting at the kind of advantage one obtains?

With kind regards,
Hans-Juergen Rennau


PS: Before closing, one word about XProc. I would not regard the language itself&#160;as such a framework, rather as a toolkit for creating such frameworks, implementing them perhaps as a set of&#160;XProc documents.

__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verf&#252;gt &#252;ber einen herausragenden Schutz gegen Massenmails. 
http://mail.yahoo.com 

</PRE>
]]></content></entry><entry><title>  help
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003769.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003769.html" /><updated>2010-01-28T15:52:56Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Take a look at <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a>, you could script that from either a .bat or .sh

On 28 January 2010 15:43, Jolene Meyer &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> I have a flat file that I am running thru Stylus Studio. Stylus Studio takes
</I>&gt;<i> the flat file and converts it to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> and then runs it thru an <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>
</I>&gt;<i>
</I>&gt;<i> Every time I need to process this I need to open stylus studio and <a title="press" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_news.html">press</a> the
</I>&gt;<i> run button.&#160; Is there a script I can run to run the xQuery so I can automate
</I>&gt;<i> this process?
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Thanks
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Jolene Meyer
</I>&gt;<i>
</I>&gt;<i> Computer Programmer/Analyst
</I>&gt;<i>
</I>&gt;<i> Endries Intl Inc, A Ferguson Subsidiary 714 W Ryan St PO Box 69 Brillion WI
</I>&gt;<i> 54110-0069 USA
</I>&gt;<i>
</I>&gt;<i> T: (920) 756-6168 F: (920) 756-6708
</I>&gt;<i>
</I>&gt;<i> E: http://x-query.com/mailman/listinfo/talk
</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>


-- 
Adam Retter

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

</PRE>
]]></content></entry><entry><title>  help
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003770.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003770.html" /><updated>2010-01-28T14:21:07Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Xmlsh comes <a title="The Saxon XSLT Processor" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xslt_processor.html">with Saxon powered xquery and xslt</a> scripting including  
flatfile conversions (csv2xml)

See www.xmlsh.org

-David lee

On Jan 28, 2010, at 9:52 AM, Adam Retter &lt;http://x-query.com/mailman/listinfo/talk&gt;  
wrote:

&gt;<i> Take a look at Saxon, you could script that from either a .bat or .sh
</I>&gt;<i>
</I>&gt;<i> On 28 January 2010 15:43, Jolene Meyer &lt;http://x-query.com/mailman/listinfo/talk&gt;  
</I>&gt;<i> wrote:
</I>&gt;&gt;<i> I have a flat file that I am running thru Stylus Studio. Stylus  
</I>&gt;&gt;<i> Studio takes
</I>&gt;&gt;<i> the flat file and converts it to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> and then runs it thru an xQuery.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Every time I need to process this I need to open stylus studio and  
</I>&gt;&gt;<i> <a title="press" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_news.html">press</a> the
</I>&gt;&gt;<i> run button.  Is there a script I can run to run the xQuery so I can  
</I>&gt;&gt;<i> automate
</I>&gt;&gt;<i> this process?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Thanks
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Jolene Meyer
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Computer Programmer/Analyst
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Endries Intl Inc, A Ferguson Subsidiary 714 W Ryan St PO Box 69  
</I>&gt;&gt;<i> Brillion WI
</I>&gt;&gt;<i> 54110-0069 USA
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> T: (920) 756-6168 F: (920) 756-6708
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> E: http://x-query.com/mailman/listinfo/talk
</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> Adam Retter
</I>&gt;<i>
</I>&gt;<i> skype :adam.retter
</I>&gt;<i> http://www.adamretter.org.uk
</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>  help
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003768.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003768.html" /><updated>2010-01-28T09:43:13Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>I have a flat file that I am running thru <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/">Stylus Studio</a>. Stylus Studio
takes the flat file and converts it to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> and then runs it thru an
<a title="xQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xQuery</a>.  

 

Every time I need to process this I need to open stylus studio and <a title="press" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_news.html">press</a>
the run button.  Is there a script I can run to run the xQuery so I can
automate this process?

 

Thanks

 

Jolene Meyer

Computer Programmer/Analyst

Endries Intl Inc, A Ferguson Subsidiary 714 W Ryan St PO Box 69 Brillion
WI 54110-0069 USA

T: (920) 756-6168 F: (920) 756-6708

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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100128/3b5f27fa/attachment.htm
</PRE>
]]></content></entry><entry><title>  Markdown
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003767.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003767.html" /><updated>2010-01-27T05:31:33Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Does anyone have an <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> implementation of Markdown or equivalent
handy? I need something that will turn basic text into XHTML.

-- 
Elliotte Rusty Harold
http://x-query.com/mailman/listinfo/talk
</PRE>
]]></content></entry><entry><title>  Looking to meet XQuery enthusiasts in your area?
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003766.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003766.html" /><updated>2010-01-26T09:30:00Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>I added a Map to the <a title="XML Wiki" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://wiki.stylusstudio.com/">Wiki</a>, the aim is that people can add themselves
to it so when organising a meetup you can easily see who is nearby and
my be interested. Perhaps people would like to add themselves to it?

http://<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>.pbworks.com/XQuery-Developers-Map



2010/1/25 William Candillon &lt;http://x-query.com/mailman/listinfo/talk&gt;:
&gt;<i> Hi,
</I>&gt;<i>
</I>&gt;<i> A couple of weeks ago we started a wiki at http://xquery.pbworks.com
</I>&gt;<i> in order to help XQuery enthusiasts from the same area to gather
</I>&gt;<i> around a snack and a beer.
</I>&gt;<i> Our aim is to promote knowledge sharing and best practice amongst
</I>&gt;<i> <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
</I>&gt;<i> organizing local meetups.
</I>&gt;<i>
</I>&gt;<i> Are you interested in organizing a meetup in your area?
</I>&gt;<i> The wiki contains some guidelines and tips of organizing such event.
</I>&gt;<i> Keep it small and informal, it's actually not much work and a lot of fun :-)
</I>&gt;<i>
</I>&gt;<i> Best regards,
</I>&gt;<i>
</I>&gt;<i> William
</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>  preceding:: and following:: over a collection
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003765.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003765.html" /><updated>2010-01-26T02:22:40Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>James Cummings wrote:

  Hi,

&gt;<i> In this case I have 48 years worth of transcribed historical
</I>&gt;<i> diary, with each day/month/year being one of the objects I want
</I>&gt;<i> to find the previous/next node for.  The query gets a parameter
</I>&gt;<i> in YYYY-MM-DD, YYYY-MM or YYYY format and returns the
</I>&gt;<i> appropriate year, month or day from the correct file because
</I>&gt;<i> this parameter value makes up part of the @<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>:id.  In each
</I>&gt;<i> instance I want to provide prevYear/nextYear,
</I>&gt;<i> prevMonth/nextMonth, prevDay/nextDay navigational links
</I>&gt;<i> regardless of the fact that I'm sitting on 1798-01-01 and the
</I>&gt;<i> 1797-12-31 (if it exists) is in the previous file.
</I>
  I didn't look in the details, but my first reaction to such a
problem would be to separate the navigation within the data on
the one hand and the formatting of them on the other hand.

  So in this case, I would first write a set of functions that
extract the correct data from the correct documents and walk
through them in the correct order.  At the place where each
subset of data has to be transformed during this navigation, you
call then a second set of functions, which handle the formatting
of a single one at a time.

  Hope that helps, regards,

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



      


</PRE>
]]></content></entry><entry><title>  preceding:: and following:: over a collection
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003763.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003763.html" /><updated>2010-01-26T00:14:02Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Mon, Jan 25, 2010 at 20:49, <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;<i> Yes, the code you've written doesn't solve the problem, for the reasons you
</I>&gt;<i> have discovered.
</I>&gt;<i>
</I>&gt;<i> Perhaps you could describe the problem: it's not easy to reverse-engineer it
</I>&gt;<i> from code that doesn't work.
</I>
Hi Mike,

In this case I have 48 years worth of transcribed historical diary,
with each day/month/year being one of the objects I want to find the
previous/next node for.  The query gets a parameter in YYYY-MM-DD,
YYYY-MM or YYYY format and returns the appropriate year, month or day
from the correct file because this parameter value makes up part of
the @<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>:id.  In each instance I want to provide prevYear/nextYear,
prevMonth/nextMonth, prevDay/nextDay navigational links regardless of
the fact that I'm sitting on 1798-01-01 and the 1797-12-31 (if it
exists) is in the previous file.

One straightforward solution is of course to generate a skeleton of
the entire collection:

&lt;collection&gt;
&lt;year xml:id=&quot;diary1797&quot;&gt;
 ....
&lt;month xml:id=&quot;diary1797-12&quot;&gt;
...
&lt;day xml:id=&quot;diary1797-12-31/&gt;
&lt;/month&gt;
&lt;/year&gt;
&lt;year xml:id=&quot;diary1798&quot;&gt;
 &lt;month xml:id=&quot;diary1798-01&quot;&gt;
  &lt;day xml:id=&quot;diary1798-01-01&quot;/&gt;
...
&lt;/month&gt;
&lt;/year&gt;
&lt;/collection&gt;

and use that as a lookup table...as then preceding::day[1]  (or month
or year) from the current id's location in that file would work and
give me just what I need.  However, that seemed like a terribly kludgy
workaround. (There are only 48 years of the diary...so that would be
some 18K elements....but all this makes me think I'm missing a much
easier way!)

Since my <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> knowledge still is at a basic level I'm happy for any
suggestions you might have.

-James Cummings
</PRE>
]]></content></entry><entry><title>  preceding:: and following:: over a collection
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003762.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003762.html" /><updated>2010-01-25T20:49:48Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> but my problem is that preceding:: and following:: seem to 
</I>&gt;<i> stop at the document boundary rather than the collection as a 
</I>&gt;<i> whole.  So, when I get to the first element of any document 
</I>&gt;<i> it doesn't find the next element as being the last one in the 
</I>&gt;<i> preceding file.
</I>&gt;<i> 
</I>&gt;<i> I realise I'm probably missing something simple here.
</I>
Yes, the code you've written doesn't solve the problem, for the reasons you
have discovered.

Perhaps you could describe the problem: it's not easy to reverse-engineer it
from code that doesn't work.

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>  preceding:: and following:: over a collection
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003761.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003761.html" /><updated>2010-01-25T20:12:19Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hiya,

I want to do something (fairly inefficient) like:

let $
let $elementOfInterest := collection(/db/files)//tei:*[@<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>:id=$elementID]
(...)
let $previousElementID :=
data($elementOfInterest/preceding::tei:ab[@type='foo'][1]/@xml:id)
let $followingElementID :=
data($elementOfInterest/following::tei:ab[@type='foo'][1]/@xml:id)

but my problem is that preceding:: and following:: seem to stop at the
document boundary rather than the collection as a whole.  So, when I
get to the first element of any document it doesn't find the next
element as being the last one in the preceding file.

I realise I'm probably missing something simple here.

Thanks for any help,

-James
</PRE>
]]></content></entry><entry><title>  [ANN] XQuery and XPath Full Text Test Suite version
	1.0.1
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003764.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003764.html" /><updated>2010-01-25T17:56:56Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>The <a title="W3C" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">W3C</a>'s <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> Query <a title="XSL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xsltedit1/xsltedit1.html">Working Group and XSL</a> Working Group are pleased 
to announce the availability of version 1.0.1 of the <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="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a> 
Full Text Test Suite (XQFTTS) at 
http://dev.w3.org/2007/xpath-full-text-10-test-suite/.  The tests 
suite contains information about how to run the test suite and how to 
submit the results (anonymously, if you desire).

XQFTTS 1.0.1 fixes a number of bugs reported against XQFTTS 1.0.0 and 
it reflects a small number of CR issues that have been resolved by 
the WGs. We encourage implementors who have sent us reports for 
XQFTTS 1.0.0 to run XQFTTS 1.0.1 and send us their final reports. 
Implementors who have not yet run the XQFTTS at all are strongly 
encouraged to run XQFTTF 1.0.1 and submit their implementation 
reports.  The reports that we have received provide a significant 
amount of the implementation experience that we need to request a 
transition to Proposed Recommendation. We would especially appreciate 
a report showing an implementation of Minimal Conformance using the 
XQueryX syntax.

We will continue to maintain and enhance the test suite after our 
transition to Proposed Recommendation. We do not expect to send out 
any further announcements about our test suite -- any <a title="news" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_news.html">news</a> or updates 
will be posted on our web page.

Thanks!
    Jim

========================================================================
Jim Melton --- Editor of ISO/IEC 9075-* (SQL)     Phone: +1.801.942.0144
   Chair, W3C XML Query WG; XQX (etc.) editor       Fax : +1.801.942.3345
<a title="Oracle" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/oracle.html">Oracle</a> Corporation        Oracle Email: jim dot melton at oracle dot com
1930 Viscounti Drive      Standards email: jim dot melton at acm dot org
Sandy, UT 84093-1063 USA          Personal email: jim at melton dot name
========================================================================
=  Facts are facts.   But any opinions expressed are the opinions      =
=  only of myself and may or may not reflect the opinions of anybody   =
=  else with whom I may or may not have discussed the issues at hand.  =
========================================================================  

</PRE>
]]></content></entry><entry><title>  Looking to meet XQuery enthusiasts in your area?
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003760.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003760.html" /><updated>2010-01-25T14:31:54Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,

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://<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>.pbworks.com
in order to help XQuery enthusiasts from the same area to gather
around a snack and a beer.
Our 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.

Are you interested in organizing a meetup in your area?
The wiki contains some guidelines and tips of organizing such event.
Keep it small and informal, it's actually not much work and a lot of fun :-)

Best regards,

William
</PRE>
]]></content></entry><entry><title>  XML/Xquery programmer job at Paris, France
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003754.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003754.html" /><updated>2010-01-21T15:42:28Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,

some readers on this list may be interested to know that there's a <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jobs.html">job
</a>opening at the OECD in Paris, France, for an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> Web programmer who
should, among other things, be knowledgable of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>, <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">Xquery</a> and
friends. For the full details, please see here:

http://www.oecd.org/hrm/vacancies (job number 3418).

Thanks,
Jakob.

PS: You may contact me off-list if you are interested in more
information. No recruiters please.
</PRE>
]]></content></entry><entry><title>  format-date
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003759.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003759.html" /><updated>2010-01-21T15:25:57Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>2010/1/21 David Carlisle &lt;http://x-query.com/mailman/listinfo/talk&gt;:
&gt;<i> On 21/01/2010 14:58, Andrew Welch wrote:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> appears to lacking a format-date() function... for example to
</I>&gt;&gt;<i> get &quot;21st Jan 2010&quot; I would use:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> format-date(xs:date('2010-01-21'), '[D1o] [MNn,*-3] [Y0001]')
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Do I need to do that manually in XQuery?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> thanks
</I>&gt;<i>
</I>&gt;<i> yes or wait for 1.1
</I>&gt;<i>
</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/2009/WD-xquery-11-requirements-20091215/#date-formatting
</I>
In the meantime you could use a concatenation of these functions -
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/c0002.html

...Or depending on the XQuery Engine Implementation that you are
using, they may provide an <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>, eXist-db provides the
datetime: extension namespace for such functions and I believe that
MarkLogic also offer something.


&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>


-- 
Adam Retter

skype :adam.retter
http://www.adamretter.org.uk
</PRE>
]]></content></entry><entry><title>  format-date
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003758.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003758.html" /><updated>2010-01-21T15:12:03Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>2010/1/21 David Carlisle &lt;http://x-query.com/mailman/listinfo/talk&gt;:
&gt;<i> On 21/01/2010 14:58, Andrew Welch wrote:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> appears to lacking a format-date() function... for example to
</I>&gt;&gt;<i> get &quot;21st Jan 2010&quot; I would use:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> format-date(xs:date('2010-01-21'), '[D1o] [MNn,*-3] [Y0001]')
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Do I need to do that manually in XQuery?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> thanks
</I>&gt;<i>
</I>&gt;<i> yes or wait for 1.1
</I>&gt;<i>
</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/2009/WD-xquery-11-requirements-20091215/#date-formatting
</I>
&quot;XQuery 1.1 MUST include additional library functions or an equivalent
mechanism to perform formatting of date and time values.&quot;

:<i>) that's pretty much how I feel about it....
</I>



thanks
-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
</PRE>
]]></content></entry><entry><title>  format-date
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003756.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003756.html" /><updated>2010-01-21T15:08:00Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On 21/01/2010 14:58, Andrew Welch wrote:
&gt;<i> <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> appears to lacking a format-date() function... for example to
</I>&gt;<i> get &quot;21st Jan 2010&quot; I would use:
</I>&gt;<i>
</I>&gt;<i> format-date(xs:date('2010-01-21'), '[D1o] [MNn,*-3] [Y0001]')
</I>&gt;<i>
</I>&gt;<i> Do I need to do that manually in XQuery?
</I>&gt;<i>
</I>&gt;<i> thanks
</I>
yes or wait for 1.1

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/2009/WD-xquery-11-requirements-20091215/#date-formatting

________________________________________________________________________
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>  format-date
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003755.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003755.html" /><updated>2010-01-21T14:58:23Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE><a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> appears to lacking a format-date() function... for example to
get &quot;21st Jan 2010&quot; I would use:

format-date(xs:date('2010-01-21'), '[D1o] [MNn,*-3] [Y0001]')

Do I need to do that manually in XQuery?

thanks
-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
</PRE>
]]></content></entry><entry><title>  format-date
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003757.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003757.html" /><updated>2010-01-21T10:12:03Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On 01/21/2010 09:58 AM, Andrew Welch wrote:
&gt;<i> <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> appears to lacking a format-date() function... for example to
</I>&gt;<i> get &quot;21st Jan 2010&quot; I would use:
</I>&gt;<i>
</I>&gt;<i> format-date(xs:date('2010-01-21'), '[D1o] [MNn,*-3] [Y0001]')
</I>&gt;<i>    
</I>
In XQuery 1.1, this function does exist:

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="XPath Validator" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">xpath</a>-functions-11/#formatting-dates-and-times

In XQuery 1.0, you do have to do it yourself.

Jonathan
</PRE>
]]></content></entry><entry><title>  XQuery Application Architect--St. Louis, MO
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003753.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003753.html" /><updated>2010-01-20T22:47:05Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>excellent

i know one man - author of first 100% based on metaprogramming
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>-based CMF (see http://describer.schematronic.org/) - he is one
of eXist-db.org developers his name Evgeny Gazdovsky (see
http://exist-db.org/credits.html), his family is very poor so you can
save some money and get great developer with clear mind and bright
future - i wish it work for me but have not money even to hire
housekeeper

2010/1/20 Mike Foster &lt;http://x-query.com/mailman/listinfo/talk&gt;
&gt;<i>
</I>&gt;<i> Hello,
</I>&gt;<i>
</I>&gt;<i> I hope everyone is doing well.&#160; I have a current opening with my client in St. Louis, MO for an Application Architect.&#160; Please let me know if you or anyone you may know would be interested.&#160; Not a fit? E-mail me your resume and I will try my best to find a&#160;closer fit!!&#160; Below is the job description:
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Application Architect
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Currently our client in the St. Louis, MO area is searching for an individual will responsible for all software development related to XQuery / Mark Logic <a title="functionality" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/buy/compare.html">functionality</a>. In this role, this Engineering Professional will work closely with internal and external teams using <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a>/J2EE, XQuery, and will also be developing new XQuery applications for ongoing data sets.&#160; Additionally, this individual will be an &#8220;expert&#8221; in these technologies and will act as a mentor and internal resource for expertise in these technologies within the company.
</I>&gt;<i>
</I>&gt;<i> Qualified applicants will have a very strong working knowledge of and hands-on experience with, W3C XML initiatives, specifically XML Query, <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSL</a> &amp; Mark Logic's XML server, along with strong analysis skills &amp; attention to detail.
</I>&gt;<i> Knowledge of development using ClearCase, Java &amp; Perl are preferred.
</I>&gt;<i> Candidates must have experience with XQuery, <a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a> &amp; XSL programming in a mission-critical, high-performance, secure Linux environment.
</I>&gt;<i> Up to 10% travel will be required.
</I>&gt;<i> This person must be a good communicator and work very well independently as well as a member of a high performing team.
</I>&gt;<i>
</I>&gt;<i> Additional Responsibilities:
</I>&gt;<i>
</I>&gt;<i> Partners with product development team (<a title="web development" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xhtml.html">web development</a>, content development and tech leads on shared services) to help drive product specification and provide guidance.
</I>&gt;<i> Constructs and implement the technical design for the organization's presence on the Internet. Owns the technical design of Web applications and write technical specifications, including information architecture, data design, and technical details.
</I>&gt;<i> Works with product team to define software products by consulting during specification stage, performing research, developing prototypes or proofs-of-concept, and acting as an expert technical contributor. Should be able to code if necessary with the development teams.
</I>&gt;<i> Contributes to general development efforts by producing documentation and training materials and conducting <a title="training sessions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/quickstart/">training sessions</a>.
</I>&gt;<i> Develops and maintain expertise in a wide range of industry technologies including emerging Internet technologies. Generate proposals for the management team and conduct presentation/training sessions for the development teams. Participate in standards, organizations and industry groups.
</I>&gt;<i> Works with the development teams to ensure implementation of the product vision. Provide communication and integration point to other parts of Engineering, IT, and System organization including other architects to identify and address any issues or impact those projects might have on those areas.
</I>&gt;<i> Focuses on web-specific technologies and scenarios and apply best practices, patterns, and oftentimes reference architectures around delivering web-native experiences with software. Should drive for uniformity across products to keep the technology / products simple, flexible, scalable and maintainable.
</I>&gt;<i> Sometimes responsible for creating original Web site content.
</I>&gt;<i> Responsible for ascertaining system volume and analyzing traffic patterns.
</I>&gt;<i> Is able to easily switch&#160;from being strategic to tactical.
</I>&gt;<i> Is on top of the new and emerging technologies.
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Requirements:
</I>&gt;<i>
</I>&gt;<i> Over 8-12 years of experience in product development, primarily around thin client UI development with 4-5 years in an architecture role round Web 2.0, Java, J2EE, RDBMS and Web Content Management Solutions and community features.
</I>&gt;<i> Good understanding of web browser design and W3C standards compliance/adoption, developing smart clients for targeted environments (Windows, Linux .NET/ Java SE/ME).&#160; Proficient in XHTML, CSS, AJAX, JavaScript, DHTML, DOM scripting, Xquery,xsl style sheets, templating engines
</I>&gt;<i> Good understanding of content syndication and aggregation scenarios and technologies such as RSS and ATOM, and data interconnectivity with web services APIs either via SOAP, REST for rich and loosely coupled functionality.
</I>&gt;<i> Good understanding of Search Engine optimizations, taxonomy development and management, semantic tagging and content engineering.
</I>&gt;<i> Exceptional knowledge of various Web development languages is required.
</I>&gt;<i> Well versed around session and state management, instrumentation, caching design, security and identity, smart client and mobile to web topologies, user experience patterns and practices, performance and scalability considerations,&#160;service-oriented architecture, and very importantly, peer-to-peer architecture and design.
</I>&gt;<i> Well versed with composite application designs and the associated patterns such as dependency Injection (inversion of control) and associated frameworks.
</I>&gt;<i> Knowledgeable on open source technologies and emerging Internet technologies.
</I>&gt;<i> Knowledge of technologies such as Adobe Flash, Flex, native XML databases, web content management system, publishing background is an added bonus.
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Be sure to attach an MS Word (.doc) version of your resume along with 3 Professional references to be considered!
</I>&gt;<i>
</I>&gt;<i> McGrath Systems
</I>&gt;<i> Where people and performance meet.
</I>&gt;<i>
</I>&gt;<i> Join the team at McGrath Systems! We are staffing leaders employing people in various Technical, Engineering, Information Technology, Aerospace &amp; Defense, Manufacturing, Energy, and Accounting &amp; Finance positions throughout the Continental US. If you are looking for a great opportunity, competitive wage and a career path to success, call us right now! We offer comprehensive benefits to include medical, dental, 401k as well as periodic bonuses!!!
</I>&gt;<i> 3
</I>&gt;<i>
</I>&gt;<i> Ranked 2nd fastest growing privately held company - 2008 Philadelphia 100
</I>&gt;<i>
</I>&gt;<i> Top 10 Local Recruiting Firm&#160;2006, 2007 &amp; 2008 - Philadelphia Business Journal
</I>&gt;<i>
</I>&gt;<i> To see more opportunities visit us at:
</I>&gt;<i>
</I>&gt;<i> www.mcgrathsystems.com
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Thank you,
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Mike Foster, CIR
</I>&gt;<i> Senior Technical Recruiter
</I>&gt;<i>
</I>&gt;<i> McGrath Systems
</I>&gt;<i> Where People and Performance Meet
</I>&gt;<i>
</I>&gt;<i> 1777 Sentry Parkway West | Suite 110 | Gwynedd Hall
</I>&gt;<i> Blue Bell, PA&#160; 19422
</I>&gt;<i> P: 610.238.5306 ext: 227 | F: 610.238.5308| www.mcgrathsystems.com
</I>&gt;<i>
</I>&gt;<i> Facebook Me!!!
</I>&gt;<i>
</I>&gt;<i> Follow me on Twitter!!!
</I>&gt;<i>
</I>&gt;<i> LinkedIn Profile!!!
</I>&gt;<i>
</I>&gt;<i> 2010 Emerging Business of the Year - Philadelphia Chamber of Commerce
</I>&gt;<i>
</I>&gt;<i> Ranked one of the fastest growing privately held companies 2008 &amp; 2009 - Philadelphia 100
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> P&#160;Please consider the environment before printing this e-mail
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> This message is for the named person's use only. It may contain confidential, proprietary or legally privileged material. No confidentiality or privilege is waived by any accidental or unintentional transmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient and reply immediately to the sender to inform person of error.
</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>  xsl:copy equivalent in XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003751.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003751.html" /><updated>2010-01-20T16:04:14Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>sorry, as a few pointed out, made a mistake with the pdf version

http://www.webcomposite.com/resource/pdf/x-advxquery-pdf.pdf

hth, James Fuller

On Wed, Jan 20, 2010 at 2:44 PM, James Fuller
&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Hello Elliotte,
</I>&gt;<i>
</I>&gt;<i> you might find my article on Advanced <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> useful
</I>&gt;<i>
</I>&gt;<i> http://www.ibm.com/developerworks/edu/x-dw-x-advxquery.html
</I>&gt;<i>
</I>&gt;<i> .. if u cant be bothered with IBM logon I have a pdf on my site here
</I>&gt;<i>
</I>&gt;<i> http://www.ibm.com/developerworks/edu/x-dw-x-advxquery.html
</I>&gt;<i>
</I>&gt;<i> hth, James Fuller
</I>&gt;<i>
</I>&gt;<i> On Wed, Jan 20, 2010 at 2:20 PM, Elliotte Rusty Harold
</I>&gt;<i> &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
</I>&gt;&gt;<i> &lt;blockquote cite=&quot;foo&quot;&gt;
</I>&gt;&gt;<i> foo
</I>&gt;&gt;<i> &lt;p&gt;bar&lt;/p&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> <a title="DOM Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">other random</a> text and elements
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &lt;/blockquote&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> into this
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &lt;blockquote cite=&quot;foo&quot;&gt;&lt;div&gt;
</I>&gt;&gt;<i> foo
</I>&gt;&gt;<i> &lt;p&gt;bar&lt;/p&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> other random text and elements
</I>&gt;&gt;<i> &lt;/div&gt;
</I>&gt;&gt;<i> &lt;/blockquote&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> That is, I just want to add the div around the content, but preserve
</I>&gt;&gt;<i> everything else.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> This is straight-forward in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>. Is it as hard in XQuery as it seems
</I>&gt;&gt;<i> to me? Or am I missing something obvious? What I need is an equivalent
</I>&gt;&gt;<i> of the xsl:copy function.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> --
</I>&gt;&gt;<i> Elliotte Rusty Harold
</I>&gt;&gt;<i> http://x-query.com/mailman/listinfo/talk
</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>  xsl:copy equivalent in XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003749.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003749.html" /><updated>2010-01-20T14:44:06Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello Elliotte,

you might find my article on Advanced <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> useful

http://www.ibm.com/developerworks/edu/x-dw-x-advxquery.html

.. if u cant be bothered with IBM logon I have a pdf on my site here

http://www.ibm.com/developerworks/edu/x-dw-x-advxquery.html

hth, James Fuller

On Wed, Jan 20, 2010 at 2:20 PM, Elliotte Rusty Harold
&lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> &lt;blockquote cite=&quot;foo&quot;&gt;
</I>&gt;<i> foo
</I>&gt;<i> &lt;p&gt;bar&lt;/p&gt;
</I>&gt;<i>
</I>&gt;<i> <a title="DOM Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">other random</a> text and elements
</I>&gt;<i>
</I>&gt;<i> &lt;/blockquote&gt;
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> into this
</I>&gt;<i>
</I>&gt;<i> &lt;blockquote cite=&quot;foo&quot;&gt;&lt;div&gt;
</I>&gt;<i> foo
</I>&gt;<i> &lt;p&gt;bar&lt;/p&gt;
</I>&gt;<i>
</I>&gt;<i> other random text and elements
</I>&gt;<i> &lt;/div&gt;
</I>&gt;<i> &lt;/blockquote&gt;
</I>&gt;<i>
</I>&gt;<i> That is, I just want to add the div around the content, but preserve
</I>&gt;<i> everything else.
</I>&gt;<i>
</I>&gt;<i> This is straight-forward in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>. Is it as hard in XQuery as it seems
</I>&gt;<i> to me? Or am I missing something obvious? What I need is an equivalent
</I>&gt;<i> of the xsl:copy function.
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> Elliotte Rusty Harold
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</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>  xsl:copy equivalent in XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003748.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003748.html" /><updated>2010-01-20T14:34:56Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>How about:

let $quote :=
&lt;blockquote cite=&quot;foo&quot;&gt;
foo
&lt;p&gt;bar&lt;/p&gt;
<a title="DOM Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">other random</a> text and elements
&lt;/blockquote&gt;
return
    &lt;blockquote&gt;{$quote/@*}&lt;div&gt;{$quote/node()}&lt;/div&gt;&lt;/blockquote&gt;

If you need to apply several transformations like this, using a
recursive function might work best:

declare function local:filter($node as node()) {
    typeswitch ($node)
        case element(blockquote) return
            &lt;blockquote&gt;{$node/@*}&lt;div&gt;{$node/node()}&lt;/div&gt;&lt;/blockquote&gt;
        case element() return
            element { node-name($node) } { for $child in $node/node()
return local:transform($child) }
        default return
            $node
};
</PRE>
]]></content></entry><entry><title>  XQuery Application Architect--St. Louis, MO
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003752.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003752.html" /><updated>2010-01-20T14:12:59Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Skipped content of type multipart/related-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Foster .vcf
Type: text/x-vcard
Size: 624 bytes
Desc: Michael Foster .vcf
Url : http://x-query.com/pipermail/talk/attachments/20100120/30025317/MichaelFoster-0001.vcf
</PRE>
]]></content></entry><entry><title>  xsl:copy equivalent in XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003750.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003750.html" /><updated>2010-01-20T13:48:17Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On 20/01/2010 13:20, Elliotte Rusty Harold wrote:
&gt;<i> &lt;blockquote cite=&quot;foo&quot;&gt;
</I>&gt;<i> foo
</I>&gt;<i> &lt;p&gt;bar&lt;/p&gt;
</I>&gt;<i>
</I>&gt;<i> <a title="DOM Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">other random</a> text and elements
</I>&gt;<i>
</I>&gt;<i> &lt;/blockquote&gt;
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> into this
</I>&gt;<i>
</I>&gt;<i> &lt;blockquote cite=&quot;foo&quot;&gt;&lt;div&gt;
</I>&gt;<i> foo
</I>&gt;<i> &lt;p&gt;bar&lt;/p&gt;
</I>&gt;<i>
</I>&gt;<i> other random text and elements
</I>&gt;<i> &lt;/div&gt;
</I>&gt;<i> &lt;/blockquote&gt;
</I>&gt;<i>
</I>&gt;<i> That is, I just want to add the div around the content, but preserve
</I>&gt;<i> everything else.
</I>&gt;<i>
</I>&gt;<i> This is straight-forward in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>. Is it as hard in <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> as it seems
</I>&gt;<i> to me? Or am I missing something obvious? What I need is an equivalent
</I>&gt;<i> of the xsl:copy function.
</I>&gt;<i>
</I>
there isn't xsl;copy but there is xsl:element name=&quot;{name()}&quot; which is 
more or less the same thing.

let $s :=
&lt;blockquote cite=&quot;foo&quot;&gt;

stuff &lt;br/&gt; more
&lt;/blockquote&gt;
return

element {node-name($s)} {$s/@*,&lt;div&gt;{$s/node()}&lt;/div&gt;}









________________________________________________________________________
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. 
________________________________________________________________________
</PRE>
]]></content></entry><entry><title>  xsl:copy equivalent in XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003747.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003747.html" /><updated>2010-01-20T08:20:16Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&lt;blockquote cite=&quot;foo&quot;&gt;
foo
&lt;p&gt;bar&lt;/p&gt;

<a title="DOM Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">other random</a> text and elements

&lt;/blockquote&gt;


into this

&lt;blockquote cite=&quot;foo&quot;&gt;&lt;div&gt;
foo
&lt;p&gt;bar&lt;/p&gt;

other random text and elements
&lt;/div&gt;
&lt;/blockquote&gt;

That is, I just want to add the div around the content, but preserve
everything else.

This is straight-forward in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>. Is it as hard in <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> as it seems
to me? Or am I missing something obvious? What I need is an equivalent
of the xsl:copy function.

-- 
Elliotte Rusty Harold
http://x-query.com/mailman/listinfo/talk
</PRE>
]]></content></entry><entry><title>  Lookup tables or equivalent
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003746.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003746.html" /><updated>2010-01-19T14:26:20Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>

&gt;<i> The solutions we've seen have all more than likely been linear searches 
</I>&gt;<i> (an implementation could do better but I think it's unlikely)
</I>
That was one reason I sugested switching to elements rather than string
sequences as (perhaps) it is more likely that they get indexed (in <a title="xslt" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">xslt</a>
you could force indexing with xsl:key) but I didn't mention that as it's
not clear which processeors would index what, especially if the actual
data only has length 12.

David
</PRE>
]]></content></entry><entry><title>  Lookup tables or equivalent
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003745.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003745.html" /><updated>2010-01-19T14:24:57Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> 
</I>&gt;<i> These all look good. What if we generalize the problem? Given 
</I>&gt;<i> an ordered list of N values (not necessarily strings) map 
</I>&gt;<i> each one to another value (not necessarily a number).
</I>&gt;<i> 
</I>
Use an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> lookup table

&lt;data&gt;
  &lt;item code=&quot;s&quot; value=&quot;sugar&quot;/&gt;
  &lt;item code=&quot;t&quot; value=&quot;tea&quot;/&gt;
  ...
&lt;/data&gt;

<a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a>-EE will generally implement the lookup $data/item[@code=$c] by
building an index.

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>  Lookup tables or equivalent
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003744.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003744.html" /><updated>2010-01-19T14:22:49Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>

&gt;<i> This is why I wouldn't put key values as element names.  It also limits you 
</I>&gt;<i> to valid element names.
</I>&gt;<i> I would use attributes or values as key values.
</I>
so would I probably, but it wouldn't look as interesting in a <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing
list</a> reply.


&gt;<i> When I start getting complicated maps I generate a <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> structure like this
</I>&gt;<i> &lt;map&gt;
</I>&gt;<i>    &lt;entry key=&quot;key&quot;&gt;Value&lt;/entry&gt;
</I>&gt;<i> ...
</I>&gt;<i> &lt;/map&gt;
</I>
yes definitely: that was probably the main point of my reply (but perhaps
obsured by the coding style I chose:-) that in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> you can use xml
structure to  make more interesting mapping structures, you are not
restricted to integer indexed indexing into lists of strings.

David
</PRE>
]]></content></entry><entry><title>  Lookup tables or equivalent
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003743.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003743.html" /><updated>2010-01-19T14:13:51Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>The solutions we've seen have all more than likely been linear searches 
(an implementation could do better but I think it's unlikely). Using 
either <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> structure (for string based keys/values), or the closure 
facilities of higher order functions (<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> WD, works with keys / 
values of any type), it is also possible to build binary search trees 
like a red/black tree. I don't know of any publicly available XQuery 
modules which implement that yet, but I've written one myself that uses 
XQuery 1.1 higher order functions.

John

Elliotte Rusty Harold wrote:
&gt;<i> These all look good. What if we generalize the problem? Given an
</I>&gt;<i> ordered list of N values (not necessarily strings) map each one to
</I>&gt;<i> another value (not necessarily a number).
</I>&gt;<i> 
</I>&gt;<i> I suppose you could use two elements. E.g.
</I>&gt;<i> 
</I>&gt;<i> &lt;keys&gt;&lt;January/&gt;&lt;February/&gt;&lt;March/&gt;&lt;April/&gt;...&lt;/keys&gt;
</I>&gt;<i> &lt;values&gt;&lt;foo/&gt;&lt;bar/&gt;&lt;baz/&gt;&lt;foo/&gt;...&lt;/values&gt;
</I>&gt;<i> 
</I>&gt;<i> Then use the position of the key to select the right value.
</I>&gt;<i> 
</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>  Lookup tables or equivalent
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003742.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003742.html" /><updated>2010-01-19T13:51:55Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
index-of((&quot;January&quot;, &quot;February&quot;, ...), $m)

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 Elliotte Rusty Harold
</I>&gt;<i> Sent: 19 January 2010 12:16
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject:  Lookup tables or equivalent
</I>&gt;<i> 
</I>&gt;<i> Simple problem. I want an <a title="Using XQuery Functions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/xquery_functions.html">XQuery  function</a> that turns an 
</I>&gt;<i> English month name string such  &quot;February&quot; into the 
</I>&gt;<i> equivalent number such as 2.
</I>&gt;<i> 
</I>&gt;<i> Is there any prettier way to do this than if-then-else nested 
</I>&gt;<i> 12 levels deep? E.g. a switch statement or a map or some such?
</I>&gt;<i> 
</I>&gt;<i> --
</I>&gt;<i> Elliotte Rusty Harold
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</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>  Lookup tables or equivalent
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003741.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003741.html" /><updated>2010-01-19T13:49:40Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
index-of((&quot;January&quot;, &quot;February&quot;, ...), $m)

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 Elliotte Rusty Harold
</I>&gt;<i> Sent: 19 January 2010 12:16
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject:  Lookup tables or equivalent
</I>&gt;<i> 
</I>&gt;<i> Simple problem. I want an <a title="Using XQuery Functions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/xquery_functions.html">XQuery  function</a> that turns an 
</I>&gt;<i> English month name string such  &quot;February&quot; into the 
</I>&gt;<i> equivalent number such as 2.
</I>&gt;<i> 
</I>&gt;<i> Is there any prettier way to do this than if-then-else nested 
</I>&gt;<i> 12 levels deep? E.g. a switch statement or a map or some such?
</I>&gt;<i> 
</I>&gt;<i> --
</I>&gt;<i> Elliotte Rusty Harold
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</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>  Lookup tables or equivalent
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003740.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003740.html" /><updated>2010-01-19T13:46:36Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
index-of((&quot;January&quot;, &quot;February&quot;, ...), $m)

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 Elliotte Rusty Harold
</I>&gt;<i> Sent: 19 January 2010 12:16
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject:  Lookup tables or equivalent
</I>&gt;<i> 
</I>&gt;<i> Simple problem. I want an <a title="Using XQuery Functions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/xquery_functions.html">XQuery  function</a> that turns an 
</I>&gt;<i> English month name string such  &quot;February&quot; into the 
</I>&gt;<i> equivalent number such as 2.
</I>&gt;<i> 
</I>&gt;<i> Is there any prettier way to do this than if-then-else nested 
</I>&gt;<i> 12 levels deep? E.g. a switch statement or a map or some such?
</I>&gt;<i> 
</I>&gt;<i> --
</I>&gt;<i> Elliotte Rusty Harold
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</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>  Lookup tables or equivalent
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003739.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003739.html" /><updated>2010-01-19T13:42:37Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> These all look good. What if we generalize the problem? Given an
</I>&gt;<i> ordered list of N values (not necessarily strings) map each one to
</I>&gt;<i> another value (not necessarily a number).
</I>
index-of(...) would still be a valid solution as it can operate on a
sequence of any atomic type, not just strings -
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="XPath Validator" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">xpath</a>-functions/#func-index-of


&gt;<i> I suppose you could use two elements. E.g.
</I>&gt;<i>
</I>&gt;<i> &lt;keys&gt;&lt;January/&gt;&lt;February/&gt;&lt;March/&gt;&lt;April/&gt;...&lt;/keys&gt;
</I>&gt;<i> &lt;values&gt;&lt;foo/&gt;&lt;bar/&gt;&lt;baz/&gt;&lt;foo/&gt;...&lt;/values&gt;
</I>&gt;<i>
</I>&gt;<i> Then use the position of the key to select the right value.
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> Elliotte Rusty Harold
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</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>  Lookup tables or equivalent
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003738.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003738.html" /><updated>2010-01-19T13:39:03Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
index-of((&quot;January&quot;, &quot;February&quot;, ...), $m)

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 Elliotte Rusty Harold
</I>&gt;<i> Sent: 19 January 2010 12:16
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject:  Lookup tables or equivalent
</I>&gt;<i> 
</I>&gt;<i> Simple problem. I want an <a title="Using XQuery Functions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/xquery_functions.html">XQuery  function</a> that turns an 
</I>&gt;<i> English month name string such  &quot;February&quot; into the 
</I>&gt;<i> equivalent number such as 2.
</I>&gt;<i> 
</I>&gt;<i> Is there any prettier way to do this than if-then-else nested 
</I>&gt;<i> 12 levels deep? E.g. a switch statement or a map or some such?
</I>&gt;<i> 
</I>&gt;<i> --
</I>&gt;<i> Elliotte Rusty Harold
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</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>  Lookup tables or equivalent
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003735.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003735.html" /><updated>2010-01-19T13:01:59Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
Others have suggested strings and index-of. An alternative, more
<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>-oriented, version  would be

&lt;x&gt;&lt;January/&gt;&lt;February/&gt;&lt;March/&gt;&lt;April/&gt;...&lt;/x&gt;/February/count(preceding-sibling::*)+1


or to avoid the possibly linear sibling count, 

&lt;x&gt;&lt;January n=&quot;1&quot;/&gt;&lt;February n=&quot;2&quot;/&gt;&lt;March n=&quot;3&quot;/&gt;&lt;April n=&quot;4&quot;/&gt;...&lt;/x&gt;/February/number(@n)


David
</PRE>
]]></content></entry><entry><title>  Lookup tables or equivalent
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003733.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003733.html" /><updated>2010-01-19T12:21:50Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>index-of((&quot;January&quot;, &quot;February&quot;, &quot;March&quot;, &quot;April&quot;), &quot;February&quot;)



2010/1/19 Elliotte Rusty Harold &lt;http://x-query.com/mailman/listinfo/talk&gt;:
&gt;<i> Simple problem. I want an <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> &#160;function that turns an English month
</I>&gt;<i> name string such &#160;&quot;February&quot; into the equivalent number such as 2.
</I>&gt;<i>
</I>&gt;<i> Is there any prettier way to do this than if-then-else nested 12
</I>&gt;<i> levels deep? E.g. a switch statement or a map or some such?
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> Elliotte Rusty Harold
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</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>  Lookup tables or equivalent
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003737.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003737.html" /><updated>2010-01-19T08:39:19Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>This solution gets a little more tedious if the month name comes as data 
instead of hard-coded in the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>.
E,g you have to do something like

    let $months := &lt;x&gt;&lt;Janurary/&gt; ... &lt;/x&gt;,
         $month := &quot;March&quot; (: or some extracted value :)
   return  $months/*[node-name(.) eq $month]/count(preceding-sibling::*)+1

This is why I wouldn't put key values as element names.  It also limits you 
to valid element names.
I would use attributes or values as key values.

When I start getting complicated maps I generate a <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> structure like this
&lt;map&gt;
   &lt;entry key=&quot;key&quot;&gt;Value&lt;/entry&gt;
...
&lt;/map&gt;

This gives you atomic types for keys and (almost) any xdm value value for 
the value.


Having keys be non-strings or numbers gets a bit trickier and difficult to 
generalize.
You have to start defining what equality is in something like
     &lt;entry&gt;
       &lt;key&gt;&lt;node&gt;key value&lt;/node&gt;&lt;/key&gt;
       &lt;value&gt;&lt;node&gt;value&lt;/node&gt;&lt;/value&gt;
    &lt;/entry&gt;


Defining equality for &lt;node&gt; is generally not a generically answerable 
question.
Whereas using atomic values for keys is comparable universally with &quot;eq&quot;

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


--------------------------------------------------
From: &quot;David Carlisle&quot; &lt;http://x-query.com/mailman/listinfo/talk&gt;
Sent: Tuesday, January 19, 2010 8:01 AM
To: &lt;http://x-query.com/mailman/listinfo/talk&gt;; &lt;http://x-query.com/mailman/listinfo/talk&gt;
Subject: Re:  Lookup tables or equivalent

&gt;<i>
</I>&gt;<i> Others have suggested strings and index-of. An alternative, more
</I>&gt;<i> xml-oriented, version  would be
</I>&gt;<i>
</I>&gt;<i> &lt;x&gt;&lt;January/&gt;&lt;February/&gt;&lt;March/&gt;&lt;April/&gt;...&lt;/x&gt;/February/count(preceding-sibling::*)+1
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> or to avoid the possibly linear sibling count,
</I>&gt;<i>
</I>&gt;<i> &lt;x&gt;&lt;January n=&quot;1&quot;/&gt;&lt;February n=&quot;2&quot;/&gt;&lt;March n=&quot;3&quot;/&gt;&lt;April 
</I>&gt;<i> n=&quot;4&quot;/&gt;...&lt;/x&gt;/February/number(@n)
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> David
</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>  Lookup tables or equivalent
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003736.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003736.html" /><updated>2010-01-19T08:10:59Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>These all look good. What if we generalize the problem? Given an
ordered list of N values (not necessarily strings) map each one to
another value (not necessarily a number).

I suppose you could use two elements. E.g.

&lt;keys&gt;&lt;January/&gt;&lt;February/&gt;&lt;March/&gt;&lt;April/&gt;...&lt;/keys&gt;
&lt;values&gt;&lt;foo/&gt;&lt;bar/&gt;&lt;baz/&gt;&lt;foo/&gt;...&lt;/values&gt;

Then use the position of the key to select the right value.

-- 
Elliotte Rusty Harold
http://x-query.com/mailman/listinfo/talk
</PRE>
]]></content></entry><entry><title>  Lookup tables or equivalent
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003734.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003734.html" /><updated>2010-01-19T07:24:46Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>declare variable $months := 
(&quot;Janurary&quot;,&quot;Feburary&quot;,&quot;March&quot;,&quot;April&quot;,&quot;May&quot;,&quot;June&quot;,&quot;July&quot;,&quot;August&quot;,&quot;September&quot;,&quot;October&quot;,&quot;November&quot;,&quot;December&quot;);

fn:index-of($months,&quot;March&quot;)


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


--------------------------------------------------
From: &quot;Elliotte Rusty Harold&quot; &lt;http://x-query.com/mailman/listinfo/talk&gt;
Sent: Tuesday, January 19, 2010 7:16 AM
To: &lt;http://x-query.com/mailman/listinfo/talk&gt;
Subject:  Lookup tables or equivalent

&gt;<i> Simple problem. I want an <a title="Using XQuery Functions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/xquery_functions.html">XQuery  function</a> that turns an English month
</I>&gt;<i> name string such  &quot;February&quot; into the equivalent number such as 2.
</I>&gt;<i>
</I>&gt;<i> Is there any prettier way to do this than if-then-else nested 12
</I>&gt;<i> levels deep? E.g. a switch statement or a map or some such?
</I>&gt;<i>
</I>&gt;<i> -- 
</I>&gt;<i> Elliotte Rusty Harold
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</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>  Lookup tables or equivalent
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003732.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003732.html" /><updated>2010-01-19T07:16:07Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Simple problem. I want an <a title="Using XQuery Functions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/xquery_functions.html">XQuery  function</a> that turns an English month
name string such  &quot;February&quot; into the equivalent number such as 2.

Is there any prettier way to do this than if-then-else nested 12
levels deep? E.g. a switch statement or a map or some such?

-- 
Elliotte Rusty Harold
http://x-query.com/mailman/listinfo/talk
</PRE>
]]></content></entry><entry><title>  &amp;quot;XQuery 1.1 was not enabled when invoking Saxon&amp;quot;
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003731.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003731.html" /><updated>2010-01-18T10:39:17Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>oXygen does not enable the XQuery 1.1 support 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> EE. We will add 
this as an option in the next release, in a couple of months.

Best Regards,
George
-- 
George Cristian Bina
&lt;oXygen/&gt; <a title="XML Editor" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/">XML Editor</a>, 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

<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;<i> i just want to learn about new XQuery 1.1 features - i got 
</I>&gt;&gt;<i> this message from trial version of OxygenXML but did not find 
</I>&gt;&gt;<i> something for XQuery 1.1 in Options...
</I>&gt;<i> 
</I>&gt;<i> Oxygen enables Saxon-EE features, so you should be able to use this.
</I>&gt;<i> 
</I>&gt;<i> I haven't actually got the latest version of Oxygen installed, so I can't
</I>&gt;<i> point you to the right buttons to <a title="press" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_news.html">press</a>. I suggest you ask them for advice.
</I>&gt;<i> They are always very ready to help.
</I>&gt;<i> 
</I>&gt;<i> It does help to say what you are doing when you raise a question on a <a title="forum" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">forum</a>.
</I>&gt;<i> If you had said you were using Oxygen, we could have wasted less time.
</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> BTW i start to learn XSLT 1.0 from draft too in previous 
</I>&gt;&gt;<i> millenium - do you remenber &quot;sort&quot; in draft was as attribute 
</I>&gt;&gt;<i> (not as xsl:sort element)? ;)
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> so i think it ok if something will change - i am 
</I>&gt;&gt;<i> metaprogramming fan so syntax changes not problem at all for me
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> for me main problem when nothing changes - at this &quot;stalled&quot; 
</I>&gt;&gt;<i> time i think about death as &quot;act of creation&quot;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> for now i have not money nor for OxygenXML nor for SaxonEE - 
</I>&gt;&gt;<i> what about possibility to get license &quot;on trust&quot;?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> 2010/1/17 Michael Kay &lt;http://x-query.com/mailman/listinfo/talk&gt;:
</I>&gt;&gt;&gt;&gt;<i> To be less flippant, XQuery 1.1 does not yet exists -- there is a 
</I>&gt;&gt;&gt;&gt;<i> draft, but no actual final language.  Saxon PE 9.2, 
</I>&gt;&gt;<i> acording to Mike 
</I>&gt;&gt;&gt;&gt;<i> Kay's web page [1] does have some XQuery 1.1 features, and 
</I>&gt;&gt;<i> if you are 
</I>&gt;&gt;&gt;&gt;<i> using those you need to check your support contract (since 
</I>&gt;&gt;<i> Saxon PE 
</I>&gt;&gt;&gt;&gt;<i> is a commercial product).
</I>&gt;&gt;&gt;<i> Indeed, the reason that Saxon makes you jump through several hoops 
</I>&gt;&gt;&gt;<i> before you can use XQuery 1.1 features is to ensure that 
</I>&gt;&gt;<i> you don't do 
</I>&gt;&gt;&gt;<i> it without thinking twice about it: the specification may 
</I>&gt;&gt;<i> change, the 
</I>&gt;&gt;&gt;<i> product may change, and your queries may stop working.
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> Regards,
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> Michael Kay
</I>&gt;&gt;&gt;<i> http://www.saxonica.com/
</I>&gt;&gt;&gt;<i> http://twitter.com/michaelhkay
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&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>  &amp;quot;XQuery 1.1 was not enabled when invoking Saxon&amp;quot;
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003729.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003729.html" /><updated>2010-01-17T01:22:02Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>i just want to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/learn_xml.html">learn</a> about new <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> features - i got this
message from trial version of OxygenXML but did not find something for
XQuery 1.1 in Options...

BTW i start to learn <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT 1.0</a> from draft too in previous millenium -
do you remenber &quot;sort&quot; in draft was as attribute (not as xsl:sort
element)? ;)

so i think it ok if something will change - i am metaprogramming fan
so syntax changes not problem at all for me

for me main problem when nothing changes - at this &quot;stalled&quot; time i
think about death as &quot;act of creation&quot;

for now i have not money nor for OxygenXML nor for SaxonEE - what
about possibility to get license &quot;on trust&quot;?

2010/1/17 <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;&gt;<i>
</I>&gt;&gt;<i> To be less flippant, XQuery 1.1 does not yet exists -- there
</I>&gt;&gt;<i> is a draft, but no actual final language. &#160;<a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> PE 9.2,
</I>&gt;&gt;<i> acording to Mike Kay's web page [1] does have some XQuery 1.1
</I>&gt;&gt;<i> features, and if you are using those you need to check your
</I>&gt;&gt;<i> support contract (since Saxon PE is a commercial product).
</I>&gt;<i>
</I>&gt;<i> Indeed, the reason that Saxon makes you jump through several hoops before
</I>&gt;<i> you can use XQuery 1.1 features is to ensure that you don't do it without
</I>&gt;<i> thinking twice about it: the <a title="specification" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">specification</a> may change, the product may
</I>&gt;<i> change, and your queries may stop working.
</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>
</PRE>
]]></content></entry><entry><title>  &amp;quot;XQuery 1.1 was not enabled when invoking Saxon&amp;quot;
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003730.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003730.html" /><updated>2010-01-16T22:36:40Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> 
</I>&gt;<i> i just want to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/learn_xml.html">learn</a> about new XQuery 1.1 features - i got 
</I>&gt;<i> this message from trial version of OxygenXML but did not find 
</I>&gt;<i> something for XQuery 1.1 in Options...
</I>
Oxygen enables <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a>-EE features, so you should be able to use this.

I haven't actually got the latest version of Oxygen installed, so I can't
point you to the right buttons to <a title="press" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_news.html">press</a>. I suggest you ask them for advice.
They are always very ready to help.

It does help to say what you are doing when you raise a question on a <a title="forum" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">forum</a>.
If you had said you were using Oxygen, we could have wasted less time.

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> 
</I>&gt;<i> BTW i start to learn <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT 1.0</a> from draft too in previous 
</I>&gt;<i> millenium - do you remenber &quot;sort&quot; in draft was as attribute 
</I>&gt;<i> (not as xsl:sort element)? ;)
</I>&gt;<i> 
</I>&gt;<i> so i think it ok if something will change - i am 
</I>&gt;<i> metaprogramming fan so syntax changes not problem at all for me
</I>&gt;<i> 
</I>&gt;<i> for me main problem when nothing changes - at this &quot;stalled&quot; 
</I>&gt;<i> time i think about death as &quot;act of creation&quot;
</I>&gt;<i> 
</I>&gt;<i> for now i have not money nor for OxygenXML nor for SaxonEE - 
</I>&gt;<i> what about possibility to get license &quot;on trust&quot;?
</I>&gt;<i> 
</I>&gt;<i> 2010/1/17 Michael Kay &lt;http://x-query.com/mailman/listinfo/talk&gt;:
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; To be less flippant, XQuery 1.1 does not yet exists -- there is a 
</I>&gt;<i> &gt;&gt; draft, but no actual final language. &#160;Saxon PE 9.2, 
</I>&gt;<i> acording to Mike 
</I>&gt;<i> &gt;&gt; Kay's web page [1] does have some XQuery 1.1 features, and 
</I>&gt;<i> if you are 
</I>&gt;<i> &gt;&gt; using those you need to check your support contract (since 
</I>&gt;<i> Saxon PE 
</I>&gt;<i> &gt;&gt; is a commercial product).
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Indeed, the reason that Saxon makes you jump through several hoops 
</I>&gt;<i> &gt; before you can use XQuery 1.1 features is to ensure that 
</I>&gt;<i> you don't do 
</I>&gt;<i> &gt; it without thinking twice about it: the specification may 
</I>&gt;<i> change, the 
</I>&gt;<i> &gt; product may change, and your queries may stop working.
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Regards,
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Michael Kay
</I>&gt;<i> &gt; http://www.saxonica.com/
</I>&gt;<i> &gt; http://twitter.com/michaelhkay
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>

</PRE>
]]></content></entry><entry><title>  &amp;quot;XQuery 1.1 was not enabled when invoking Saxon&amp;quot;
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003725.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003725.html" /><updated>2010-01-16T21:52:21Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>well - i tried google but got nothing
</PRE>
]]></content></entry><entry><title>  &amp;quot;XQuery 1.1 was not enabled when invoking Saxon&amp;quot;
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003728.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003728.html" /><updated>2010-01-16T21:05:52Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> 
</I>&gt;<i> To be less flippant, <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> does not yet exists -- there 
</I>&gt;<i> is a draft, but no actual final language.  <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> PE 9.2, 
</I>&gt;<i> acording to <a title="Mike Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Mike Kay</a>'s web page [1] does have some XQuery 1.1 
</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>, and if you are using those you need to check your 
</I>&gt;<i> support contract (since Saxon PE is a commercial product).
</I>
Indeed, the reason that Saxon makes you jump through several hoops before
you can use XQuery 1.1 features is to ensure that you don't do it without
thinking twice about it: the <a title="specification" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">specification</a> may change, the product may
change, and your queries may stop working.

Regards,

Michael Kay
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>  &amp;quot;XQuery 1.1 was not enabled when invoking Saxon&amp;quot;
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003726.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003726.html" /><updated>2010-01-16T19:05:17Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
<a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> questions are best asked on the saxon-help list.

And with any question, it's best to say what you were trying to achieve, and
what you did, and how it failed.

The error message means that your query does something that's allowed in
<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 not in 1.0, but you didn't say you wanted to use XQuery 1.1.
You need to have version 1.1 specified in the version declaration in the
query prolog, and to request XQuery 1.1 processing on the command line or
via the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/api/">API</a>.

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 Vyacheslav Sedov
</I>&gt;<i> Sent: 16 January 2010 18:52
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject:  &quot;XQuery 1.1 was not enabled when 
</I>&gt;<i> invoking Saxon&quot;
</I>&gt;<i> 
</I>&gt;<i> well - i tried google but got nothing
</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>  &amp;quot;XQuery 1.1 was not enabled when invoking Saxon&amp;quot;
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003727.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003727.html" /><updated>2010-01-16T14:58:08Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Sat, 2010-01-16 at 21:52 +0300, Vyacheslav Sedov wrote:
&gt;<i> well - i tried google but got nothing
</I>
This is a bit of an odd message.

You stood in a field, burned the finest cedar-wood,
sacrificed five pigeons and called <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a>! in a loud
voice, and the <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> <a title="specification" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">specification</a> did not suddenly
get published as a W3C Recommendation as a result?

To be less flippant, XQuery 1.1 does not yet exists -- there is
a draft, but no actual final language.  Saxon PE 9.2, acording
to <a title="Mike Kay" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Mike Kay</a>'s web page [1] does have some XQuery 1.1 <a title="features" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_feature_overview.html">features</a>,
and if you are using those you need to check your support contract
(since Saxon PE is a commercial product).

Liam

-- 
Liam Quin - <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old <a title="books" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_book.html">books</a>: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org

</PRE>
]]></content></entry><entry><title>  First XQuery Meetup at Zurich, March 11th 2010
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003724.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003724.html" /><updated>2010-01-15T13:46:35Z</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!

The first Zurich XQuery Meetup will be held in a prestigious location
in the heart of the city, ETH Dozentenfoyer, March 11th 2010. More
details at http://xquery.pbworks.com/Zurich-Meetup.
Registration is done on the <a title="The Stylus Studio Wiki" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://wiki.stylusstudio.com/">wiki</a>.
The meetup is just before <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> Prague (March 13th and 14th) so feel
free to stop by Zurich if you are on your way to Prague ;-)

Best regards,

William
</PRE>
]]></content></entry><entry><title>  declaring a variable of an imported schema type
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003723.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003723.html" /><updated>2010-01-14T18:38:17Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>In this case I would like to create a new element of that type, ie, one that is not read from the input file, so I guess the validation is required. 

Thank you for the reply.
--
Nuno Lopes



On 14 Jan 2010, at 18:04, <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> The validate{} expression will take untyped data, validate it against the
</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>, and return typed data.
</I>&gt;<i> 
</I>&gt;<i> If your data has already been validated, you don't need to do this, you only
</I>&gt;<i> need to declare its type. Typically this is done using the &quot;as&quot; clause. For
</I>&gt;<i> example
</I>&gt;<i> 
</I>&gt;<i> let $invoice as schema-element(my:invoice) := doc('invoice.<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>')/*
</I>&gt;<i> return ...
</I>&gt;<i> 
</I>&gt;<i> This will fail if doc() doesn't do the validation; how you control whether
</I>&gt;<i> or not doc() does validation is processor-specific, and will often involve
</I>&gt;<i> some kind of configuration options. 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>, for example, when you set
</I>&gt;<i> -val:strict on the command line, all input documents will be validated. (In
</I>&gt;<i> Altova, I believe validation happens if and only if there is an
</I>&gt;<i> xsi:schemaLocation attribute within the document itself.)
</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> 
</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 Nuno Lopes
</I>&gt;&gt;<i> Sent: 14 January 2010 17:30
</I>&gt;&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i> Cc: Nuno Lopes
</I>&gt;&gt;<i> Subject:  declaring a variable of an imported schema type
</I>&gt;&gt;<i> 
</I>&gt;&gt;<i> Hello all, 
</I>&gt;&gt;<i> 
</I>&gt;&gt;<i> I'm trying to declare a variable to be of a type that is 
</I>&gt;&gt;<i> imported from an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">XML schema definition</a>. 
</I>&gt;&gt;<i> 
</I>&gt;&gt;<i> So far what I've been doing is something like:
</I>&gt;&gt;<i> 
</I>&gt;&gt;<i> let $var := validate { element {$type} { $value } } ...
</I>&gt;&gt;<i> 
</I>&gt;&gt;<i> and it works although is a bit cumbersome. 
</I>&gt;&gt;<i> Is there an easier way to do this, ie, without using the validate {} ?
</I>&gt;&gt;<i> 
</I>&gt;&gt;<i> Thanks,
</I>&gt;&gt;<i> --
</I>&gt;&gt;<i> Nuno Lopes
</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>

</PRE>
]]></content></entry><entry><title>  declaring a variable of an imported schema type
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003722.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003722.html" /><updated>2010-01-14T18:04:05Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
The validate{} expression will take untyped data, <a title="Working with Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">validate it against the
schema</a>, and return typed data.

If your data has already been validated, you don't need to do this, you only
need to declare its type. Typically this is done using the &quot;as&quot; clause. For
example

let $invoice as schema-element(my:invoice) := doc('invoice.<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a>')/*
return ...

This will fail if doc() doesn't do the validation; how you control whether
or not doc() does validation is processor-specific, and will often involve
some kind of configuration options. 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>, for example, when you set
-val:strict on the command line, all input documents will be validated. (In
Altova, I believe validation happens if and only if there is an
xsi:schemaLocation attribute within the document itself.)

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 Nuno Lopes
</I>&gt;<i> Sent: 14 January 2010 17:30
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Cc: Nuno Lopes
</I>&gt;<i> Subject:  declaring a variable of an imported schema type
</I>&gt;<i> 
</I>&gt;<i> Hello all, 
</I>&gt;<i> 
</I>&gt;<i> I'm trying to declare a variable to be of a type that is 
</I>&gt;<i> imported from an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">XML schema definition</a>. 
</I>&gt;<i> 
</I>&gt;<i> So far what I've been doing is something like:
</I>&gt;<i> 
</I>&gt;<i> let $var := validate { element {$type} { $value } } ...
</I>&gt;<i> 
</I>&gt;<i> and it works although is a bit cumbersome. 
</I>&gt;<i> Is there an easier way to do this, ie, without using the validate {} ?
</I>&gt;<i> 
</I>&gt;<i> Thanks,
</I>&gt;<i> --
</I>&gt;<i> Nuno Lopes
</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>  declaring a variable of an imported schema type
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003721.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003721.html" /><updated>2010-01-14T17:29:34Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello all, 

I'm trying to declare a variable to be of a type that is imported from an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">XML schema definition</a>. 

So far what I've been doing is something like:

let $var := validate { element {$type} { $value } } ...

and it works although is a bit cumbersome. 
Is there an easier way to do this, ie, without using the validate {} ?

Thanks,
--
Nuno Lopes




</PRE>
]]></content></entry><entry><title>  trying to search in one document with an element
	pulled in as a variable from another document
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003720.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003720.html" /><updated>2010-01-14T11:23:07Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi Martin,

Thank you very much for the help. The solution worked.

[Also, $tagname was redundant, as you pointed out.]

Thank you,
 
Kenneth Dougherty
-----Original Message-----
From: Martin Probst [mailto:http://x-query.com/mailman/listinfo/talk] 
Sent: Thursday, January 14, 2010 1:19 AM
To: Kenneth Dougherty
Cc: http://x-query.com/mailman/listinfo/talk
Subject: Re:  trying to search in one document with an element
pulled in as a variable from another document

&gt;<i> let $searchtag := $search-for/location_in_TM
</I>&gt;<i> let $tagname := //production//$searchtag
</I>
I'm not quite sure what you are trying to achieve here, but
//foo//$bar does certainly not work. If you want to look for elements
that have a name which you don't know statically (i.e. it's in a
variable), you should write:

let $searchtag := $search-for/location_in_TM
let $tags := //production//*[name(.) = $searchtag] (: or node-name(.)
if you use namespaces :)

Basically you use a predicate on any node, and within that you check
for the name of the current context node (name(.)) to equal whatever
you are looking for. You can also compare against multiple names (i.e.
$searchtags) at the same time, that might help with performance.

&gt;<i> 1. How do I write the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> so that $elementsearch is pointing to the
</I>&gt;<i> correct [the writer's] <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a>?
</I>
I'm guessing what you want is

for $element in //*[name(.) = $searchtag]

I don't quite understand what you are trying to achieve with $tagname,
this appears redundant.

Regards,
Martin

</PRE>
]]></content></entry><entry><title>  trying to search in one document with an element 
	pulled in as a variable from another document
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003719.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003719.html" /><updated>2010-01-14T07:18:52Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> let $searchtag := $search-for/location_in_TM
</I>&gt;<i> let $tagname := //production//$searchtag
</I>
I'm not quite sure what you are trying to achieve here, but
//foo//$bar does certainly not work. If you want to look for elements
that have a name which you don't know statically (i.e. it's in a
variable), you should write:

let $searchtag := $search-for/location_in_TM
let $tags := //production//*[name(.) = $searchtag] (: or node-name(.)
if you use namespaces :)

Basically you use a predicate on any node, and within that you check
for the name of the current context node (name(.)) to equal whatever
you are looking for. You can also compare against multiple names (i.e.
$searchtags) at the same time, that might help with performance.

&gt;<i> 1. How do I write the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> so that $elementsearch is pointing to the
</I>&gt;<i> correct [the writer's] <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a>?
</I>
I'm guessing what you want is

for $element in //*[name(.) = $searchtag]

I don't quite understand what you are trying to achieve with $tagname,
this appears redundant.

Regards,
Martin
</PRE>
]]></content></entry><entry><title>  XATA - a XML Conference
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003717.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003717.html" /><updated>2010-01-13T16:30:35Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>XATA - XML, APPLICATIONS AND ASSOCIATED TECHNOLOGIES 2010
      ======================================================
         http://www.eseig.ipp.pt/conferencias/xata2010/
             From 19 to 20 May, 2010 - ESEIG, IPP


                       CALL FOR PAPERS

The main goal of the eighth national conference XATA 2010 is the
creation of a space for the <a title="discussion" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discussion</a> about XML, its different
usages and all the associated technologies.

This XATA edition will be hold in Escola Superior de Estudos
Industriais e de Gest&#227;o, a school from Instituto Polit&#233;cnico do
Porto, in Vila do Conde, Portugal.

The conference is open to technicians and interested users in this
subject, coming from the <a title="academic" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/academic_pricing.html">academic</a> or the industrial world. We
invite you to send an article proposal for posterior presentation
in the conference, or just participating in the conference.

Articles should be written in English but the presentations can be
done in Portuguese, Galician, Spanish or English. Articles should
not exceed 12 pages. Small articles should not exceed 6 pages. The
articles should comply with Lecture Notes in Computer Science layout
rules and be submitted electronically (check hyperlink to EasyChair
in the conference website).

                   CONFERENCE SUBJECTS

   * Semantic Web and Classification Structures in XML
   * Methodologies for Specification in XML
   * XML and Databases
   * XML-Mining
   * Querying languages for XML
   * <a title="Web Services" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/web_services.html">Web Services</a> -- Architectures and Practical Cases
   * WEB Technologies
     - Web 2.0, AJAX, XHTML, HTML5
   * XML Applications
     - Digital Libraries based in XML
     - E-learning based in XML
     - <a title="XML Workflow" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/workflow.html">Workflow</a> and Document management
   * Edition of XML
     - XML Generic Editors
     - XML <a title="XML Schema Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">Editors for specific schemas</a>
     - XML Visualization Tools
   * XML Document Processors
   * XML Standards
     - XML, XSL, SGML, LMNL, <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>, XTM, RDF, XQuery, Topic Maps, SVG,
       MathML, OWL, <a title="UBL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/ubl/index.html">UBL</a>, XSD, TexMECS, RNG and others)
   * Other languages for document annotation/serialization

                   IMPORTANT DATES

   * March, 1 - Deadline for contributions submission
   * March, 31 - Acceptance notification
   * April, 15 - Camera Ready version submission
   * May, 19-20 - XATA 2010

                   STEERING COMMITTEE

   * Cristina Ribeiro (FEUP, INESC Porto)
   * Gabriel David (FEUP, INESC Porto)
   * Jo&#227;o Correia Lopes (FEUP, INESC Porto)
   * Jos&#233; Carlos Ramalho (Program Chair - DI/UM)
   * Jos&#233; Paulo Leal (FCUP)
   * Pedro Henriques (DI/UM)

                   SCIENTIFIC COMMITTEE

   * Ademar Aguiar (FEUP, INESC Porto)
   * Alberto Rodrigues da Silva (IST, INESC-ID)
   * Alberto Sim&#245;es (ESEIG/IPP)
   * Alda Lopes Gan&#231;arski (Institut National des T&#233;l&#233;communications)
   * Ana Paula Afonso (DI/FC/UL)
   * Benedita Malheiro (ISEP)
   * Cristina Ribeiro (FEUP, INESC Porto)
   * Daniela da Cruz (DI/UM)
   * Francisco Couto (DI/FC/UL)
   * Gabriel David (FEUP, INESC Porto)
   * Giovani Librelotto (UFSM)
   * Jo&#227;o Correia Lopes (FEUP, INESC Porto)
   * Jo&#227;o Moura Pires (FCT/UNL)
   * Jos&#233; Carlos Ramalho (DI/UM)
   * Jos&#233; Jo&#227;o Almeida (DI/UM)
   * Jos&#233; Paulo Leal (DCC/FCUP)
   * Luis Ferreira (EST/IPCA)
   * Lu&#237;s Carri&#231;o (DI/FC/UL)
   * Manolo Ramos (UVigo)
   * Marta Jacinto (ITIJ)
   * Miguel Ferreira (DSI/UM)
   * Nuno Horta (IST/IT)
   * Paulo Marques (DEI/UC)
   * Pedro Rangel Henriques (DI/UM)
   * Ricardo Queir&#243;s (ESEIG/IPP)
   * Rui Lopes (DI/FC/UL)
   * Salvador Abreu (DI/UE)
   * Stephane Gan&#231;arski (LIP6, University P. &amp; M. Curie Paris 6)
   * Xavier G&#243;mez Guinovart (UVigo)

                ORGANIZING COMMITTEE

   * Alberto Sim&#245;es (ESEIG/IPP)
   * Lu&#237;s Correia (ESEIG/IPP)
   * M&#225;rio Pinto (ESEIG/IPP)
   * Ricardo Queir&#243;s (ESEIG/IPP)


-- 
Ricardo Queir&#243;s
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100113/e9f3b737/attachment.htm
</PRE>
]]></content></entry><entry><title>  TOC Problem
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003716.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003716.html" /><updated>2010-01-13T14:32:51Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,

How I will get ouput using <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>.

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

&lt;Toc&gt;
&lt;Head&gt;Contents&lt;/Head&gt;
&lt;T&gt;&lt;Text&gt;Foreword&lt;pag&gt;v&lt;/pag&gt;&lt;/Text&gt;&lt;Tocauthor&gt;Fen&lt;/Tocauthor&gt;&lt;/T&gt;
&lt;T&gt;&lt;Text&gt;Acknowledgments&lt;pag&gt;xx&lt;/pag&gt;&lt;/Text&gt;&lt;Tocauthor&gt;Jean
Dandelin&lt;/Tocauthor&gt;&lt;/T&gt;
&lt;T&gt;&lt;Text&gt;Abbreviations&lt;pag&gt;xiii&lt;/pag&gt;&lt;/Text&gt;&lt;/T&gt;
&lt;TCP&gt;&lt;Text&gt;1 Room for Manoeuvre&lt;pag&gt;3&lt;/pag&gt;&lt;/Text&gt;&lt;Tocauthor&gt;Jean
Daudelin&lt;/Tocauthor&gt;&lt;/TCP&gt;

&lt;TP&gt;&lt;Text&gt;PART ONE&lt;Br/&gt;THE OTTAWA GAME&lt;/Text&gt;
&lt;TCP&gt;&lt;Text&gt;2 Raising Our Game&lt;pag&gt;31&lt;/pag&gt;&lt;/Text&gt;
&lt;Tocauthor&gt;Wendy Dobson&lt;/Tocauthor&gt;
&lt;/TCP&gt;
&lt;/TP&gt;
&lt;/Toc&gt;


=================================================================================================================
================================================================================================================

&lt;navPoint id=&quot;icontents&quot; playOrder=&quot;1&quot;&gt;
&lt;text&gt;Contents&lt;/text&gt;
&lt;content src=&quot;xhtml/toc.html&quot;/&gt;
&lt;/navPoint&gt;
&lt;navPoint id=&quot;iforeward-ct&quot; playOrder=&quot;2&quot;&gt;
&lt;text&gt;Foreword&lt;/text&gt;
&lt;content src=&quot;xhtml/foreword.html&quot;/&gt;
&lt;/navPoint&gt;
&lt;navPoint id=&quot;iacknowledgment-ct&quot; playOrder=&quot;3&quot;&gt;
&lt;text&gt;Acknowledgments&lt;/text&gt;
&lt;content src=&quot;xhtml/acknowledgment.html&quot;/&gt;
&lt;/navPoint&gt;
&lt;navPoint id=&quot;iabbre-ct&quot; playOrder=&quot;4&quot;&gt;
&lt;text&gt;Abbreviations&lt;/text&gt;
&lt;content src=&quot;xhtml/abbrevation.html&quot;/&gt;
&lt;/navPoint&gt;
&lt;navPoint id=&quot;ich01&quot; playOrder=&quot;5&quot;&gt;
&lt;text&gt;1 Room for Manoeuvre&lt;/text&gt;
&lt;content src=&quot;xhtml/ch01.html&quot;/&gt;
&lt;/navPoint&gt;

&lt;navPoint id=&quot;ipart1&quot; playOrder=&quot;6&quot;&gt;
&lt;navLabel&gt;
&lt;text&gt;PART ONE THE OTTAWA GAME&lt;/text&gt;
&lt;/navLabel&gt;
&lt;content src=&quot;xhtml/part01.html&quot;/&gt;
&lt;navPoint id=&quot;ich02&quot; playOrder=&quot;7&quot;&gt;
&lt;text&gt;2 Raising Our Game: Canada among Nations&lt;/text&gt;
&lt;content src=&quot;xhtml/ch02.html#ch02&quot;/&gt;
&lt;/navPoint&gt;
&lt;/navPoint&gt;

Thanks
Byomokesh
</PRE>
]]></content></entry><entry><title>  trying to search in one document with an element
	pulled in as a variable from another document
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003718.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003718.html" /><updated>2010-01-13T13:15:25Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello,

I would appreciate any help with the following problem.

Situation: 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 may contain any number of boilerplates dependent
on various factors. These boilerplates will be located within certain
elements, depending on the type of boilerplate being used. Often, if said
element is used, it must have a certain boilerplate associated with it.

Goal: To create a report for technical writers that will search their XML
and report to them which boilerplates are missing.

Methodology: In an attempt to avoid hard coding each situation, the idea is
to pull in information from one document and use it to determine which
elements to search in the other document.

Here is the relevant section of the file [list.gent] containing the
information that will be used to search the other file
************************************************
&lt;list&gt;
  &lt;required_boilerplates&gt;
	&lt;boilerplate&gt;
		&lt;name&gt;warranty information&lt;/name&gt;
		&lt;location_in_TM&gt;wrntyref&lt;/location_in_TM&gt;
		&lt;string_search&gt;The warranty starts on the date found in
block 23 of DA Form 2408-9, Equipment Control Record.&lt;/string_search&gt;
	
&lt;location_of_bp&gt;C:\svn_sdi_skeleton_creator\BOILERPLATES\GIM\ginfowp\warrant
y_ information.gent&lt;/location_of_bp&gt;
		&lt;reason&gt;Required by <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">Standard</a>&lt;/reason&gt;
	&lt;/boilerplate&gt;
  &lt;/required_boilerplates&gt;
&lt;/list&gt;
************************************************

The relevant section of the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> is as follows. An explanation will
follow. Note: $production in //production does not require a doc function as
it pulls in the correct document from a <a title="java" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">java</a> program. [Or rather the java
program pulls in the xquery and supplies the document for it.]
************************************************
&lt;h3&gt;Required boilerplates&lt;/h3&gt;
		&lt;p&gt;The following boilerplates are required, but are
missing.&lt;/p&gt;
		&lt;table border = &quot;1&quot;&gt;
			&lt;tr&gt;
				&lt;td&gt;boilerplate name&lt;/td&gt;
				&lt;td&gt;reason&lt;/td&gt;
				&lt;td&gt;location&lt;/td&gt;
				&lt;td&gt;wpno&lt;/td&gt;
				&lt;td&gt;<a title="XPath Validator" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">xpath</a>&lt;/td&gt;
				
			&lt;/tr&gt;
{
		for $production in //production,
			$search-for in doc(&quot;list.gent&quot;)//boilerplate
			
		let $searchtag := $search-for/location_in_TM
		let $tagname := //production//$searchtag
			
		return(
		
		for $elementsearch in //$tagname
		
		where not(contains(data($elementsearch),
data($search-for/string_search)))
		 
		return  
					&lt;tr&gt;{
	
&lt;td&gt;{$search-for/location_in_TM}&lt;/td&gt;, (:don't forget comma or error result
:<i>)
</I>	
&lt;td&gt;{data($search-for/reason)}&lt;/td&gt;,
	
&lt;td&gt;{data($search-for/location_of_bp)}&lt;/td&gt;,
	
&lt;td&gt;{data($elementsearch/ancestor::*/@wpno)}&lt;/td&gt;,
	
&lt;td&gt;{$elementsearch/string-join(ancestor-or-self::* /f:name-and-position(.),
'/')}&lt;/td&gt;
					}&lt;/tr&gt;
		
 
)

}
		&lt;/table&gt;
************************************************

Explanation: I apologize if anything above is a bit of a mess. I'm still new
to xquery and probably not writing the code in the most efficient method.

1. for $production in //production,
			$search-for in doc(&quot;list.gent&quot;)//boilerplate
This section is meant to search through both documents. The writer's xml
itself is too large to include here. I believe the only relevant information
is that production is the root element. From the list.gent &quot;wrntyref&quot; is the
element that will be searched for in the XML. Wrntyref is an optional
descendant of production. It has a set xpath from production, but that xpath
is irrelevant as the goal is to use any element taken from
list/location_in_TM and process it against the XML being used by the
writers.

2. let $searchtag := $search-for/location_in_TM is to get the value from
location_in_TM from list.gent and place it in a variable.

3. let $tagname := //production//$searchtag is my attempt to create an xpath
using the root of the writer's xml and the variable $searchtag.

4. The second FWR within the first Return was the only way I could guess to
process each occurrence of the value taken in location_in_TM [and stored in
$searchtag] and process it for each occurrence in the writer's xml.

****

Result: The following output was achieved.
************************************************
boilerplate name 	reason 			location

wrntyref  		Required by Standard
C:\svn_sdi_skeleton_creator\BOILERPLATES\GIM\ginfowp\warranty_
information.gent 
[following is a continuation of first line]
wpno 		xpath
	
list[1]/required_boilerplates[1]/boilerplate[1]/location_in_TM[1]
************************************************
The xpath is derived from the following function

declare function f:name-and-position($n as element()) as xs:string {
  concat(name($n), '[', 1+count($n/preceding-sibling::*[node-name(.) =
node-name($n)]), ']')
};

The function works correctly as proven in use elsewhere, but the xpath shown
is incorrect. It is pointing to the list.gent file instead of the writer's
XML. Since $elementsearch is also used in the where statement, this means
the same problem is also occurring there.

****

Questions:
1. How do I write the xquery so that $elementsearch is pointing to the
correct [the writer's] XML?
2. Is there a better method I should be looking at instead?

Thanks for your time and help.

Thank you,
&#160;
Kenneth Dougherty



</PRE>
]]></content></entry><entry><title>  Re: XQuery issue regarding creating table of 
	contents(TOC) dynamically.
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003715.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003715.html" /><updated>2010-01-12T11:14:09Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi Ken,
Thanks a lot for your reply. I think your approach and code might help me in
implementing the same for my requirement which is somewhat complex than the
sample i had explained in the mail.

Regards,
Anuj

On Thu, Jan 7, 2010 at 7:36 PM, G. Ken Holman &lt;http://x-query.com/mailman/listinfo/talk
&gt;<i> wrote:
</I>
&gt;<i> At 2010-01-07 11:28 +0530, anuj kumar wrote:
</I>&gt;<i>
</I>&gt;&gt;<i> I have an <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> of the form
</I>&gt;&gt;<i> ...
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> A change in the designator(Designators may be in alpha, numeric, roman,
</I>&gt;&gt;<i> alpha-numeric,
</I>&gt;&gt;<i> etc bounded or unbounded by brackets) format must be used as basis for
</I>&gt;&gt;<i> identifying the primary level.
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i> I've implemented this so you can 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> to determine the
</I>&gt;<i> level indications.
</I>&gt;<i>
</I>&gt;<i>  Designators in sequence or series must be treated as primary level text of
</I>&gt;&gt;<i> the same level. For example:
</I>&gt;&gt;<i> (a)-first level
</I>&gt;&gt;<i> (b)-first level
</I>&gt;&gt;<i> (c)-first level
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I have to create the following output xml out of the above input xml:
</I>&gt;&gt;<i> ...
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Pleae advise, how to do this?
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i> You don't share with us what you have tried and what has not worked for
</I>&gt;<i> you.
</I>&gt;<i>
</I>&gt;<i> I have a complete solution below.  I found it easier to think first in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>
</I>&gt;<i> because of the grouping facilities that are available, and then to just
</I>&gt;<i> transliterate that into <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> for a pure-XQuery solution.
</I>&gt;<i>
</I>&gt;<i> Note that readers may find it interesting to have to do the following in
</I>&gt;<i> XQuery:
</I>&gt;<i>
</I>&gt;<i>  (&lt;tree&gt;{elements-expression}&lt;/tree&gt;)/*
</I>&gt;<i>
</I>&gt;<i> ... in order to create a sibling relationship between a copy of nodes so
</I>&gt;<i> that the recursive use of the following-sibling axis would not access the
</I>&gt;<i> original nodes.  Simply referencing the nodes isn't sufficient because the
</I>&gt;<i> nodes retain their original location in the original tree.
</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> T:\ftemp&gt;type anuj.xml
</I>&gt;<i>
</I>&gt;<i> &lt;doc&gt;
</I>&gt;<i>  &lt;p&gt;(a)- first level &lt;/p&gt;
</I>&gt;<i>  &lt;p&gt;(1)- second level&lt;/p&gt;
</I>&gt;<i>  &lt;p&gt;(2)- second level&lt;/p&gt;
</I>&gt;<i>  &lt;p&gt;(A)- third level&lt;/p&gt;
</I>&gt;<i>  &lt;p&gt;(B)- third level&lt;/p&gt;
</I>&gt;<i>  &lt;p&gt;(3)- second level&lt;/p&gt;
</I>&gt;<i>  &lt;p&gt;(b)- first level&lt;/p&gt;
</I>&gt;<i> &lt;/doc&gt;
</I>&gt;<i> T:\ftemp&gt;call xslt2 anuj.xml anuj.xsl
</I>&gt;<i> &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
</I>&gt;<i>
</I>&gt;<i> &lt;doc&gt;
</I>&gt;<i>   &lt;parent&gt;
</I>&gt;<i>      &lt;title&gt;(a)- first level &lt;/title&gt;
</I>&gt;<i>      &lt;child&gt;
</I>&gt;<i>         &lt;title&gt;(1)- second level&lt;/title&gt;
</I>&gt;<i>      &lt;/child&gt;
</I>&gt;<i>      &lt;child&gt;
</I>&gt;<i>         &lt;title&gt;(2)- second level&lt;/title&gt;
</I>&gt;<i>         &lt;child&gt;
</I>&gt;<i>            &lt;title&gt;(A)- third level&lt;/title&gt;
</I>&gt;<i>         &lt;/child&gt;
</I>&gt;<i>         &lt;child&gt;
</I>&gt;<i>            &lt;title&gt;(B)- third level&lt;/title&gt;
</I>&gt;<i>         &lt;/child&gt;
</I>&gt;<i>      &lt;/child&gt;
</I>&gt;<i>      &lt;child&gt;
</I>&gt;<i>         &lt;title&gt;(3)- second level&lt;/title&gt;
</I>&gt;<i>      &lt;/child&gt;
</I>&gt;<i>   &lt;/parent&gt;
</I>&gt;<i>   &lt;parent&gt;
</I>&gt;<i>      &lt;title&gt;(b)- first level&lt;/title&gt;
</I>&gt;<i>   &lt;/parent&gt;
</I>&gt;<i> &lt;/doc&gt;
</I>&gt;<i> T:\ftemp&gt;call xquery anuj.xq
</I>&gt;<i> &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
</I>&gt;<i>
</I>&gt;<i> &lt;doc&gt;
</I>&gt;<i>   &lt;parent&gt;
</I>&gt;<i>      &lt;title&gt;(a)- first level &lt;/title&gt;
</I>&gt;<i>      &lt;child&gt;
</I>&gt;<i>         &lt;title&gt;(1)- second level&lt;/title&gt;
</I>&gt;<i>      &lt;/child&gt;
</I>&gt;<i>      &lt;child&gt;
</I>&gt;<i>         &lt;title&gt;(2)- second level&lt;/title&gt;
</I>&gt;<i>         &lt;child&gt;
</I>&gt;<i>            &lt;title&gt;(A)- third level&lt;/title&gt;
</I>&gt;<i>         &lt;/child&gt;
</I>&gt;<i>         &lt;child&gt;
</I>&gt;<i>            &lt;title&gt;(B)- third level&lt;/title&gt;
</I>&gt;<i>         &lt;/child&gt;
</I>&gt;<i>      &lt;/child&gt;
</I>&gt;<i>      &lt;child&gt;
</I>&gt;<i>         &lt;title&gt;(3)- second level&lt;/title&gt;
</I>&gt;<i>      &lt;/child&gt;
</I>&gt;<i>   &lt;/parent&gt;
</I>&gt;<i>   &lt;parent&gt;
</I>&gt;<i>      &lt;title&gt;(b)- first level&lt;/title&gt;
</I>&gt;<i>   &lt;/parent&gt;
</I>&gt;<i> &lt;/doc&gt;
</I>&gt;<i> T:\ftemp&gt;type anuj.xsl
</I>&gt;<i> &lt;?xml version=&quot;1.0&quot; encoding=&quot;US-ASCII&quot;?&gt;
</I>&gt;<i> &lt;xsl:stylesheet xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;
</I>&gt;<i>                version=&quot;2.0&quot;&gt;
</I>&gt;<i>
</I>&gt;<i> &lt;xsl:output indent=&quot;yes&quot;/&gt;
</I>&gt;<i>
</I>&gt;<i> &lt;xsl:variable name=&quot;patterns&quot; as=&quot;element(patterns)&quot;&gt;
</I>&gt;<i>  &lt;patterns&gt;
</I>&gt;<i>    &lt;pattern&gt;^\([a-z]\)&lt;/pattern&gt;
</I>&gt;<i>    &lt;pattern&gt;^\([\d+]\)&lt;/pattern&gt;
</I>&gt;<i>    &lt;pattern&gt;^\([A-Z]\)&lt;/pattern&gt;
</I>&gt;<i>  &lt;/patterns&gt;
</I>&gt;<i> &lt;/xsl:variable&gt;
</I>&gt;<i>
</I>&gt;<i> &lt;xsl:template match=&quot;doc&quot;&gt;
</I>&gt;<i>  &lt;doc&gt;
</I>&gt;<i>    &lt;xsl:call-template name=&quot;parent&quot;&gt;
</I>&gt;<i>      &lt;xsl:with-param name=&quot;population&quot; select=&quot;p&quot;/&gt;
</I>&gt;<i>      &lt;xsl:with-param name=&quot;pattern&quot; select=&quot;$patterns/pattern[1]&quot;/&gt;
</I>&gt;<i>      &lt;xsl:with-param name=&quot;relationship&quot; select=&quot;'parent'&quot;/&gt;
</I>&gt;<i>    &lt;/xsl:call-template&gt;
</I>&gt;<i>  &lt;/doc&gt;
</I>&gt;<i> &lt;/xsl:template&gt;
</I>&gt;<i>
</I>&gt;<i> &lt;xsl:template name=&quot;parent&quot;&gt;
</I>&gt;<i>  &lt;xsl:param name=&quot;population&quot;/&gt;
</I>&gt;<i>  &lt;xsl:param name=&quot;pattern&quot;/&gt;
</I>&gt;<i>  &lt;xsl:param name=&quot;relationship&quot;/&gt;
</I>&gt;<i>  &lt;xsl:if test=&quot;$population&quot;&gt;
</I>&gt;<i>    &lt;!--only do something if there is something to do--&gt;
</I>&gt;<i>    &lt;xsl:choose&gt;
</I>&gt;<i>      &lt;xsl:when test=&quot;not($pattern)&quot;&gt;
</I>&gt;<i>        &lt;!--no more depth--&gt;
</I>&gt;<i>        &lt;xsl:for-each select=&quot;$population&quot;&gt;
</I>&gt;<i>          &lt;xsl:element name=&quot;{$relationship}&quot;&gt;
</I>&gt;<i>            &lt;title&gt;&lt;xsl:copy-of select=&quot;node()&quot;/&gt;&lt;/title&gt;
</I>&gt;<i>          &lt;/xsl:element&gt;
</I>&gt;<i>        &lt;/xsl:for-each&gt;
</I>&gt;<i>      &lt;/xsl:when&gt;
</I>&gt;<i>      &lt;xsl:otherwise&gt;
</I>&gt;<i>        &lt;!--process next level of depth--&gt;
</I>&gt;<i>        &lt;xsl:for-each-group select=&quot;$population&quot;
</I>&gt;<i>                            group-starting-with=&quot;*[matches(.,$pattern)]&quot;&gt;
</I>&gt;<i>          &lt;xsl:element name=&quot;{$relationship}&quot;&gt;
</I>&gt;<i>            &lt;title&gt;&lt;xsl:copy-of select=&quot;node()&quot;/&gt;&lt;/title&gt;
</I>&gt;<i>            &lt;xsl:call-template name=&quot;parent&quot;&gt;
</I>&gt;<i>              &lt;xsl:with-param name=&quot;population&quot;
</I>&gt;<i>                              select=&quot;current-group()[position()&gt;1]&quot;/&gt;
</I>&gt;<i>              &lt;xsl:with-param name=&quot;pattern&quot;
</I>&gt;<i>                              select=&quot;$pattern/following-sibling::*[1]&quot;/&gt;
</I>&gt;<i>              &lt;xsl:with-param name=&quot;relationship&quot; select=&quot;'child'&quot;/&gt;
</I>&gt;<i>            &lt;/xsl:call-template&gt;
</I>&gt;<i>          &lt;/xsl:element&gt;
</I>&gt;<i>        &lt;/xsl:for-each-group&gt;
</I>&gt;<i>      &lt;/xsl:otherwise&gt;
</I>&gt;<i>    &lt;/xsl:choose&gt;
</I>&gt;<i>  &lt;/xsl:if&gt;
</I>&gt;<i> &lt;/xsl:template&gt;
</I>&gt;<i>
</I>&gt;<i> &lt;/xsl:stylesheet&gt;
</I>&gt;<i>
</I>&gt;<i> T:\ftemp&gt;type anuj.xq
</I>&gt;<i> declare namespace a = &quot;urn:X-anuj&quot;;
</I>&gt;<i>
</I>&gt;<i> declare variable $patterns as element(patterns) :=
</I>&gt;<i>  &lt;patterns&gt;
</I>&gt;<i>    &lt;pattern&gt;^\([a-z]\)&lt;/pattern&gt;
</I>&gt;<i>    &lt;pattern&gt;^\([\d+]\)&lt;/pattern&gt;
</I>&gt;<i>    &lt;pattern&gt;^\([A-Z]\)&lt;/pattern&gt;
</I>&gt;<i>  &lt;/patterns&gt;;
</I>&gt;<i>
</I>&gt;<i> declare function a:parent( $population, $pattern, $relationship )
</I>&gt;<i> {
</I>&gt;<i>  if( $population )
</I>&gt;<i>  then
</I>&gt;<i>    (: only do something if there is something to do :)
</I>&gt;<i>    if( not($pattern) )
</I>&gt;<i>    then
</I>&gt;<i>      (: no more depth :)
</I>&gt;<i>      for $each in $population return
</I>&gt;<i>        element {$relationship} {&lt;title&gt;{$each/node()}&lt;/title&gt;}
</I>&gt;<i>    else
</I>&gt;<i>      (: process next level of depth :)
</I>&gt;<i>      for $level in $population[matches(.,$pattern)]
</I>&gt;<i>      return
</I>&gt;<i>        element {$relationship}
</I>&gt;<i>        {
</I>&gt;<i>          &lt;title&gt;{$level/node()}&lt;/title&gt;,
</I>&gt;<i>          a:parent( (&lt;tree&gt;
</I>&gt;<i>                      {$level/following-sibling::* except
</I>&gt;<i>                       $level/following-sibling::*[matches(.,$pattern)][1]/
</I>&gt;<i>                                              (self::* |
</I>&gt;<i> following-sibling::* )
</I>&gt;<i>                      }
</I>&gt;<i>                     &lt;/tree&gt;)/* (:create a new tree of children:),
</I>&gt;<i>                     $pattern/following-sibling::*[1] (:the next pattern:),
</I>&gt;<i>                     'child' )
</I>&gt;<i>        }
</I>&gt;<i>  else ()
</I>&gt;<i> };
</I>&gt;<i>
</I>&gt;<i> &lt;doc&gt;{a:parent( doc('anuj.xml')/doc/p, $patterns/pattern[1], 'parent'
</I>&gt;<i> )}&lt;/doc&gt;
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> T:\ftemp&gt;rem Done!
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> UBL and Code List training:      Copenhagen, Denmark 2010-02-08/10
</I>&gt;<i> XSLT/XQuery/XPath training after http://XMLPrague.cz 2010-03-15/19
</I>&gt;<i> XSLT/XQuery/XPath training:   San Carlos, California 2010-04-26/30
</I>&gt;<i> Vote for your XML training:   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 video
</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> _______________________________________________
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>


-- 
Regards,
Anuj Kumar
M: +91-9582472866
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100112/e1ea1c31/attachment.htm
</PRE>
]]></content></entry><entry><title>  More Implementations of XQuery Update Facility
	Requested
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003714.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003714.html" /><updated>2010-01-11T18:38:21Z</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 for BaseX, MXQuery, <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a>-EE, xDB, 
and Zorba [3]. We are still looking for implementations that support the 
Update Facility <a title="Static Typing" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">Static Typing</a> <a title="Feature" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_feature_overview.html">Feature</a> and implementations that support 
XQueryX. We'd like to encourage implementors of these features 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/ 

[3] XQuery Update Test Suite Result Summary
http://dev.w3.org/2007/xquery-update-10-test-suite/results/XQUTSReportSimple.html
http://dev.w3.org/2007/xquery-update-10-test-suite/results/XQUTSReport.html

--------------------
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/20100111/e8784f11/attachment.htm
</PRE>
]]></content></entry><entry><title>  Hide Text using XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003712.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003712.html" /><updated>2010-01-11T16:04:49Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,

How it will remove &lt;page&gt;v&lt;/page&gt; this element text.

Output is coming like this..

&lt;para id=&quot;foreword&#160;&#160;v&quot;&gt;Foreword&#160;&#160;v&lt;/para&gt;

Required Output
============

&lt;para id=&quot;foreword&quot;&gt;Foreword&lt;/para&gt;


Thanks
Byomokesh



On Mon, Jan 11, 2010 at 2:56 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;<i> Perhaps you want something like
</I>&gt;<i>
</I>&gt;<i> let $ad := doc(&quot;<A HREF="file:///d:/Byomokesh/PubXML/xquery/sample.xml&quot;">file:///d:/Byomokesh/PubXML/xquery/sample.xml&quot;</A>)
</I>&gt;<i> for $r in $ad//text
</I>&gt;<i> return &lt;para id=&quot;{lower-case($r)}&quot;&gt;{data($r)}&lt;/para&gt;
</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>
</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 Byomokesh Sahoo
</I>&gt;&gt;<i> Sent: 11 January 2010 08:08
</I>&gt;&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i> Subject:  Hide Text using XQuery
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Dear All,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I am doing transformation xml to xml using xquery. Here find
</I>&gt;&gt;<i> the below my xml, ouput and xqy file. I have tried but i
</I>&gt;&gt;<i> could not find how i will delete &lt;page&gt; and create ID
</I>&gt;&gt;<i> attribute as it as a same content.
</I>&gt;&gt;<i> (eg. Forward for forward, content for conent).
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> XML
</I>&gt;&gt;<i> ====
</I>&gt;&gt;<i> &lt;p&gt;&lt;entry&gt;&lt;text&gt;Foreword&lt;page&gt;v&lt;/page&gt;&lt;/text&gt;&lt;author&gt;Fen&lt;/auth
</I>&gt;<i> or&gt;&lt;/entry&gt;&lt;/p&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Output
</I>&gt;&gt;<i> =====
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &lt;para id=&quot;foreword&quot;&gt;Foreword&lt;/para&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> my xqy
</I>&gt;&gt;<i> ======
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> let $ad := doc(&quot;<A HREF="file:///d:/Byomokesh/PubXML/xquery/sample.xml&quot;">file:///d:/Byomokesh/PubXML/xquery/sample.xml&quot;</A>)
</I>&gt;&gt;<i> let $ad2 := $ad//text
</I>&gt;&gt;<i> for $r &#160;in $ad2
</I>&gt;&gt;<i> return
</I>&gt;&gt;<i> &lt;s&gt;{data($r)}&lt;/s&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Thanks
</I>&gt;&gt;<i> Byomokesh
</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>
</PRE>
]]></content></entry><entry><title>  Hide Text using XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003710.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003710.html" /><updated>2010-01-11T13:37:43Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Dear All,

I am doing transformation <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> to xml using <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>. Here find the below
my xml, ouput and xqy file. I have tried but i could not find how i
will delete &lt;page&gt; and create ID attribute as it as a same content.
(eg. Forward for forward, content for conent).

XML
====
&lt;p&gt;&lt;entry&gt;&lt;text&gt;Foreword&lt;page&gt;v&lt;/page&gt;&lt;/text&gt;&lt;author&gt;Fen&lt;/author&gt;&lt;/entry&gt;&lt;/p&gt;

Output
=====

&lt;para id=&quot;foreword&quot;&gt;Foreword&lt;/para&gt;

my xqy
======

let $ad := doc(&quot;<A HREF="file:///d:/Byomokesh/PubXML/xquery/sample.xml&quot;">file:///d:/Byomokesh/PubXML/xquery/sample.xml&quot;</A>)
let $ad2 := $ad//text
for $r  in $ad2
return
&lt;s&gt;{data($r)}&lt;/s&gt;


Thanks
Byomokesh
</PRE>
]]></content></entry><entry><title>  Hide Text using XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003713.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003713.html" /><updated>2010-01-11T11:04:21Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
Ah, I see. Simplest solution is

let $ad := doc(&quot;<A HREF="file:///d:/Byomokesh/PubXML/xquery/sample.xml&quot;">file:///d:/Byomokesh/PubXML/xquery/sample.xml&quot;</A>)
for $r in $ad//text
return &lt;para id=&quot;{lower-case($r/text())}&quot;&gt;{$r/text()}&lt;/para&gt;

but that's not very robust if there's extra whitespace or comments in the
source: slightly safer is to replace $r/text() in both places by
string-join($r/text(), '') to allow for the possibility of multiple text
nodes.

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 Byomokesh Sahoo
</I>&gt;<i> Sent: 11 January 2010 10:35
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject: Re:  Hide Text using XQuery
</I>&gt;<i> 
</I>&gt;<i> Hi,
</I>&gt;<i> 
</I>&gt;<i> How it will remove &lt;page&gt;v&lt;/page&gt; this element text.
</I>&gt;<i> 
</I>&gt;<i> Output is coming like this..
</I>&gt;<i> 
</I>&gt;<i> &lt;para id=&quot;foreword&#160;&#160;v&quot;&gt;Foreword&#160;&#160;v&lt;/para&gt;
</I>&gt;<i> 
</I>&gt;<i> Required Output
</I>&gt;<i> ============
</I>&gt;<i> 
</I>&gt;<i> &lt;para id=&quot;foreword&quot;&gt;Foreword&lt;/para&gt;
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i> Thanks
</I>&gt;<i> Byomokesh
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i> On Mon, Jan 11, 2010 at 2:56 PM, Michael Kay 
</I>&gt;<i> &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
</I>&gt;<i> &gt; Perhaps you want something like
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; let $ad := doc(&quot;<A HREF="file:///d:/Byomokesh/PubXML/xquery/sample.xml&quot;">file:///d:/Byomokesh/PubXML/xquery/sample.xml&quot;</A>)
</I>&gt;<i> &gt; for $r in $ad//text
</I>&gt;<i> &gt; return &lt;para id=&quot;{lower-case($r)}&quot;&gt;{data($r)}&lt;/para&gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Regards,
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Michael Kay
</I>&gt;<i> &gt; http://www.saxonica.com/
</I>&gt;<i> &gt; http://twitter.com/michaelhkay
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;&gt; -----Original Message-----
</I>&gt;<i> &gt;&gt; From: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> &gt;&gt; [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf Of Byomokesh Sahoo
</I>&gt;<i> &gt;&gt; Sent: 11 January 2010 08:08
</I>&gt;<i> &gt;&gt; To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> &gt;&gt; Subject:  Hide Text using XQuery
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; Dear All,
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; I am doing transformation xml to xml using xquery. Here find the 
</I>&gt;<i> &gt;&gt; below my xml, ouput and xqy file. I have tried but i could 
</I>&gt;<i> not find 
</I>&gt;<i> &gt;&gt; how i will delete &lt;page&gt; and create ID attribute as it as a same 
</I>&gt;<i> &gt;&gt; content.
</I>&gt;<i> &gt;&gt; (eg. Forward for forward, content for conent).
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; XML
</I>&gt;<i> &gt;&gt; ====
</I>&gt;<i> &gt;&gt; &lt;p&gt;&lt;entry&gt;&lt;text&gt;Foreword&lt;page&gt;v&lt;/page&gt;&lt;/text&gt;&lt;author&gt;Fen&lt;/auth
</I>&gt;<i> &gt; or&gt;&lt;/entry&gt;&lt;/p&gt;
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; Output
</I>&gt;<i> &gt;&gt; =====
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; &lt;para id=&quot;foreword&quot;&gt;Foreword&lt;/para&gt;
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; my xqy
</I>&gt;<i> &gt;&gt; ======
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; let $ad := doc(&quot;<A HREF="file:///d:/Byomokesh/PubXML/xquery/sample.xml&quot;">file:///d:/Byomokesh/PubXML/xquery/sample.xml&quot;</A>)
</I>&gt;<i> &gt;&gt; let $ad2 := $ad//text
</I>&gt;<i> &gt;&gt; for $r &#160;in $ad2
</I>&gt;<i> &gt;&gt; return
</I>&gt;<i> &gt;&gt; &lt;s&gt;{data($r)}&lt;/s&gt;
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; Thanks
</I>&gt;<i> &gt;&gt; Byomokesh
</I>&gt;<i> &gt;&gt; _______________________________________________
</I>&gt;<i> &gt;&gt; http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> &gt;&gt; http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</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>  Hide Text using XQuery
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003711.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003711.html" /><updated>2010-01-11T09:26:06Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Perhaps you want something like

let $ad := doc(&quot;<A HREF="file:///d:/Byomokesh/PubXML/xquery/sample.xml&quot;">file:///d:/Byomokesh/PubXML/xquery/sample.xml&quot;</A>)
for $r in $ad//text
return &lt;para id=&quot;{lower-case($r)}&quot;&gt;{data($r)}&lt;/para&gt;

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 Byomokesh Sahoo
</I>&gt;<i> Sent: 11 January 2010 08:08
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject:  Hide Text using XQuery
</I>&gt;<i> 
</I>&gt;<i> Dear All,
</I>&gt;<i> 
</I>&gt;<i> I am doing transformation xml to xml using xquery. Here find 
</I>&gt;<i> the below my xml, ouput and xqy file. I have tried but i 
</I>&gt;<i> could not find how i will delete &lt;page&gt; and create ID 
</I>&gt;<i> attribute as it as a same content.
</I>&gt;<i> (eg. Forward for forward, content for conent).
</I>&gt;<i> 
</I>&gt;<i> XML
</I>&gt;<i> ====
</I>&gt;<i> &lt;p&gt;&lt;entry&gt;&lt;text&gt;Foreword&lt;page&gt;v&lt;/page&gt;&lt;/text&gt;&lt;author&gt;Fen&lt;/auth
</I>or&gt;&lt;/entry&gt;&lt;/p&gt;
&gt;<i> 
</I>&gt;<i> Output
</I>&gt;<i> =====
</I>&gt;<i> 
</I>&gt;<i> &lt;para id=&quot;foreword&quot;&gt;Foreword&lt;/para&gt;
</I>&gt;<i> 
</I>&gt;<i> my xqy
</I>&gt;<i> ======
</I>&gt;<i> 
</I>&gt;<i> let $ad := doc(&quot;<A HREF="file:///d:/Byomokesh/PubXML/xquery/sample.xml&quot;">file:///d:/Byomokesh/PubXML/xquery/sample.xml&quot;</A>)
</I>&gt;<i> let $ad2 := $ad//text
</I>&gt;<i> for $r  in $ad2
</I>&gt;<i> return
</I>&gt;<i> &lt;s&gt;{data($r)}&lt;/s&gt;
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i> Thanks
</I>&gt;<i> Byomokesh
</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] BaseX 6.0
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003709.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003709.html" /><updated>2010-01-10T22:32:59Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Dear all,

we are glad to announce the release of BaseX 6.0. It offers a bunch of
<a title="new features" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_product_new_features.html">new features</a>, such as:

- a full implementation of <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> Update, reaching 100% in the <a title="W3C" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">W3C</a> Test Suite.
- an enhanced client/server architecture with ACID-safe transactions,
user and password management and transaction logging.
- extended XQuery Full Text features, supporting TF/IDF scoring, stop
word lists, fuzzy querying, etc.
- the improved creation of index structures, using constant memory.
- optimizations to increase the use of index structures and iterative
query processing.

BaseX is open-source. It is developed by the DBIS Group at University
of Konstanz. Please find more information at http://basex.org/

All the best,

Christian Gr&#252;n
BaseX Team

</PRE>
]]></content></entry><entry><title>  TOC Problem
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003708.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003708.html" /><updated>2010-01-08T16:43:38Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,

Sorry. It was typo error. I want transform from one <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> to another xml
format. I have analyzed and noticeed some doubts here.

1. delete &lt;Pagenum&gt; and  &lt;Tocauthor&gt;
2. &lt;navpoint ID&gt; value should be come based on the Title Text.
Example. Cover -- id=&quot;cover&quot;, chapter text should come &lt;.. id=&quot;ch01&quot;&gt;
(Look the &lt;navpoint&gt; Tag and &lt;Content..&gt;
3. &lt;Content Tag.

Its very had to write. Please look deeply my input and output.

Thanks
Byomokesh



On Fri, Jan 8, 2010 at 4:15 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;<i> Your input has
</I>&gt;<i>
</I>&gt;<i> 1 Room for Manoeuvre
</I>&gt;<i>
</I>&gt;<i> and you want the output to be
</I>&gt;<i>
</I>&gt;<i> 1 Room for Manoeuvre and the Paradox of Globalization
</I>&gt;<i>
</I>&gt;<i> That could be tricky.
</I>&gt;<i>
</I>&gt;<i> Apart from that kind of detail, which I'm sure is just carelessness in your
</I>&gt;<i> posting, it's hard to see exactly what your problem is. If you explain why
</I>&gt;<i> you are finding this difficult, then it might be easier to help you.
</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>
</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 Byomokesh Sahoo
</I>&gt;&gt;<i> Sent: 08 January 2010 10:34
</I>&gt;&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;&gt;<i> Subject:  TOC Problem
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Hi,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I want create TOC from <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> using <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>. Here find the
</I>&gt;&gt;<i> below Input XML, requirement output.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> xml
</I>&gt;&gt;<i> ===
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &lt;Bfm&gt;
</I>&gt;&gt;<i> &lt;Page Id=&quot;Page_v&quot;/&gt;
</I>&gt;&gt;<i> &lt;Toc&gt;
</I>&gt;&gt;<i> &lt;Head&gt;Contents&lt;/Head&gt;
</I>&gt;&gt;<i> &lt;Tocfront&gt;&lt;Tocentry&gt;&lt;Text&gt;Foreword&lt;Pagenum&gt;v&lt;/Pagenum&gt;&lt;/Text&gt;&lt;
</I>&gt;&gt;<i> Tocauthor&gt;Fen&lt;/Tocauthor&gt;&lt;/Tocentry&gt;&lt;/Tocfront&gt;
</I>&gt;&gt;<i> &lt;Tocfront&gt;&lt;Tocentry&gt;&lt;Text&gt;Acknowledgments&lt;Pagenum&gt;xx&lt;/Pagenum&gt;
</I>&gt;&gt;<i> &lt;/Text&gt;&lt;Tocauthor&gt;Jean
</I>&gt;&gt;<i> Dandelin&lt;/Tocauthor&gt;&lt;/Tocentry&gt;&lt;/Tocfront&gt;
</I>&gt;&gt;<i> &lt;Tocfront&gt;&lt;Tocentry&gt;&lt;Text&gt;Abbreviations&lt;Pagenum&gt;xiii&lt;/Pagenum&gt;
</I>&gt;&gt;<i> &lt;/Text&gt;&lt;/Tocentry&gt;&lt;/Tocfront&gt;
</I>&gt;&gt;<i> &lt;Tocchap&gt;&lt;Tocentry&gt;&lt;Text&gt;1 Room for
</I>&gt;&gt;<i> Manoeuvre&lt;Pagenum&gt;3&lt;/Pagenum&gt;&lt;/Text&gt;&lt;Tocauthor&gt;Jean
</I>&gt;&gt;<i> Daudelin&lt;/Tocauthor&gt;&lt;/Tocentry&gt;&lt;/Tocchap&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &lt;Tocpart&gt;&lt;Tocentry&gt;&lt;Text&gt;PART ONE&lt;Br/&gt;THE OTTAWA
</I>&gt;&gt;<i> GAME&lt;/Text&gt;&lt;/Tocentry&gt;
</I>&gt;&gt;<i> &lt;Tocchap&gt;&lt;Tocentry&gt;&lt;Text&gt;2 Raising Our
</I>&gt;&gt;<i> Game&lt;Pagenum&gt;31&lt;/Pagenum&gt;&lt;/Text&gt; &lt;Tocauthor&gt;Wendy
</I>&gt;&gt;<i> Dobson&lt;/Tocauthor&gt;&lt;/Tocentry&gt; &lt;/Tocchap&gt; &lt;/Tocpart&gt; &lt;/Toc&gt; &lt;/Bfm&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Requird Output
</I>&gt;&gt;<i> ==============
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &lt;navPoint id=&quot;icover&quot; playOrder=&quot;1&quot;&gt;
</I>&gt;&gt;<i> &lt;text&gt;Cover&lt;/text&gt;
</I>&gt;&gt;<i> &lt;content src=&quot;xhtml/cover.html&quot;/&gt;
</I>&gt;&gt;<i> &lt;/navPoint&gt;
</I>&gt;&gt;<i> &lt;navPoint id=&quot;ititle&quot; playOrder=&quot;2&quot;&gt;
</I>&gt;&gt;<i> &lt;text&gt;Title Page&lt;/text&gt;
</I>&gt;&gt;<i> &lt;content src=&quot;xhtml/title.html&quot;/&gt;
</I>&gt;&gt;<i> &lt;/navPoint&gt;
</I>&gt;&gt;<i> &lt;navPoint id=&quot;icopy&quot; playOrder=&quot;3&quot;&gt;
</I>&gt;&gt;<i> &lt;text&gt;Copyright Page&lt;/text&gt;
</I>&gt;&gt;<i> &lt;content src=&quot;xhtml/copyright.html&quot;/&gt;
</I>&gt;&gt;<i> &lt;/navPoint&gt;
</I>&gt;&gt;<i> &lt;navPoint id=&quot;icontents&quot; playOrder=&quot;4&quot;&gt;
</I>&gt;&gt;<i> &lt;text&gt;Contents&lt;/text&gt;
</I>&gt;&gt;<i> &lt;content src=&quot;xhtml/toc.html&quot;/&gt;
</I>&gt;&gt;<i> &lt;/navPoint&gt;
</I>&gt;&gt;<i> &lt;navPoint id=&quot;iforeward-ct&quot; playOrder=&quot;5&quot;&gt;
</I>&gt;&gt;<i> &lt;text&gt;Foreword&lt;/text&gt; &lt;content src=&quot;xhtml/foreword.html&quot;/&gt;
</I>&gt;&gt;<i> &lt;/navPoint&gt; &lt;navPoint id=&quot;iacknowledgment-ct&quot; playOrder=&quot;6&quot;&gt;
</I>&gt;&gt;<i> &lt;text&gt;Acknowledgments&lt;/text&gt; &lt;content
</I>&gt;&gt;<i> src=&quot;xhtml/acknowledgment.html&quot;/&gt; &lt;/navPoint&gt; &lt;navPoint
</I>&gt;&gt;<i> id=&quot;iabbre-ct&quot; playOrder=&quot;7&quot;&gt; &lt;text&gt;Abbreviations&lt;/text&gt;
</I>&gt;&gt;<i> &lt;content src=&quot;xhtml/abbrevation.html&quot;/&gt; &lt;/navPoint&gt; &lt;navPoint
</I>&gt;&gt;<i> id=&quot;ich01&quot; playOrder=&quot;8&quot;&gt;
</I>&gt;&gt;<i> &lt;text&gt;1 Room for Manoeuvre and the Paradox of
</I>&gt;&gt;<i> Globalization&lt;/text&gt; &lt;content src=&quot;xhtml/ch01.html&quot;/&gt; &lt;/navPoint&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &lt;navPoint id=&quot;ipart1&quot; playOrder=&quot;9&quot;&gt;
</I>&gt;&gt;<i> &lt;navLabel&gt;
</I>&gt;&gt;<i> &lt;text&gt;PART ONE THE OTTAWA GAME&lt;/text&gt;
</I>&gt;&gt;<i> &lt;/navLabel&gt;
</I>&gt;&gt;<i> &lt;content src=&quot;xhtml/part01.html&quot;/&gt;
</I>&gt;&gt;<i> &lt;navPoint id=&quot;ich02&quot; playOrder=&quot;10&quot;&gt;
</I>&gt;&gt;<i> &lt;text&gt;2 Raising Our Game: Canada among Nations&lt;/text&gt;
</I>&gt;&gt;<i> &lt;content src=&quot;xhtml/ch02.html#ch02&quot;/&gt; &lt;/navPoint&gt; &lt;/navPoint&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> ===========
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Please advice.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Thanks
</I>&gt;&gt;<i> Byomokesh
</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></PRE>
]]></content></entry><entry><title>  TOC Problem
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003706.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003706.html" /><updated>2010-01-08T16:03:43Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,

I want create TOC from <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> using <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>. Here find the below
Input XML, requirement output.

xml
===

&lt;Bfm&gt;
&lt;Page Id=&quot;Page_v&quot;/&gt;
&lt;Toc&gt;
&lt;Head&gt;Contents&lt;/Head&gt;
&lt;Tocfront&gt;&lt;Tocentry&gt;&lt;Text&gt;Foreword&lt;Pagenum&gt;v&lt;/Pagenum&gt;&lt;/Text&gt;&lt;Tocauthor&gt;Fen&lt;/Tocauthor&gt;&lt;/Tocentry&gt;&lt;/Tocfront&gt;
&lt;Tocfront&gt;&lt;Tocentry&gt;&lt;Text&gt;Acknowledgments&lt;Pagenum&gt;xx&lt;/Pagenum&gt;&lt;/Text&gt;&lt;Tocauthor&gt;Jean
Dandelin&lt;/Tocauthor&gt;&lt;/Tocentry&gt;&lt;/Tocfront&gt;
&lt;Tocfront&gt;&lt;Tocentry&gt;&lt;Text&gt;Abbreviations&lt;Pagenum&gt;xiii&lt;/Pagenum&gt;&lt;/Text&gt;&lt;/Tocentry&gt;&lt;/Tocfront&gt;
&lt;Tocchap&gt;&lt;Tocentry&gt;&lt;Text&gt;1 Room for
Manoeuvre&lt;Pagenum&gt;3&lt;/Pagenum&gt;&lt;/Text&gt;&lt;Tocauthor&gt;Jean
Daudelin&lt;/Tocauthor&gt;&lt;/Tocentry&gt;&lt;/Tocchap&gt;

&lt;Tocpart&gt;&lt;Tocentry&gt;&lt;Text&gt;PART ONE&lt;Br/&gt;THE OTTAWA GAME&lt;/Text&gt;&lt;/Tocentry&gt;
&lt;Tocchap&gt;&lt;Tocentry&gt;&lt;Text&gt;2 Raising Our Game&lt;Pagenum&gt;31&lt;/Pagenum&gt;&lt;/Text&gt;
&lt;Tocauthor&gt;Wendy Dobson&lt;/Tocauthor&gt;&lt;/Tocentry&gt;
&lt;/Tocchap&gt;
&lt;/Tocpart&gt;
&lt;/Toc&gt;
&lt;/Bfm&gt;

Requird Output
==============

&lt;navPoint id=&quot;icover&quot; playOrder=&quot;1&quot;&gt;
&lt;text&gt;Cover&lt;/text&gt;
&lt;content src=&quot;xhtml/cover.html&quot;/&gt;
&lt;/navPoint&gt;
&lt;navPoint id=&quot;ititle&quot; playOrder=&quot;2&quot;&gt;
&lt;text&gt;Title Page&lt;/text&gt;
&lt;content src=&quot;xhtml/title.html&quot;/&gt;
&lt;/navPoint&gt;
&lt;navPoint id=&quot;icopy&quot; playOrder=&quot;3&quot;&gt;
&lt;text&gt;Copyright Page&lt;/text&gt;
&lt;content src=&quot;xhtml/copyright.html&quot;/&gt;
&lt;/navPoint&gt;
&lt;navPoint id=&quot;icontents&quot; playOrder=&quot;4&quot;&gt;
&lt;text&gt;Contents&lt;/text&gt;
&lt;content src=&quot;xhtml/toc.html&quot;/&gt;
&lt;/navPoint&gt;
&lt;navPoint id=&quot;iforeward-ct&quot; playOrder=&quot;5&quot;&gt;
&lt;text&gt;Foreword&lt;/text&gt;
&lt;content src=&quot;xhtml/foreword.html&quot;/&gt;
&lt;/navPoint&gt;
&lt;navPoint id=&quot;iacknowledgment-ct&quot; playOrder=&quot;6&quot;&gt;
&lt;text&gt;Acknowledgments&lt;/text&gt;
&lt;content src=&quot;xhtml/acknowledgment.html&quot;/&gt;
&lt;/navPoint&gt;
&lt;navPoint id=&quot;iabbre-ct&quot; playOrder=&quot;7&quot;&gt;
&lt;text&gt;Abbreviations&lt;/text&gt;
&lt;content src=&quot;xhtml/abbrevation.html&quot;/&gt;
&lt;/navPoint&gt;
&lt;navPoint id=&quot;ich01&quot; playOrder=&quot;8&quot;&gt;
&lt;text&gt;1 Room for Manoeuvre and the Paradox of Globalization&lt;/text&gt;
&lt;content src=&quot;xhtml/ch01.html&quot;/&gt;
&lt;/navPoint&gt;

&lt;navPoint id=&quot;ipart1&quot; playOrder=&quot;9&quot;&gt;
&lt;navLabel&gt;
&lt;text&gt;PART ONE THE OTTAWA GAME&lt;/text&gt;
&lt;/navLabel&gt;
&lt;content src=&quot;xhtml/part01.html&quot;/&gt;
&lt;navPoint id=&quot;ich02&quot; playOrder=&quot;10&quot;&gt;
&lt;text&gt;2 Raising Our Game: Canada among Nations&lt;/text&gt;
&lt;content src=&quot;xhtml/ch02.html#ch02&quot;/&gt;
&lt;/navPoint&gt;
&lt;/navPoint&gt;

===========

Please advice.

Thanks
Byomokesh
</PRE>
]]></content></entry><entry><title>  TOC Problem
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003707.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003707.html" /><updated>2010-01-08T10:45:56Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Your input has

1 Room for Manoeuvre

and you want the output to be

1 Room for Manoeuvre and the Paradox of Globalization

That could be tricky.

Apart from that kind of detail, which I'm sure is just carelessness in your
posting, it's hard to see exactly what your problem is. If you explain why
you are finding this difficult, then it might be easier to help you.

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 Byomokesh Sahoo
</I>&gt;<i> Sent: 08 January 2010 10:34
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject:  TOC Problem
</I>&gt;<i> 
</I>&gt;<i> Hi,
</I>&gt;<i> 
</I>&gt;<i> I want create TOC from <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> using <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>. Here find the 
</I>&gt;<i> below Input XML, requirement output.
</I>&gt;<i> 
</I>&gt;<i> xml
</I>&gt;<i> ===
</I>&gt;<i> 
</I>&gt;<i> &lt;Bfm&gt;
</I>&gt;<i> &lt;Page Id=&quot;Page_v&quot;/&gt;
</I>&gt;<i> &lt;Toc&gt;
</I>&gt;<i> &lt;Head&gt;Contents&lt;/Head&gt;
</I>&gt;<i> &lt;Tocfront&gt;&lt;Tocentry&gt;&lt;Text&gt;Foreword&lt;Pagenum&gt;v&lt;/Pagenum&gt;&lt;/Text&gt;&lt;
</I>&gt;<i> Tocauthor&gt;Fen&lt;/Tocauthor&gt;&lt;/Tocentry&gt;&lt;/Tocfront&gt;
</I>&gt;<i> &lt;Tocfront&gt;&lt;Tocentry&gt;&lt;Text&gt;Acknowledgments&lt;Pagenum&gt;xx&lt;/Pagenum&gt;
</I>&gt;<i> &lt;/Text&gt;&lt;Tocauthor&gt;Jean
</I>&gt;<i> Dandelin&lt;/Tocauthor&gt;&lt;/Tocentry&gt;&lt;/Tocfront&gt;
</I>&gt;<i> &lt;Tocfront&gt;&lt;Tocentry&gt;&lt;Text&gt;Abbreviations&lt;Pagenum&gt;xiii&lt;/Pagenum&gt;
</I>&gt;<i> &lt;/Text&gt;&lt;/Tocentry&gt;&lt;/Tocfront&gt;
</I>&gt;<i> &lt;Tocchap&gt;&lt;Tocentry&gt;&lt;Text&gt;1 Room for
</I>&gt;<i> Manoeuvre&lt;Pagenum&gt;3&lt;/Pagenum&gt;&lt;/Text&gt;&lt;Tocauthor&gt;Jean
</I>&gt;<i> Daudelin&lt;/Tocauthor&gt;&lt;/Tocentry&gt;&lt;/Tocchap&gt;
</I>&gt;<i> 
</I>&gt;<i> &lt;Tocpart&gt;&lt;Tocentry&gt;&lt;Text&gt;PART ONE&lt;Br/&gt;THE OTTAWA 
</I>&gt;<i> GAME&lt;/Text&gt;&lt;/Tocentry&gt;
</I>&gt;<i> &lt;Tocchap&gt;&lt;Tocentry&gt;&lt;Text&gt;2 Raising Our 
</I>&gt;<i> Game&lt;Pagenum&gt;31&lt;/Pagenum&gt;&lt;/Text&gt; &lt;Tocauthor&gt;Wendy 
</I>&gt;<i> Dobson&lt;/Tocauthor&gt;&lt;/Tocentry&gt; &lt;/Tocchap&gt; &lt;/Tocpart&gt; &lt;/Toc&gt; &lt;/Bfm&gt;
</I>&gt;<i> 
</I>&gt;<i> Requird Output
</I>&gt;<i> ==============
</I>&gt;<i> 
</I>&gt;<i> &lt;navPoint id=&quot;icover&quot; playOrder=&quot;1&quot;&gt;
</I>&gt;<i> &lt;text&gt;Cover&lt;/text&gt;
</I>&gt;<i> &lt;content src=&quot;xhtml/cover.html&quot;/&gt;
</I>&gt;<i> &lt;/navPoint&gt;
</I>&gt;<i> &lt;navPoint id=&quot;ititle&quot; playOrder=&quot;2&quot;&gt;
</I>&gt;<i> &lt;text&gt;Title Page&lt;/text&gt;
</I>&gt;<i> &lt;content src=&quot;xhtml/title.html&quot;/&gt;
</I>&gt;<i> &lt;/navPoint&gt;
</I>&gt;<i> &lt;navPoint id=&quot;icopy&quot; playOrder=&quot;3&quot;&gt;
</I>&gt;<i> &lt;text&gt;Copyright Page&lt;/text&gt;
</I>&gt;<i> &lt;content src=&quot;xhtml/copyright.html&quot;/&gt;
</I>&gt;<i> &lt;/navPoint&gt;
</I>&gt;<i> &lt;navPoint id=&quot;icontents&quot; playOrder=&quot;4&quot;&gt;
</I>&gt;<i> &lt;text&gt;Contents&lt;/text&gt;
</I>&gt;<i> &lt;content src=&quot;xhtml/toc.html&quot;/&gt;
</I>&gt;<i> &lt;/navPoint&gt;
</I>&gt;<i> &lt;navPoint id=&quot;iforeward-ct&quot; playOrder=&quot;5&quot;&gt; 
</I>&gt;<i> &lt;text&gt;Foreword&lt;/text&gt; &lt;content src=&quot;xhtml/foreword.html&quot;/&gt; 
</I>&gt;<i> &lt;/navPoint&gt; &lt;navPoint id=&quot;iacknowledgment-ct&quot; playOrder=&quot;6&quot;&gt; 
</I>&gt;<i> &lt;text&gt;Acknowledgments&lt;/text&gt; &lt;content 
</I>&gt;<i> src=&quot;xhtml/acknowledgment.html&quot;/&gt; &lt;/navPoint&gt; &lt;navPoint 
</I>&gt;<i> id=&quot;iabbre-ct&quot; playOrder=&quot;7&quot;&gt; &lt;text&gt;Abbreviations&lt;/text&gt; 
</I>&gt;<i> &lt;content src=&quot;xhtml/abbrevation.html&quot;/&gt; &lt;/navPoint&gt; &lt;navPoint 
</I>&gt;<i> id=&quot;ich01&quot; playOrder=&quot;8&quot;&gt;
</I>&gt;<i> &lt;text&gt;1 Room for Manoeuvre and the Paradox of 
</I>&gt;<i> Globalization&lt;/text&gt; &lt;content src=&quot;xhtml/ch01.html&quot;/&gt; &lt;/navPoint&gt;
</I>&gt;<i> 
</I>&gt;<i> &lt;navPoint id=&quot;ipart1&quot; playOrder=&quot;9&quot;&gt;
</I>&gt;<i> &lt;navLabel&gt;
</I>&gt;<i> &lt;text&gt;PART ONE THE OTTAWA GAME&lt;/text&gt;
</I>&gt;<i> &lt;/navLabel&gt;
</I>&gt;<i> &lt;content src=&quot;xhtml/part01.html&quot;/&gt;
</I>&gt;<i> &lt;navPoint id=&quot;ich02&quot; playOrder=&quot;10&quot;&gt;
</I>&gt;<i> &lt;text&gt;2 Raising Our Game: Canada among Nations&lt;/text&gt; 
</I>&gt;<i> &lt;content src=&quot;xhtml/ch02.html#ch02&quot;/&gt; &lt;/navPoint&gt; &lt;/navPoint&gt;
</I>&gt;<i> 
</I>&gt;<i> ===========
</I>&gt;<i> 
</I>&gt;<i> Please advice.
</I>&gt;<i> 
</I>&gt;<i> Thanks
</I>&gt;<i> Byomokesh
</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>  SXXP0003
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003705.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003705.html" /><updated>2010-01-08T09:35:03Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>There are plenty of ways of changing the way <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> reports error messages -
if you want help on this, please use the Saxon help list.  However, there is
no way of avoiding the error: if your input is <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_well_formed.html">not well-formed</a> XML, Saxon
will not process 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 


  _____  

From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf
Of Jesus Rodrigues
Sent: 08 January 2010 09:24
To: http://x-query.com/mailman/listinfo/talk
Subject: Re:  SXXP0003


Hi,

This is a now problem, some xml read have this problem and I <a title="convert" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/convert_to_xml.html">convert</a> the xml
to uft-8. I would like to avoid this message (SXXP0003 ...) at the console,
because I read a many files. Is possible set any parameter at saxon to avoid
the error message at the console?

Regards


2010/1/7 Andrew Welch &lt;http://x-query.com/mailman/listinfo/talk&gt;


You usually get that when you parse latin1 or cp1252 (or other) as <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">UTF8</a>.

Either:

a) correct the encoding in the xml prolog (or add a prolog with the
correct encoding)

or

b) convert the XML to UTF-8.  (you could do that using a tool like
Notepad++)

cheers
andrew

2010/1/7 Jesus Rodrigues &lt;http://x-query.com/mailman/listinfo/talk&gt;:
&gt;<i>
</I>
&gt;<i> Dear all,
</I>&gt;<i>
</I>&gt;<i> How avoid this messagem at console?
</I>&gt;<i>
</I>&gt;<i> Error on line 1 column 1347
</I>&gt;<i>   SXXP0003: Error reported by <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>: Invalid byte 2 of 2-byte UTF-8
</I>&gt;<i> sequence.
</I>&gt;<i>
</I>&gt;<i> This problem is showed when I have some problem at xml read.
</I>&gt;<i>
</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>


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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100108/a28774b4/attachment.htm
</PRE>
]]></content></entry><entry><title>  SXXP0003
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003704.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003704.html" /><updated>2010-01-08T07:23:46Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,

This is a now problem, some <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> read have this problem and I <a title="convert" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/convert_to_xml.html">convert</a> the xml
to uft-8. I would like to avoid this message (SXXP0003 ...) at the console,
because I read a many files. Is possible set any parameter at <a title="saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">saxon</a> to avoid
the error message at the console?

Regards

2010/1/7 Andrew Welch &lt;http://x-query.com/mailman/listinfo/talk&gt;

&gt;<i> You usually get that when you parse latin1 or cp1252 (or other) as <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">UTF8</a>.
</I>&gt;<i>
</I>&gt;<i> Either:
</I>&gt;<i>
</I>&gt;<i> a) correct the encoding in the xml prolog (or add a prolog with the
</I>&gt;<i> correct encoding)
</I>&gt;<i>
</I>&gt;<i> or
</I>&gt;<i>
</I>&gt;<i> b) convert the XML to UTF-8.  (you could do that using a <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tool</a> like
</I>&gt;<i> Notepad++)
</I>&gt;<i>
</I>&gt;<i> cheers
</I>&gt;<i> andrew
</I>&gt;<i>
</I>&gt;<i> 2010/1/7 Jesus Rodrigues &lt;http://x-query.com/mailman/listinfo/talk&gt;:
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Dear all,
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; How avoid this messagem at console?
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Error on line 1 column 1347
</I>&gt;<i> &gt;   SXXP0003: Error reported by <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>: Invalid byte 2 of 2-byte UTF-8
</I>&gt;<i> &gt; sequence.
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; This problem is showed when I have some problem at xml read.
</I>&gt;<i> &gt;
</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>&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>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100108/ca29f5e5/attachment.htm
</PRE>
]]></content></entry><entry><title>  SXXP0003
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003701.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003701.html" /><updated>2010-01-07T19:42:41Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi Jesus,

Messages like these are typically observed when your parser thinks it is receiving a <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> encoded document, while it is actually something else. Does your <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> contain an XML declaration containing the correct encoding? Or are you setting the wrong encoding programmatically perhaps?

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 Jesus Rodrigues
</I>&gt;<i> Sent: donderdag 7 januari 2010 19:39
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject:  SXXP0003
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Dear all,
</I>&gt;<i>
</I>&gt;<i> How avoid this messagem at console?
</I>&gt;<i>
</I>&gt;<i> Error on line 1 column 1347
</I>&gt;<i>   SXXP0003: Error reported by <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>: Invalid byte 2 of
</I>&gt;<i> 2-byte UTF-8 sequence.
</I>&gt;<i>
</I>&gt;<i> This problem is showed when I have some problem at xml read.
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Regards
</I>&gt;<i>
</I>&gt;<i>
</I>

</PRE>
]]></content></entry><entry><title>  SXXP0003
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003702.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003702.html" /><updated>2010-01-07T18:45:35Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>You usually get that when you parse latin1 or cp1252 (or other) as <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">UTF8</a>.

Either:

a) correct the encoding in the <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> prolog (or add a prolog with the
correct encoding)

or

b) <a title="convert" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/convert_to_xml.html">convert</a> the XML to UTF-8.  (you could do that using a <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tool</a> like Notepad++)

cheers
andrew

2010/1/7 Jesus Rodrigues &lt;http://x-query.com/mailman/listinfo/talk&gt;:
&gt;<i>
</I>&gt;<i> Dear all,
</I>&gt;<i>
</I>&gt;<i> How avoid this messagem at console?
</I>&gt;<i>
</I>&gt;<i> Error on line 1 column 1347
</I>&gt;<i> &#160; SXXP0003: Error reported by <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>: Invalid byte 2 of 2-byte UTF-8
</I>&gt;<i> sequence.
</I>&gt;<i>
</I>&gt;<i> This problem is showed when I have some problem at xml read.
</I>&gt;<i>
</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>


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

</PRE>
]]></content></entry><entry><title>  SXXP0003
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003700.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003700.html" /><updated>2010-01-07T16:38:31Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Dear all,

How avoid this messagem at console?

Error on line 1 column 1347
  SXXP0003: Error reported by <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>: Invalid byte 2 of 2-byte <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>
sequence.

This problem is showed when I have some problem at xml read.


Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100107/84001456/attachment.htm
</PRE>
]]></content></entry><entry><title>  [Announce] Upcoming hands-on XSLT/XQuery training in
 Europe and US - XQuery-Talk
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003703.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003703.html" /><updated>2010-01-07T14:03:23Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Registration is now open for two 
publicly-subscribed deliveries of our 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 training coming up, one in Europe and one in the US.

These are the most in-depth configurations of 
Crane's XSLT and XQuery training classes, 
covering the use of every element, every 
attribute, every keyword and every function of 
both 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> and 2.0 and XQuery 1.0 with 
more detail and more exercises than other 
available configurations of our material.

Prague, Czech Republic - March 15-19, 2010
http://www.CraneSoftwrights.com/index.html#Crane201003CZ

   A post-conference <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_tutorial.html">tutorial for XML</a> Prague 2010 - http://XMLPrague.cz

   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):
     http://www.CraneSoftwrights.com/training/ptuxq/ptuxqsyl.htm

   Venue - Residence Retezov&#225;, Prague
         - class size limited to a total of only 6 students
     http://www.retezova.com/?id=618

   Instructor/author:
     http://www.CraneSoftwrights.com/bio/gkholman.htm

   Early-bird date for discounted registration: February 15, 2010
     http://www.CraneSoftwrights.com/forms/register.htm#prices

San Carlos, California - April 26-30, 2010
http://www.CraneSoftwrights.com/index.html#Crane201004MLC

   Practical Transformation Using XSLT, XQuery and XPath (5 days):
     http://www.CraneSoftwrights.com/training/ptuxq/ptuxqsyl.htm

   Venue - Mark Logic Corporation headquarters, San Carlos, CA
     http://www.marklogic.com/company/contact.html

   Instructor/author:
     http://www.CraneSoftwrights.com/bio/gkholman.htm

   Early-bird date for discounted registration: April 5, 2010
     http://www.CraneSoftwrights.com/forms/register.htm#prices

We also have a number of other private corporate 
deliveries between now and then in the US and 
India.  If you are interested in having us teach 
publicly or privately anywhere in the world, 
please review our syllabi and all of our upcoming events at:

   http://www.CraneSoftwrights.com/schedule.htm#calendar

I look forward to answering any questions you may have off-list, please.

Thanks!

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

cc: XML Dev, XQuery-Talk, <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xsllist/">XSL List</a>, XML-Doc, XML-L, Mark Logic Developer list

p.s. apologies for multiply-received copies of 
this announcement through the different lists; 
all of Crane's announcements include &quot;[Announce]&quot; 
in the subject line for filtering them away

--
<a title="UBL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/ubl/index.html">UBL</a> and Code List training:      Copenhagen, Denmark 2010-02-08/10
XSLT/XQuery/XPath training after http://XMLPrague.cz 2010-03-15/19
XSLT/XQuery/XPath training:   San Carlos, California 2010-04-26/30
Vote for your <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>:   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>  XQuery issue regarding creating table of 
	contents(TOC) dynamically.
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003697.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003697.html" /><updated>2010-01-07T12:38:03Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Thu, Jan 7, 2010 at 12:12 PM, Michael Dyck &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:

&gt;<i> anuj kumar wrote:
</I>&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I have an <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> of the form
</I>&gt;&gt;<i> &lt;doc&gt;
</I>&gt;&gt;<i>    &lt;p&gt;(a)- first level &lt;/p&gt;
</I>&gt;&gt;<i>    &lt;p&gt;(1)- second level&lt;/p&gt;
</I>&gt;&gt;<i>    &lt;p&gt;(2)- second level&lt;/p&gt;
</I>&gt;&gt;<i>    &lt;p&gt;(A)- third level&lt;/p&gt;
</I>&gt;&gt;<i>    &lt;p&gt;(B)- third level&lt;/p&gt;
</I>&gt;&gt;<i>    &lt;p&gt;(3)- second level&lt;/p&gt;
</I>&gt;&gt;<i>    &lt;p&gt;(b)- first level&lt;/p&gt;   &lt;/doc&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> A change in the designator (Designators may be in alpha, numeric, roman,
</I>&gt;&gt;<i> alpha-numeric, etc bounded or unbounded by brackets) format must be used
</I>&gt;&gt;<i>  as basis for identifying the primary level. Designators in sequence or
</I>&gt;&gt;<i> series must be treated as primary level text of the same level.
</I>&gt;&gt;<i> For example:
</I>&gt;&gt;<i> (a)-first level
</I>&gt;&gt;<i> (b)-first level
</I>&gt;&gt;<i> (c)-first level
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Hm. Consider the input:
</I>&gt;<i>  &lt;doc&gt;
</I>&gt;<i>    &lt;p&gt;(a)- ..&lt;/p&gt;
</I>&gt;<i>    &lt;p&gt;(b)- ..&lt;/p&gt;
</I>&gt;<i>    &lt;p&gt;(c)- ..&lt;/p&gt;
</I>&gt;<i>    &lt;p&gt;(d)- ..&lt;/p&gt;
</I>&gt;<i>    &lt;p&gt;(e)- ..&lt;/p&gt;
</I>&gt;<i>    &lt;p&gt;(f)- ..&lt;/p&gt;
</I>&gt;<i>    &lt;p&gt;(g)- ..&lt;/p&gt;
</I>&gt;<i>    &lt;p&gt;(h)- ..&lt;/p&gt;
</I>&gt;<i>    &lt;p&gt;(i)- ..&lt;/p&gt;
</I>&gt;<i>  &lt;/doc&gt;
</I>&gt;<i> In the last &lt;p&gt;, how are you supposed to know whether the &quot;i&quot; is alpha (and
</I>&gt;<i> thus first level) or roman (and thus second level)?
</I>&gt;<i>
</I>
And when designators are alpha-numeric, what constitutes a &quot;change in
&gt;<i> format&quot;? (What defines &quot;designators in sequence&quot;?)
</I>&gt;<i>
</I>&gt;<i> -Michael
</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>
ok, first one is very good question. I didn't think about it. Thanks for
your observation.
For the time being we will leave it.

Let's come to your second question, if designators are alpha-numeric then
change in format may be like only numeric or only alpha.

Your third question: designators in sequence means a,b,c .. or A,B,C.. or
1,2,3.. etc.


-- 
Regards,
Anuj Kumar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100107/33f4ae4e/attachment.htm
</PRE>
]]></content></entry><entry><title>  XQuery issue regarding creating table of
	contents(TOC) dynamically.
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003695.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003695.html" /><updated>2010-01-07T11:28:20Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi All,
Wish you all a very happy and prosperous new year 2010.

I nee your help regarding following issue:

I have an <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> of the form
&lt;doc&gt;
      &lt;p&gt;(a)- first level &lt;/p&gt;
    &lt;p&gt;(1)- second level&lt;/p&gt;
    &lt;p&gt;(2)- second level&lt;/p&gt;
    &lt;p&gt;(A)- third level&lt;/p&gt;
    &lt;p&gt;(B)- third level&lt;/p&gt;
    &lt;p&gt;(3)- second level&lt;/p&gt;
    &lt;p&gt;(b)- first level&lt;/p&gt;
&lt;/doc&gt;

A change in the designator(Designators may be in alpha, numeric, roman,
alpha-numeric,
etc bounded or unbounded by brackets) format must be used as basis for
identifying the primary level.
Designators in sequence or series must be treated as primary level text of
the same level. For example:
(a)-first level
(b)-first level
(c)-first level

I have to create the following output xml out of the above input xml:

&lt;doc&gt;
      &lt;parent&gt;
       &lt;title&gt;(a)- first level &lt;/title&gt;
       &lt;child&gt;&lt;title&gt;(1)- second level&lt;/title&gt;&lt;/child&gt;
       &lt;child&gt;
        &lt;title&gt;(2)- second level&lt;/title&gt;
        &lt;child&gt;&lt;title&gt;(A)- third level&lt;/title&gt;&lt;/child&gt;
        &lt;child&gt;&lt;title&gt;(B)- third level&lt;/title&gt;&lt;/child&gt;
       &lt;/child&gt;
      &lt;child&gt;&lt;title&gt;(3)- second level&lt;/title&gt;&lt;/child&gt;
    &lt;/parent&gt;
    &lt;parent&gt;&lt;title&gt;(b)- first level&lt;/title&gt;&lt;/parent&gt;

&lt;/doc&gt;

Pleae advise, how to do this?
Thanks in advance.

Regards,
Anuj Kumar
Innodata Isogen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100107/41285fbe/attachment.htm
</PRE>
]]></content></entry><entry><title>  XQuery issue regarding creating table
	ofcontents(TOC) dynamically.
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003698.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003698.html" /><updated>2010-01-07T09:16:33Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>It's not going to be easy and I'm not going to try and write the code for
you, but here's an approach.
 
You need to do a recursive walk through the siblings. On each step, pass the
current &quot;full hierarchic section number&quot; as a sequence, for example (&quot;a&quot;,
&quot;2&quot;, &quot;B&quot;). If the &quot;designator&quot; of the next element is the successor of the
last item in this sequence, or if it is the start of a new (nested)
sequence, then you can construct the next section number and continue the
recursion. If the next designator is the successor of an item in the
hierarchic section number other than the last, then you can exit one level
of recursion and try again.
 
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 anuj kumar
Sent: 07 January 2010 05:58
To: http://x-query.com/mailman/listinfo/talk
Cc: http://x-query.com/mailman/listinfo/talk
Subject:  <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> issue regarding creating table ofcontents(TOC)
dynamically.


Hi All,
Wish you all a very happy and prosperous new year 2010.

I nee your help regarding following issue: 

I have an <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> of the form
&lt;doc&gt;
      &lt;p&gt;(a)- first level &lt;/p&gt;
    &lt;p&gt;(1)- second level&lt;/p&gt;
    &lt;p&gt;(2)- second level&lt;/p&gt;
    &lt;p&gt;(A)- third level&lt;/p&gt;
    &lt;p&gt;(B)- third level&lt;/p&gt;
    &lt;p&gt;(3)- second level&lt;/p&gt;
    &lt;p&gt;(b)- first level&lt;/p&gt;    
&lt;/doc&gt;

A change in the designator(Designators may be in alpha, numeric, roman,
alpha-numeric, 
etc bounded or unbounded by brackets) format must be used as basis for
identifying the primary level. 
Designators in sequence or series must be treated as primary level text of
the same level. For example:
(a)-first level
(b)-first level
(c)-first level

I have to create the following output xml out of the above input xml:

&lt;doc&gt;
      &lt;parent&gt;
       &lt;title&gt;(a)- first level &lt;/title&gt;
       &lt;child&gt;&lt;title&gt;(1)- second level&lt;/title&gt;&lt;/child&gt;
       &lt;child&gt;
        &lt;title&gt;(2)- second level&lt;/title&gt;
        &lt;child&gt;&lt;title&gt;(A)- third level&lt;/title&gt;&lt;/child&gt;
        &lt;child&gt;&lt;title&gt;(B)- third level&lt;/title&gt;&lt;/child&gt;
       &lt;/child&gt;
      &lt;child&gt;&lt;title&gt;(3)- second level&lt;/title&gt;&lt;/child&gt;
    &lt;/parent&gt;
    &lt;parent&gt;&lt;title&gt;(b)- first level&lt;/title&gt;&lt;/parent&gt;

&lt;/doc&gt;

Pleae advise, how to do this?
Thanks in advance.

Regards,
Anuj Kumar
Innodata Isogen 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100107/5a137027/attachment.htm
</PRE>
]]></content></entry><entry><title>  Re: XQuery issue regarding creating table of
 contents(TOC) dynamically.
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003699.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003699.html" /><updated>2010-01-07T09:06:34Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>At 2010-01-07 11:28 +0530, anuj kumar wrote:
&gt;<i>I have an <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> of the form
</I>&gt;<i>...
</I>&gt;<i>A change in the designator(Designators may be in alpha, numeric, 
</I>&gt;<i>roman, alpha-numeric,
</I>&gt;<i>etc bounded or unbounded by brackets) format must be used as basis 
</I>&gt;<i>for identifying the primary level.
</I>
I've implemented this so you can 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> to determine 
the level indications.

&gt;<i>Designators in sequence or series must be treated as primary level 
</I>&gt;<i>text of the same level. For example:
</I>&gt;<i>(a)-first level
</I>&gt;<i>(b)-first level
</I>&gt;<i>(c)-first level
</I>&gt;<i>
</I>&gt;<i>I have to create the following output xml out of the above input xml:
</I>&gt;<i>...
</I>&gt;<i>Pleae advise, how to do this?
</I>
You don't share with us what you have tried and what has not worked for you.

I have a complete solution below.  I found it easier to think first 
in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a> because of the grouping facilities that are available, and 
then to just transliterate that into <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> for a pure-XQuery solution.

Note that readers may find it interesting to have to do the following 
in XQuery:

   (&lt;tree&gt;{elements-expression}&lt;/tree&gt;)/*

... in order to create a sibling relationship between a copy of nodes 
so that the recursive use of the following-sibling axis would not 
access the original nodes.  Simply referencing the nodes isn't 
sufficient because the nodes retain their original location in the 
original tree.

I hope this helps.

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


T:\ftemp&gt;type anuj.xml
&lt;doc&gt;
   &lt;p&gt;(a)- first level &lt;/p&gt;
   &lt;p&gt;(1)- second level&lt;/p&gt;
   &lt;p&gt;(2)- second level&lt;/p&gt;
   &lt;p&gt;(A)- third level&lt;/p&gt;
   &lt;p&gt;(B)- third level&lt;/p&gt;
   &lt;p&gt;(3)- second level&lt;/p&gt;
   &lt;p&gt;(b)- first level&lt;/p&gt;
&lt;/doc&gt;
T:\ftemp&gt;call xslt2 anuj.xml anuj.xsl
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;doc&gt;
    &lt;parent&gt;
       &lt;title&gt;(a)- first level &lt;/title&gt;
       &lt;child&gt;
          &lt;title&gt;(1)- second level&lt;/title&gt;
       &lt;/child&gt;
       &lt;child&gt;
          &lt;title&gt;(2)- second level&lt;/title&gt;
          &lt;child&gt;
             &lt;title&gt;(A)- third level&lt;/title&gt;
          &lt;/child&gt;
          &lt;child&gt;
             &lt;title&gt;(B)- third level&lt;/title&gt;
          &lt;/child&gt;
       &lt;/child&gt;
       &lt;child&gt;
          &lt;title&gt;(3)- second level&lt;/title&gt;
       &lt;/child&gt;
    &lt;/parent&gt;
    &lt;parent&gt;
       &lt;title&gt;(b)- first level&lt;/title&gt;
    &lt;/parent&gt;
&lt;/doc&gt;
T:\ftemp&gt;call xquery anuj.xq
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;doc&gt;
    &lt;parent&gt;
       &lt;title&gt;(a)- first level &lt;/title&gt;
       &lt;child&gt;
          &lt;title&gt;(1)- second level&lt;/title&gt;
       &lt;/child&gt;
       &lt;child&gt;
          &lt;title&gt;(2)- second level&lt;/title&gt;
          &lt;child&gt;
             &lt;title&gt;(A)- third level&lt;/title&gt;
          &lt;/child&gt;
          &lt;child&gt;
             &lt;title&gt;(B)- third level&lt;/title&gt;
          &lt;/child&gt;
       &lt;/child&gt;
       &lt;child&gt;
          &lt;title&gt;(3)- second level&lt;/title&gt;
       &lt;/child&gt;
    &lt;/parent&gt;
    &lt;parent&gt;
       &lt;title&gt;(b)- first level&lt;/title&gt;
    &lt;/parent&gt;
&lt;/doc&gt;
T:\ftemp&gt;type anuj.xsl
&lt;?xml version=&quot;1.0&quot; encoding=&quot;US-ASCII&quot;?&gt;
&lt;xsl:<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> xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;
                 version=&quot;2.0&quot;&gt;

&lt;xsl:output indent=&quot;yes&quot;/&gt;

&lt;xsl:variable name=&quot;patterns&quot; as=&quot;element(patterns)&quot;&gt;
   &lt;patterns&gt;
     &lt;pattern&gt;^\([a-z]\)&lt;/pattern&gt;
     &lt;pattern&gt;^\([\d+]\)&lt;/pattern&gt;
     &lt;pattern&gt;^\([A-Z]\)&lt;/pattern&gt;
   &lt;/patterns&gt;
&lt;/xsl:variable&gt;

&lt;xsl:template match=&quot;doc&quot;&gt;
   &lt;doc&gt;
     &lt;xsl:call-template name=&quot;parent&quot;&gt;
       &lt;xsl:with-param name=&quot;population&quot; select=&quot;p&quot;/&gt;
       &lt;xsl:with-param name=&quot;pattern&quot; select=&quot;$patterns/pattern[1]&quot;/&gt;
       &lt;xsl:with-param name=&quot;relationship&quot; select=&quot;'parent'&quot;/&gt;
     &lt;/xsl:call-template&gt;
   &lt;/doc&gt;
&lt;/xsl:template&gt;

&lt;xsl:template name=&quot;parent&quot;&gt;
   &lt;xsl:param name=&quot;population&quot;/&gt;
   &lt;xsl:param name=&quot;pattern&quot;/&gt;
   &lt;xsl:param name=&quot;relationship&quot;/&gt;
   &lt;xsl:if test=&quot;$population&quot;&gt;
     &lt;!--only do something if there is something to do--&gt;
     &lt;xsl:choose&gt;
       &lt;xsl:when test=&quot;not($pattern)&quot;&gt;
         &lt;!--no more depth--&gt;
         &lt;xsl:for-each select=&quot;$population&quot;&gt;
           &lt;xsl:element name=&quot;{$relationship}&quot;&gt;
             &lt;title&gt;&lt;xsl:copy-of select=&quot;node()&quot;/&gt;&lt;/title&gt;
           &lt;/xsl:element&gt;
         &lt;/xsl:for-each&gt;
       &lt;/xsl:when&gt;
       &lt;xsl:otherwise&gt;
         &lt;!--process next level of depth--&gt;
         &lt;xsl:for-each-group select=&quot;$population&quot;
                             group-starting-with=&quot;*[matches(.,$pattern)]&quot;&gt;
           &lt;xsl:element name=&quot;{$relationship}&quot;&gt;
             &lt;title&gt;&lt;xsl:copy-of select=&quot;node()&quot;/&gt;&lt;/title&gt;
             &lt;xsl:call-template name=&quot;parent&quot;&gt;
               &lt;xsl:with-param name=&quot;population&quot;
                               select=&quot;current-group()[position()&gt;1]&quot;/&gt;
               &lt;xsl:with-param name=&quot;pattern&quot;
                               select=&quot;$pattern/following-sibling::*[1]&quot;/&gt;
               &lt;xsl:with-param name=&quot;relationship&quot; select=&quot;'child'&quot;/&gt;
             &lt;/xsl:call-template&gt;
           &lt;/xsl:element&gt;
         &lt;/xsl:for-each-group&gt;
       &lt;/xsl:otherwise&gt;
     &lt;/xsl:choose&gt;
   &lt;/xsl:if&gt;
&lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;

T:\ftemp&gt;type anuj.xq
declare namespace a = &quot;urn:X-anuj&quot;;

declare variable $patterns as element(patterns) :=
   &lt;patterns&gt;
     &lt;pattern&gt;^\([a-z]\)&lt;/pattern&gt;
     &lt;pattern&gt;^\([\d+]\)&lt;/pattern&gt;
     &lt;pattern&gt;^\([A-Z]\)&lt;/pattern&gt;
   &lt;/patterns&gt;;

declare function a:parent( $population, $pattern, $relationship )
{
   if( $population )
   then
     (: only do something if there is something to do :)
     if( not($pattern) )
     then
       (: no more depth :)
       for $each in $population return
         element {$relationship} {&lt;title&gt;{$each/node()}&lt;/title&gt;}
     else
       (: process next level of depth :)
       for $level in $population[matches(.,$pattern)]
       return
         element {$relationship}
         {
           &lt;title&gt;{$level/node()}&lt;/title&gt;,
           a:parent( (&lt;tree&gt;
                       {$level/following-sibling::* except
                        $level/following-sibling::*[matches(.,$pattern)][1]/
                                               (self::* | 
following-sibling::* )
                       }
                      &lt;/tree&gt;)/* (:create a new tree of children:),
                      $pattern/following-sibling::*[1] (:the next pattern:),
                      'child' )
         }
   else ()
};

&lt;doc&gt;{a:parent( doc('anuj.xml')/doc/p, $patterns/pattern[1], 'parent' )}&lt;/doc&gt;


T:\ftemp&gt;rem Done!


--
UBL and Code List training:      Copenhagen, Denmark 2010-02-08/10
XSLT/XQuery/XPath training after http://XMLPrague.cz 2010-03-15/19
XSLT/XQuery/XPath training:   San Carlos, California 2010-04-26/30
Vote for your XML training:   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>  XQuery issue regarding creating table
	of	contents(TOC) dynamically.
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003696.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003696.html" /><updated>2010-01-06T22:42:06Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>anuj kumar wrote:
&gt;<i> 
</I>&gt;<i> I have an <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> of the form
</I>&gt;<i> &lt;doc&gt;
</I>&gt;<i>     &lt;p&gt;(a)- first level &lt;/p&gt;
</I>&gt;<i>     &lt;p&gt;(1)- second level&lt;/p&gt;
</I>&gt;<i>     &lt;p&gt;(2)- second level&lt;/p&gt;
</I>&gt;<i>     &lt;p&gt;(A)- third level&lt;/p&gt;
</I>&gt;<i>     &lt;p&gt;(B)- third level&lt;/p&gt;
</I>&gt;<i>     &lt;p&gt;(3)- second level&lt;/p&gt;
</I>&gt;<i>     &lt;p&gt;(b)- first level&lt;/p&gt;   
</I>&gt;<i> &lt;/doc&gt;
</I>&gt;<i> 
</I>&gt;<i> A change in the designator (Designators may be in alpha, numeric, roman, 
</I>&gt;<i> alpha-numeric, etc bounded or unbounded by brackets) format must be used
</I>&gt;<i>  as basis for identifying the primary level. Designators in sequence or
</I>&gt;<i> series must be treated as primary level text of the same level.
</I>&gt;<i> For example:
</I>&gt;<i> (a)-first level
</I>&gt;<i> (b)-first level
</I>&gt;<i> (c)-first level
</I>
Hm. Consider the input:
   &lt;doc&gt;
     &lt;p&gt;(a)- ..&lt;/p&gt;
     &lt;p&gt;(b)- ..&lt;/p&gt;
     &lt;p&gt;(c)- ..&lt;/p&gt;
     &lt;p&gt;(d)- ..&lt;/p&gt;
     &lt;p&gt;(e)- ..&lt;/p&gt;
     &lt;p&gt;(f)- ..&lt;/p&gt;
     &lt;p&gt;(g)- ..&lt;/p&gt;
     &lt;p&gt;(h)- ..&lt;/p&gt;
     &lt;p&gt;(i)- ..&lt;/p&gt;
   &lt;/doc&gt;
In the last &lt;p&gt;, how are you supposed to know whether the &quot;i&quot; is alpha 
(and thus first level) or roman (and thus second level)?

And when designators are alpha-numeric, what constitutes a &quot;change in 
format&quot;? (What defines &quot;designators in sequence&quot;?)

-Michael

</PRE>
]]></content></entry><entry><title>  Recursive functions and function types
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003693.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003693.html" /><updated>2010-01-06T16:01:52Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Pavel,

I think this is something that the <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> Working Group needs to 
consider fixing in the next revision of XQuery 1.1. Please can you raise 
this as a bug against the <a title="specification" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">specification</a> on the W3C bugzilla, to make 
sure the working groups attention is directed to it.

http://www.w3.org/Bugs/Public/

John

Pavel Minaev wrote:
&gt;<i> With the introduction of inline functions and function item type to
</I>&gt;<i> XQuery 1.1, I hoped that we'll finally get a decent looping construct
</I>&gt;<i> in form of inline recursive functions; e.g.:
</I>&gt;<i> 
</I>&gt;<i>      let $fib := function($n as xs:integer) {
</I>&gt;<i>         if ($n &lt; 3) then 1 else $fib($n-1) + $fib($n+2)
</I>&gt;<i>      }
</I>&gt;<i>      return $fib(10)
</I>&gt;<i> 
</I>&gt;<i> The above doesn't work as is because let-<a title="bindings" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a> in XQuery cannot be
</I>&gt;<i> recursive, and therefore the inline function cannot reference $fib.
</I>&gt;<i> The usual workaround for that is to make the function take itself as
</I>&gt;<i> an argument, i.e.:
</I>&gt;<i> 
</I>&gt;<i>      let $fib := function($fib as ???, $n as xs:integer) {
</I>&gt;<i>         if ($n &lt; 3) then 1 else $fib($n-1) + $fib($n+2)
</I>&gt;<i>      }
</I>&gt;<i>      return $fib($fib, 10)
</I>&gt;<i> 
</I>&gt;<i> But then the problem is with the declared type of the function. So far
</I>&gt;<i> as I can see, there's no way to declare an <a title="XQuery Function Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/xquery_functions.html">XQuery function</a> type that
</I>&gt;<i> references itself in any way. Is that right? It is, of course,
</I>&gt;<i> possible to use item() as the type, and let the implementation do the
</I>&gt;<i> runtime check (or optimize it out), but this isn't very neat...
</I>&gt;<i> 
</I>&gt;<i> I wonder if some way of defining recursive bindings, where the binding
</I>&gt;<i> itself is in the scope of its initializer - specifically for recursive
</I>&gt;<i> functions - has been considered, similar to &quot;let rec&quot; of OCaml? It's
</I>&gt;<i> obvious why this isn't safe to refer to the binding in its initializer
</I>&gt;<i> in the most general case, but the special case of directly binding an
</I>&gt;<i> inline function is both perfectly safe, and should become fairly
</I>&gt;<i> common.
</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>  Recursive functions and function types
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003694.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003694.html" /><updated>2010-01-06T09:39:02Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>I have created bug 8662:

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/Bugs/Public/show_bug.cgi?id=8662


As a side note, I'm personally leaning towards preferring a special
syntax for function to call itself - it just feels like this is what
I'd be using 99% of all time, and for that other 1% there's always the
hack of passing mutual recursive functions as item() arguments to each
other. Rather than having a magic variable name like $this, however, I
would propose having a magic function - I called it &quot;recurse&quot; in bug
description as I couldn't think of anything better, but perhaps
&quot;iterate&quot; or something similar might be more appropriate. The gist is
this:

1) It is only in-scope within function bodies (inline or no).
Referencing it elsewhere is a _static_ error.
2) Where available, it looks like a plain global function in the usual
namespace (http://www.w3.org/2005/<a title="XPath Validator" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">xpath</a>-functions). This means that it
can be called with the usual syntax, but also turned into a function
item using #.
3) Where available, parameter types and return type exactly match
those of the function to which the innermost enclosing body belongs
(inline or no). Again, arity mismatch in a call is a _static_ error
(as it is for any normal function).

So, the original example would look as follows with this syntax:

    function($n as xs:integer) as xs:integer {
        if ($n &lt; 3) then 1 else recurse($n-1) + recurse($n-2)
    }(10)


Thoughts?


On Wed, Jan 6, 2010 at 8:01 AM, John Snelson &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> Pavel,
</I>&gt;<i>
</I>&gt;<i> I think this is something that the <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> Working Group needs to consider
</I>&gt;<i> fixing in the next revision of XQuery 1.1. Please can you raise this as a
</I>&gt;<i> bug against the specification on the W3C bugzilla, to make sure the working
</I>&gt;<i> groups attention is directed to it.
</I>&gt;<i>
</I>&gt;<i> http://www.w3.org/Bugs/Public/
</I>&gt;<i>
</I>&gt;<i> John
</I>&gt;<i>
</I>&gt;<i> Pavel Minaev wrote:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> With the introduction of inline functions and function item type to
</I>&gt;&gt;<i> XQuery 1.1, I hoped that we'll finally get a decent looping construct
</I>&gt;&gt;<i> in form of inline recursive functions; e.g.:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &#160; &#160; let $fib := function($n as xs:integer) {
</I>&gt;&gt;<i> &#160; &#160; &#160; &#160;if ($n &lt; 3) then 1 else $fib($n-1) + $fib($n+2)
</I>&gt;&gt;<i> &#160; &#160; }
</I>&gt;&gt;<i> &#160; &#160; return $fib(10)
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> The above doesn't work as is because let-<a title="bindings" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a> in XQuery cannot be
</I>&gt;&gt;<i> recursive, and therefore the inline function cannot reference $fib.
</I>&gt;&gt;<i> The usual workaround for that is to make the function take itself as
</I>&gt;&gt;<i> an argument, i.e.:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &#160; &#160; let $fib := function($fib as ???, $n as xs:integer) {
</I>&gt;&gt;<i> &#160; &#160; &#160; &#160;if ($n &lt; 3) then 1 else $fib($n-1) + $fib($n+2)
</I>&gt;&gt;<i> &#160; &#160; }
</I>&gt;&gt;<i> &#160; &#160; return $fib($fib, 10)
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> But then the problem is with the declared type of the function. So far
</I>&gt;&gt;<i> as I can see, there's no way to declare an <a title="XQuery Function Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/xquery_functions.html">XQuery function</a> type that
</I>&gt;&gt;<i> references itself in any way. Is that right? It is, of course,
</I>&gt;&gt;<i> possible to use item() as the type, and let the implementation do the
</I>&gt;&gt;<i> runtime check (or optimize it out), but this isn't very neat...
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I wonder if some way of defining recursive bindings, where the binding
</I>&gt;&gt;<i> itself is in the scope of its initializer - specifically for recursive
</I>&gt;&gt;<i> functions - has been considered, similar to &quot;let rec&quot; of OCaml? It's
</I>&gt;&gt;<i> obvious why this isn't safe to refer to the binding in its initializer
</I>&gt;&gt;<i> in the most general case, but the special case of directly binding an
</I>&gt;&gt;<i> inline function is both perfectly safe, and should become fairly
</I>&gt;&gt;<i> common.
</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> John Snelson, Oracle Corporation &#160; &#160; &#160; &#160; &#160; &#160;http://snelson.org.uk/john
</I>&gt;<i> Berkeley DB XML: &#160; &#160; &#160; &#160; &#160; &#160;http://oracle.com/database/berkeley-db/xml
</I>&gt;<i> XQilla: &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;http://xqilla.sourceforge.net
</I>&gt;<i>
</I>
</PRE>
]]></content></entry><entry><title>  comments
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003692.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003692.html" /><updated>2010-01-05T17:04:42Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
&gt;<i> Thanks Ken.  Do you know if this a quirk of the language or is there a
</I>&gt;<i> good reason for it?
</I>
whether the reasoning is good or bad it essentially mirrors the
reasoning on attribute value templates in <a title="xslt" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">xslt</a> (which is the model for
the {..} syntax for expressions in element content anyway, one would
guess).

in xslt 2
&lt;a x=&quot;(:xxxx:)&quot;/&gt;
has an attribute with value (:xxxx:)

&lt;a x=&quot;{(),(:xxxx:)}&quot;/&gt;
has an attribute with value an empty string.

David


</PRE>
]]></content></entry><entry><title>  comments
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003690.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003690.html" /><updated>2010-01-05T16:58:16Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
Everything within curly braces is parsed as <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> code, everything not in
curly braces is literal text. So if you want a comment, put it within curly
braces. However, {(: comment :)} is not valid, because the thing within the
curly braces must be an expression. It would have to be {(: comment :)()}.

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 Andrew Welch
</I>&gt;<i> Sent: 05 January 2010 16:35
</I>&gt;<i> To: xquery-<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discuss</a>
</I>&gt;<i> Subject:  comments
</I>&gt;<i> 
</I>&gt;<i> Hi,
</I>&gt;<i> 
</I>&gt;<i> This xquery:
</I>&gt;<i> 
</I>&gt;<i> &lt;body&gt;
</I>&gt;<i>   (: comment one :)
</I>&gt;<i>   &lt;p&gt;
</I>&gt;<i>   {
</I>&gt;<i>     (: comment two :)
</I>&gt;<i>     1 to 10
</I>&gt;<i>   }
</I>&gt;<i>   &lt;/p&gt;
</I>&gt;<i> &lt;/body&gt;
</I>&gt;<i> 
</I>&gt;<i> produces this result:
</I>&gt;<i> 
</I>&gt;<i> &lt;body&gt;
</I>&gt;<i>   (: comment one :)
</I>&gt;<i>   &lt;p&gt;1 2 3 4 5 6 7 8 9 10&lt;/p&gt;
</I>&gt;<i> &lt;/body&gt;
</I>&gt;<i> 
</I>&gt;<i> The fact that the first comment appears in the output seems 
</I>&gt;<i> odd to me... is that meant to happen, and if so what is the 
</I>&gt;<i> correct way to put a comment there?
</I>&gt;<i> 
</I>&gt;<i> thanks
</I>&gt;<i> andrew
</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>  comments
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003689.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003689.html" /><updated>2010-01-05T16:57:39Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>2010/1/5 G. Ken Holman &lt;http://x-query.com/mailman/listinfo/talk&gt;:
&gt;<i> At 2010-01-05 16:35 +0000, Andrew Welch wrote:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> This <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;&gt;<i>
</I>&gt;&gt;<i> &lt;body&gt;
</I>&gt;&gt;<i> &#160;(: comment one :)
</I>&gt;&gt;<i> &#160;&lt;p&gt;
</I>&gt;&gt;<i> &#160;{
</I>&gt;&gt;<i> &#160; &#160;(: comment two :)
</I>&gt;&gt;<i> &#160; &#160;1 to 10
</I>&gt;&gt;<i> &#160;}
</I>&gt;&gt;<i> &#160;&lt;/p&gt;
</I>&gt;&gt;<i> &lt;/body&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> produces this result:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &lt;body&gt;
</I>&gt;&gt;<i> &#160;(: comment one :)
</I>&gt;&gt;<i> &#160;&lt;p&gt;1 2 3 4 5 6 7 8 9 10&lt;/p&gt;
</I>&gt;&gt;<i> &lt;/body&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> The fact that the first comment appears in the output seems odd to
</I>&gt;&gt;<i> me... is that meant to happen, and if so what is the correct way to
</I>&gt;&gt;<i> put a comment there?
</I>&gt;<i>
</I>&gt;<i> I actually bring this up explicitly in my class:
</I>&gt;<i>
</I>&gt;<i> &#160;{() (: comment one :)}
</I>&gt;<i>
</I>&gt;<i> The comment has to be in an expression evaluation, and the expression cannot
</I>&gt;<i> be the empty string, so when I want to do what you need I use the empty
</I>&gt;<i> sequence expression.
</I>
Thanks Ken.  Do you know if this a quirk of the language or is there a
good reason for it?

</PRE>
]]></content></entry><entry><title>  comments
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003687.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003687.html" /><updated>2010-01-05T16:35:04Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi,

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

&lt;body&gt;
  (: comment one :)
  &lt;p&gt;
  {
    (: comment two :)
    1 to 10
  }
  &lt;/p&gt;
&lt;/body&gt;

produces this result:

&lt;body&gt;
  (: comment one :)
  &lt;p&gt;1 2 3 4 5 6 7 8 9 10&lt;/p&gt;
&lt;/body&gt;

The fact that the first comment appears in the output seems odd to
me... is that meant to happen, and if so what is the correct way to
put a comment there?

thanks
andrew
</PRE>
]]></content></entry><entry><title>  comments
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003691.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003691.html" /><updated>2010-01-05T12:00:38Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>At 2010-01-05 16:57 +0000, Andrew Welch wrote:
&gt;<i>2010/1/5 G. Ken Holman &lt;http://x-query.com/mailman/listinfo/talk&gt;:
</I>&gt;<i> &gt; At 2010-01-05 16:35 +0000, Andrew Welch wrote:
</I>&gt;<i> &gt;&gt; The fact that the first comment appears in the output seems odd to
</I>&gt;<i> &gt;&gt; me... is that meant to happen, and if so what is the correct way to
</I>&gt;<i> &gt;&gt; put a comment there?
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; I actually bring this up explicitly in my class:
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;  {() (: comment one :)}
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; The comment has to be in an expression evaluation, and the 
</I>&gt;<i> expression cannot
</I>&gt;<i> &gt; be the empty string, so when I want to do what you need I use the empty
</I>&gt;<i> &gt; sequence expression.
</I>&gt;<i>
</I>&gt;<i>Thanks Ken.  Do you know if this a quirk of the language or is there a
</I>&gt;<i>good reason for it?
</I>
I wouldn't call it a &quot;quirk&quot; because it simply falls out of the syntax.

You want a comment, and in <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> you cannot use &lt;!-- --&gt; because 
that constructs a comment node.  So you have to have it in an 
expression.  So that leads you to using the brace brackets for 
evaluating an expression, in which you place the comment.  But, the 
comment is removed from the expression evaluation and all that is 
left is the expression to be evaluated, which cannot be the empty string.

So it all makes sense, and I think it is reasonable.  It is just that 
it doesn't come immediately to mind, which is why it is explicitly 
part of my lecture.

I hope this helps.

. . . . . . . . . Ken

--
<a title="UBL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/ubl/index.html">UBL</a> and Code List training:      Copenhagen, Denmark 2010-02-08/10
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>/XQuery/<a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a> training after http://XMLPrague.cz 2010-03-15/19
XSLT/XQuery/XPath training:   San Carlos, California 2010-04-26/30
Vote for your <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>:   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/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>  comments
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003688.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003688.html" /><updated>2010-01-05T11:45:29Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>At 2010-01-05 16:35 +0000, Andrew Welch wrote:
&gt;<i>This <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>
</I>&gt;<i>&lt;body&gt;
</I>&gt;<i>   (: comment one :)
</I>&gt;<i>   &lt;p&gt;
</I>&gt;<i>   {
</I>&gt;<i>     (: comment two :)
</I>&gt;<i>     1 to 10
</I>&gt;<i>   }
</I>&gt;<i>   &lt;/p&gt;
</I>&gt;<i>&lt;/body&gt;
</I>&gt;<i>
</I>&gt;<i>produces this result:
</I>&gt;<i>
</I>&gt;<i>&lt;body&gt;
</I>&gt;<i>   (: comment one :)
</I>&gt;<i>   &lt;p&gt;1 2 3 4 5 6 7 8 9 10&lt;/p&gt;
</I>&gt;<i>&lt;/body&gt;
</I>&gt;<i>
</I>&gt;<i>The fact that the first comment appears in the output seems odd to
</I>&gt;<i>me... is that meant to happen, and if so what is the correct way to
</I>&gt;<i>put a comment there?
</I>
I actually bring this up explicitly in my class:

   {() (: comment one :)}

The comment has to be in an expression evaluation, and the expression 
cannot be the empty string, so when I want to do what you need I use 
the empty sequence expression.

I hope this helps.

. . . . . . . . . . Ken


--
<a title="UBL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/ubl/index.html">UBL</a> and Code List training:      Copenhagen, Denmark 2010-02-08/10
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>/XQuery/<a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a> training after http://XMLPrague.cz 2010-03-15/19
XSLT/XQuery/XPath training:   San Carlos, California 2010-04-26/30
Vote for your <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>:   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/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>  Substring of an attribute.
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003686.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003686.html" /><updated>2010-01-04T08:43:59Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE> 


  _____  

From: Sweta Kedia [mailto:http://x-query.com/mailman/listinfo/talk] 
Sent: 04 January 2010 04:33
To: <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>
Subject: Re:  Substring of an attribute.


Hi,

The Error message I am getting is
 XPTY0004: A sequence of more than one item is not allowed as the first
argument of
  compare() (&quot;&quot;, &quot;&quot;, ...) 
 
Thank you. That tells us exactly what is wrong: there is more than one
$s/loc element, and you can't compare them all at once. However, you haven't
made it clear what output you want, for example in the case where one &lt;loc&gt;
element satisfies the condition and other &lt;loc&gt; elements do not. I can't
tell you how to correct your code because you haven't explained the
requirements clearly.
 
You could replace compare($s/loc[EXP], translate(...))=0 by
$s/loc[EXP]=translate(...) -- that would test whether ANY of the $s/loc
elements satisfies the condition. But I don't know if that's the right logic
for you.
 
Michael Kay
(P.S. You replied off list, I'm sure that was unintentional). 


2010/1/2 Michael Kay &lt;http://x-query.com/mailman/listinfo/talk&gt;


&gt;<i> This query is giving error.
</I> 
Hey, we all enjoy doing puzzles over the holiday. But puzzles are more fun
when you give people clues. Just to make it a bit easier, could you tell us
the error message?
 
Regards,

Michael Kay
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 Sweta Kedia
Sent: 01 January 2010 19:41
To: http://x-query.com/mailman/listinfo/talk
Subject:  Substring of an attribute.


Hello,

I want to take substring from the value of attribute and compare it with
other string.Here is the sample <a title="xml files" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_file_explorer.html">xml files</a> and sample <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> code.

This is first File.


  &lt;bvf:DocumentAndEntityInformationAbstract id=&quot;DIM820&quot;
contextRef=&quot;I2008_AccumulatedOtherComprehensiveIncomeMember&quot; unitRef=&quot;USD&quot;
decimals=&quot;-3&quot;&gt;62582000&lt;/bvf:StockholdersEquityBeforeComprehensiveIncomeNetOf
Tax&gt; 
  &lt;bvf:StockholdersEquityBeforeComprehensiveIncomeNetOfTax id=&quot;DIM830&quot;
contextRef=&quot;I2008&quot; unitRef=&quot;USD&quot;
decimals=&quot;-3&quot;&gt;1038608000&lt;/bvf:StockholdersEquityBeforeComprehensiveIncomeNet
OfTax&gt; 
  &lt;us-gaap:NetIncomeLoss id=&quot;DIM840&quot;
contextRef=&quot;D2008_RetainedEarningsMember&quot; unitRef=&quot;USD&quot;
decimals=&quot;-3&quot;&gt;199904000&lt;/us-gaap:NetIncomeLoss&gt; 
  &lt;us-gaap:NetIncomeLoss id=&quot;DIM850&quot; contextRef=&quot;D2008&quot; unitRef=&quot;USD&quot;
decimals=&quot;-3&quot;&gt;199904000&lt;/us-gaap:NetIncomeLoss&gt; 



This is second File

- &lt;&gt;  &lt;presentationLink
xlink:role=&quot;http://www.biovail.com/2008-12-31/role/DocumentandEntityInformat
ion&quot; xlink:type=&quot;extended&quot;&gt;
  &lt;loc
xlink:href=&quot;http://taxonomies.<a title="XBRL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/xbrl/index.html">xbrl</a>.us/us-gaap/2009/non-gaap/dei-2009-01-31.x
sd#dei_EntityRegistrantName&quot; xlink:label=&quot;EntityRegistrantName&quot;
xlink:type=&quot;locator&quot; /&gt; 
  &lt;loc
xlink:href=&quot;bvf-20081231.<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xsd</a>#bvf_DocumentAndEntityInformationAbstract&quot;
xlink:label=&quot;DocumentAndEntityInformationAbstract&quot; xlink:type=&quot;locator&quot; /&gt; 
  &lt;presentationArc order=&quot;10&quot; use=&quot;optional&quot;
xlink:arcrole=&quot;http://www.xbrl.org/2003/arcrole/parent-child&quot;
xlink:from=&quot;DocumentAndEntityInformationAbstract&quot;
xlink:to=&quot;EntityRegistrantName&quot;
xlink:title=&quot;presentation:DocumentAndEntityInformationAbstract to
EntityRegistrantName&quot; xlink:type=&quot;arc&quot; /&gt;

I am trying to take element name from first file and translating &quot;:&quot; into
&quot;-&quot;. Then i want to take attribute value of &lt;loc&gt; element and take substring
of attribute affter &quot;#&quot; and compare with element name from first file.
If the comparison is equal , I want all the &lt;loc&gt; elements.

This is xquery code:
for $x in
fn:doc(&quot;C:/Users/A/Documents/Sweta/users/sweta231119791251796126671/Other/20
08/Quarterly/2nd Quarterly/bvf-20081231/bvf-20081231.xml&quot;)//*[@contextRef
and @unitRef]
for $s in
fn:doc(&quot;C:/Users/A/Documents/Sweta/users/sweta231119791251796126671/Other/20
08/Quarterly/2nd
Quarterly/bvf-20081231/bvf-20081231_pre.xml&quot;)/linkbase/presentationLink
return
if(compare($s/loc[substring-after(@xlink:href,'#')],translate(name($x),':','
_'))=0)
then $s/loc
else count($s/loc)

 This query is giving error. Please suggest how can i do this.
Thanks

Sweta.






On Wed, Dec 23, 2009 at 1:30 AM, &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:


Send talk mailing list submissions to
       http://x-query.com/mailman/listinfo/talk

To subscribe or unsubscribe via the World Wide Web, visit
       http://x-query.com/mailman/listinfo/talk
or, via email, send a message with subject or body 'help' to
       http://x-query.com/mailman/listinfo/talk

You can reach the person managing the list at
       http://x-query.com/mailman/listinfo/talk

When replying, please edit your Subject line so it is more specific
than &quot;Re: Contents of talk digest...&quot;


Today's Topics:

  1. Follow Up Re:  [ANN] XML Prague 2010 Final Call
     for       Participation (CFP) (James Fuller)


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

Message: 1
Date: Tue, 22 Dec 2009 18:27:49 +0100
From: James Fuller &lt;http://x-query.com/mailman/listinfo/talk&gt;
Subject: Follow Up Re:  [ANN] XML Prague 2010 Final Call
       for     Participation (CFP)
To: Daniela Florescu &lt;http://x-query.com/mailman/listinfo/talk&gt;
Cc: xquery-discuss &lt;http://x-query.com/mailman/listinfo/talk&gt;
Message-ID:
       &lt;http://x-query.com/mailman/listinfo/talk&gt;
Content-Type: text/plain; charset=ISO-8859-2

as promised, here is a more official followup from the University
about speakers presentations and published papers.

* In Czech law copyright is always implicit and remains with the
original author, unless an explicit agreement (Copyright Transfer
Agreement) is signed by the Author. The copyright symbol has no real
meaning in legal terms so it being attached or not means naught.

* as for licensing, If there is no written agreement about license
terms in Czech, authors are always giving non-exclusive rights to
publishers as default setting.

* In last years proceedings you will see the following copyrights asserted

Copyright (c) 2009 Ji&#345;&#237; Kosek, V&#237;t Janota
Copyright (c) 2009 MATFYZPRESS, vydavatelstv&#237; Matematicko-fyzik&#225;ln&#237; fakulty

Copyright of individual articles remains in hands of original authors.

MATFYZPRESS retains copyright only on the cover pages, whilst Mr.
Kosek and Mr. Janota retain copyright on the design and
ordering/layout of the articles. Once again, by czech law, the
copyright symbols themselves mean nothing and all rights would get
asserted based on authorship or separate signed agreements.

hope that clears up any misunderstandings.

regards, Jim Fuller


On Thu, Dec 17, 2009 at 6:56 PM, Daniela Florescu &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> James, Michael,
</I>&gt;<i>
</I>&gt;<i> thanks for your answers.
</I>&gt;<i>
</I>&gt;<i> I think my question wasn't clear.
</I>&gt;<i>
</I>&gt;<i> XML Prague has to take a clear decision about the status of the papers:
</I>&gt;<i> (a) are they part of an informal proceedings (in which case they can be
</I>&gt;<i> submitted
</I>&gt;<i> somewhere else without infringing any copyright and affecting prior
</I>&gt;<i> publication
</I>&gt;<i> status), or (b)  they are part of a copyrighted publication (in which case
</I>&gt;<i> they cannot).
</I>&gt;<i>
</I>&gt;<i> The Web site doesn't say either way, and that causes problems.
</I>&gt;<i> [[ I understand from James's answer that (a) is what is meant to be, but
</I>&gt;<i> it's not clear...]]
</I>&gt;<i> [[ and unfortunately, being published &quot;on the Web&quot; can be interpreted
</I>either
&gt;<i> way...]]
</I>&gt;<i>
</I>&gt;<i> For example, if a student submits a research proposal to XML Prague, and
</I>&gt;<i> sends it
</I>&gt;<i>  in the same time to a copyrighted publication (like Sigmod), then Sigmod
</I>&gt;<i> had serious
</I>&gt;<i> grounds for rejecting the submission because of the lack of clarity of the
</I>&gt;<i> XML Prague
</I>&gt;<i> web site about this issue.
</I>&gt;<i>
</I>&gt;<i> The students I am working with are worried about this.  Copyrights are
</I>&gt;<i> serious business
</I>&gt;<i> in their world.
</I>&gt;<i>
</I>&gt;<i> Thanks, best regards
</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;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> On Dec 17, 2009, at 1:33 AM, Michael Kay wrote:
</I>&gt;<i>
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> here is link to 2007 proceedings
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> http://www.xmlprague.cz/2007/images/xmlprague2007.pdf
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> to give you an idea.
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Having attended and spoken at several past events, but not being in any
</I>&gt;&gt;<i> way
</I>&gt;&gt;<i> involved in the organisation, I would say: concentrate on saying
</I>something
&gt;&gt;<i> that is going to be interesting to the audience, and not commercial;
</I>don't
&gt;&gt;<i> worry too much about the academic criteria of originality or full
</I>&gt;&gt;<i> citations
</I>&gt;&gt;<i> of previous related work. For example, if you were to talk on scripting
</I>in
&gt;&gt;<i> XQuery, present the current state of play, not the delta changes that
</I>have
&gt;&gt;<i> occurred in the three months since your last paper on the subject. No-one
</I>&gt;&gt;<i> except other researchers in your own field wants to hear that kind of
</I>&gt;&gt;<i> paper,
</I>&gt;&gt;<i> and this is not primarily a conference where you are addressing other
</I>&gt;&gt;<i> researchers in your own field.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> It is (or has been in the past) a single-stream conference, which means
</I>&gt;&gt;<i> your
</I>&gt;&gt;<i> audience is less specialized. This also means that because everyone is
</I>&gt;&gt;<i> present at the same talks, speakers get a lot of opportunity to relate
</I>&gt;&gt;<i> their
</I>&gt;&gt;<i> work to other things that have been discussed in the conference, which
</I>&gt;&gt;<i> makes
</I>&gt;&gt;<i> it a more interactive experience.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Michael Kay
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>

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

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

End of talk Digest, Vol 80, Issue 12
************************************




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100104/b25efb35/attachment-0001.htm
</PRE>
]]></content></entry><entry><title>  Substring of an attribute.
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003683.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003683.html" /><updated>2010-01-02T01:10:36Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello,

I want to take substring from the value of attribute and compare it with
other string.Here is the sample <a title="xml files" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_file_explorer.html">xml files</a> and sample <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> code.

This is first File.

   &lt;*bvf:DocumentAndEntityInformationAbstract* id=&quot;*DIM820*&quot; contextRef=&quot;*
I2008_AccumulatedOtherComprehensiveIncomeMember*&quot; unitRef=&quot;*USD*&quot; decimals=&quot;
*-3*&quot;&gt;62582000&lt;/bvf:StockholdersEquityBeforeComprehensiveIncomeNetOfTax&gt;
   &lt;bvf:StockholdersEquityBeforeComprehensiveIncomeNetOfTax
id=&quot;*DIM830*&quot;contextRef
=&quot;*I2008*&quot; unitRef=&quot;*USD*&quot; decimals=&quot;*-3*&quot;&gt;1038608000&lt;/
bvf:StockholdersEquityBeforeComprehensiveIncomeNetOfTax&gt;
   &lt;us-gaap:NetIncomeLoss id=&quot;*DIM840*&quot; contextRef=&quot;*
D2008_RetainedEarningsMember*&quot; unitRef=&quot;*USD*&quot; decimals=&quot;*-3*&quot;&gt;199904000&lt;/
us-gaap:NetIncomeLoss&gt;
   &lt;us-gaap:NetIncomeLoss id=&quot;*DIM850*&quot; contextRef=&quot;*D2008*&quot;
unitRef=&quot;*USD*&quot;decimals
=&quot;*-3*&quot;&gt;199904000&lt;/us-gaap:NetIncomeLoss&gt;



This is second File
- &lt;#&gt; &lt;presentationLink xlink:role=&quot;*
http://www.biovail.com/2008-12-31/role/DocumentandEntityInformation*&quot;xlink:type
=&quot;*extended*&quot;&gt;
   &lt;loc xlink:href=&quot;*
http://taxonomies.<a title="XBRL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/xbrl/index.html">xbrl</a>.us/us-gaap/2009/non-gaap/dei-2009-01-31.<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xsd</a>#dei_EntityRegistrantName
*&quot; xlink:label=&quot;*EntityRegistrantName*&quot; xlink:type=&quot;*locator*&quot; /&gt;
   &lt;loc xlink:href=&quot;*
bvf-20081231.xsd#bvf_DocumentAndEntityInformationAbstract*&quot; xlink:label=&quot;*
DocumentAndEntityInformationAbstract*&quot; xlink:type=&quot;*locator*&quot; /&gt;
   &lt;presentationArc order=&quot;*10*&quot; use=&quot;*optional*&quot; xlink:arcrole=&quot;*
http://www.xbrl.org/2003/arcrole/parent-child*&quot; xlink:from=&quot;*
DocumentAndEntityInformationAbstract*&quot;
xlink:to=&quot;*EntityRegistrantName*&quot;xlink:title
=&quot;*presentation:DocumentAndEntityInformationAbstract to EntityRegistrantName
*&quot; xlink:type=&quot;*arc*&quot; /&gt;

I am trying to take element name from first file and translating &quot;:&quot; into
&quot;-&quot;. Then i want to take attribute value of &lt;loc&gt; element and take substring
of attribute affter &quot;#&quot; and compare with element name from first file.
If the comparison is equal , I want all the &lt;loc&gt; elements.

This is xquery code:
for $x in
fn:doc(&quot;C:/Users/A/Documents/Sweta/users/sweta231119791251796126671/Other/2008/Quarterly/2nd
Quarterly/bvf-20081231/bvf-20081231.xml&quot;)//*[@contextRef and @unitRef]
for $s in
fn:doc(&quot;C:/Users/A/Documents/Sweta/users/sweta231119791251796126671/Other/2008/Quarterly/2nd
Quarterly/bvf-20081231/bvf-20081231_pre.xml&quot;)/linkbase/presentationLink
return
if(compare($s/loc[substring-after(@xlink:href,'#')],translate(name($x),':','_'))=0)
then $s/loc
else count($s/loc)
  T*his query is giving error. Please suggest how can i do this.
Thanks

Sweta.

*



On Wed, Dec 23, 2009 at 1:30 AM, &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:

&gt;<i> Send talk <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing list</a> submissions to
</I>&gt;<i>        http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>&gt;<i> To subscribe or unsubscribe via the World Wide Web, visit
</I>&gt;<i>        http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> or, via email, send a message with subject or body 'help' to
</I>&gt;<i>        http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>&gt;<i> You can reach the person managing the list at
</I>&gt;<i>        http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>&gt;<i> When replying, please edit your Subject line so it is more specific
</I>&gt;<i> than &quot;Re: Contents of talk digest...&quot;
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Today's Topics:
</I>&gt;<i>
</I>&gt;<i>   1. Follow Up Re:  [ANN] XML Prague 2010 Final Call
</I>&gt;<i>      for       Participation (CFP) (James Fuller)
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> ----------------------------------------------------------------------
</I>&gt;<i>
</I>&gt;<i> Message: 1
</I>&gt;<i> Date: Tue, 22 Dec 2009 18:27:49 +0100
</I>&gt;<i> From: James Fuller &lt;http://x-query.com/mailman/listinfo/talk&gt;
</I>&gt;<i> Subject: Follow Up Re:  [ANN] XML Prague 2010 Final Call
</I>&gt;<i>        for     Participation (CFP)
</I>&gt;<i> To: Daniela Florescu &lt;http://x-query.com/mailman/listinfo/talk&gt;
</I>&gt;<i> Cc: xquery-discuss &lt;http://x-query.com/mailman/listinfo/talk&gt;
</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=ISO-8859-2
</I>&gt;<i>
</I>&gt;<i> as promised, here is a more official followup from the University
</I>&gt;<i> about speakers presentations and published papers.
</I>&gt;<i>
</I>&gt;<i> * In Czech law copyright is always implicit and remains with the
</I>&gt;<i> original author, unless an explicit agreement (Copyright Transfer
</I>&gt;<i> Agreement) is signed by the Author. The copyright symbol has no real
</I>&gt;<i> meaning in legal terms so it being attached or not means naught.
</I>&gt;<i>
</I>&gt;<i> * as for licensing, If there is no written agreement about license
</I>&gt;<i> terms in Czech, authors are always giving non-exclusive rights to
</I>&gt;<i> publishers as default setting.
</I>&gt;<i>
</I>&gt;<i> * In last years proceedings you will see the following copyrights asserted
</I>&gt;<i>
</I>&gt;<i> Copyright (c) 2009 Ji&#345;&#237; Kosek, V&#237;t Janota
</I>&gt;<i> Copyright (c) 2009 MATFYZPRESS, vydavatelstv&#237; Matematicko-fyzik&#225;ln&#237; fakulty
</I>&gt;<i>
</I>&gt;<i> Copyright of individual articles remains in hands of original authors.
</I>&gt;<i>
</I>&gt;<i> MATFYZPRESS retains copyright only on the cover pages, whilst Mr.
</I>&gt;<i> Kosek and Mr. Janota retain copyright on the design and
</I>&gt;<i> ordering/layout of the articles. Once again, by czech law, the
</I>&gt;<i> copyright symbols themselves mean nothing and all rights would get
</I>&gt;<i> asserted based on authorship or separate signed agreements.
</I>&gt;<i>
</I>&gt;<i> hope that clears up any misunderstandings.
</I>&gt;<i>
</I>&gt;<i> regards, Jim Fuller
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> On Thu, Dec 17, 2009 at 6:56 PM, Daniela Florescu &lt;http://x-query.com/mailman/listinfo/talk&gt;
</I>&gt;<i> wrote:
</I>&gt;<i> &gt; James, Michael,
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; thanks for your answers.
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; I think my question wasn't clear.
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; XML Prague has to take a clear decision about the status of the papers:
</I>&gt;<i> &gt; (a) are they part of an informal proceedings (in which case they can be
</I>&gt;<i> &gt; submitted
</I>&gt;<i> &gt; somewhere else without infringing any copyright and affecting prior
</I>&gt;<i> &gt; publication
</I>&gt;<i> &gt; status), or (b)  they are part of a copyrighted publication (in which
</I>&gt;<i> case
</I>&gt;<i> &gt; they cannot).
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; The Web site doesn't say either way, and that causes problems.
</I>&gt;<i> &gt; [[ I understand from James's answer that (a) is what is meant to be, but
</I>&gt;<i> &gt; it's not clear...]]
</I>&gt;<i> &gt; [[ and unfortunately, being published &quot;on the Web&quot; can be interpreted
</I>&gt;<i> either
</I>&gt;<i> &gt; way...]]
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; For example, if a student submits a research proposal to XML Prague, and
</I>&gt;<i> &gt; sends it
</I>&gt;<i> &gt;  in the same time to a copyrighted publication (like Sigmod), then Sigmod
</I>&gt;<i> &gt; had serious
</I>&gt;<i> &gt; grounds for rejecting the submission because of the lack of clarity of
</I>&gt;<i> the
</I>&gt;<i> &gt; XML Prague
</I>&gt;<i> &gt; web site about this issue.
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; The students I am working with are worried about this.  Copyrights are
</I>&gt;<i> &gt; serious business
</I>&gt;<i> &gt; in their world.
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Thanks, best regards
</I>&gt;<i> &gt; Dana
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; On Dec 17, 2009, at 1:33 AM, Michael Kay wrote:
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt; here is link to 2007 proceedings
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt; http://www.xmlprague.cz/2007/images/xmlprague2007.pdf
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;&gt; to give you an idea.
</I>&gt;<i> &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; Having attended and spoken at several past events, but not being in any
</I>&gt;<i> &gt;&gt; way
</I>&gt;<i> &gt;&gt; involved in the organisation, I would say: concentrate on saying
</I>&gt;<i> something
</I>&gt;<i> &gt;&gt; that is going to be interesting to the audience, and not commercial;
</I>&gt;<i> don't
</I>&gt;<i> &gt;&gt; worry too much about the academic criteria of originality or full
</I>&gt;<i> &gt;&gt; citations
</I>&gt;<i> &gt;&gt; of previous related work. For example, if you were to talk on scripting
</I>&gt;<i> in
</I>&gt;<i> &gt;&gt; XQuery, present the current state of play, not the delta changes that
</I>&gt;<i> have
</I>&gt;<i> &gt;&gt; occurred in the three months since your last paper on the subject.
</I>&gt;<i> No-one
</I>&gt;<i> &gt;&gt; except other researchers in your own field wants to hear that kind of
</I>&gt;<i> &gt;&gt; paper,
</I>&gt;<i> &gt;&gt; and this is not primarily a conference where you are addressing other
</I>&gt;<i> &gt;&gt; researchers in your own field.
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; It is (or has been in the past) a single-stream conference, which means
</I>&gt;<i> &gt;&gt; your
</I>&gt;<i> &gt;&gt; audience is less specialized. This also means that because everyone is
</I>&gt;<i> &gt;&gt; present at the same talks, speakers get a lot of opportunity to relate
</I>&gt;<i> &gt;&gt; their
</I>&gt;<i> &gt;&gt; work to other things that have been discussed in the conference, which
</I>&gt;<i> &gt;&gt; makes
</I>&gt;<i> &gt;&gt; it a more interactive experience.
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; Michael Kay
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</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>&gt;<i> End of talk Digest, Vol 80, Issue 12
</I>&gt;<i> ************************************
</I>&gt;<i>
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100102/722426cc/attachment.htm
</PRE>
]]></content></entry><entry><title>  Substring of an attribute.
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003685.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003685.html" /><updated>2010-01-02T00:30:24Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> This query is giving error.
</I> 
Hey, we all enjoy doing puzzles over the holiday. But puzzles are more fun
when you give people clues. Just to make it a bit easier, could you tell us
the error message?
 
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 Sweta Kedia
Sent: 01 January 2010 19:41
To: http://x-query.com/mailman/listinfo/talk
Subject:  Substring of an attribute.


Hello,

I want to take substring from the value of attribute and compare it with
other string.Here is the sample <a title="xml files" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_file_explorer.html">xml files</a> and sample <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> code.

This is first File.


  &lt;bvf:DocumentAndEntityInformationAbstract id=&quot;DIM820&quot;
contextRef=&quot;I2008_AccumulatedOtherComprehensiveIncomeMember&quot; unitRef=&quot;USD&quot;
decimals=&quot;-3&quot;&gt;62582000&lt;/bvf:StockholdersEquityBeforeComprehensiveIncomeNetOf
Tax&gt; 
  &lt;bvf:StockholdersEquityBeforeComprehensiveIncomeNetOfTax id=&quot;DIM830&quot;
contextRef=&quot;I2008&quot; unitRef=&quot;USD&quot;
decimals=&quot;-3&quot;&gt;1038608000&lt;/bvf:StockholdersEquityBeforeComprehensiveIncomeNet
OfTax&gt; 
  &lt;us-gaap:NetIncomeLoss id=&quot;DIM840&quot;
contextRef=&quot;D2008_RetainedEarningsMember&quot; unitRef=&quot;USD&quot;
decimals=&quot;-3&quot;&gt;199904000&lt;/us-gaap:NetIncomeLoss&gt; 
  &lt;us-gaap:NetIncomeLoss id=&quot;DIM850&quot; contextRef=&quot;D2008&quot; unitRef=&quot;USD&quot;
decimals=&quot;-3&quot;&gt;199904000&lt;/us-gaap:NetIncomeLoss&gt; 



This is second File

- &lt;presentationLink
xlink:role=&quot;http://www.biovail.com/2008-12-31/role/DocumentandEntityInformat
ion&quot; xlink:type=&quot;extended&quot;&gt;
  &lt;loc
xlink:href=&quot;http://taxonomies.<a title="XBRL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/xbrl/index.html">xbrl</a>.us/us-gaap/2009/non-gaap/dei-2009-01-31.x
sd#dei_EntityRegistrantName&quot; xlink:label=&quot;EntityRegistrantName&quot;
xlink:type=&quot;locator&quot; /&gt; 
  &lt;loc
xlink:href=&quot;bvf-20081231.<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xsd</a>#bvf_DocumentAndEntityInformationAbstract&quot;
xlink:label=&quot;DocumentAndEntityInformationAbstract&quot; xlink:type=&quot;locator&quot; /&gt; 
  &lt;presentationArc order=&quot;10&quot; use=&quot;optional&quot;
xlink:arcrole=&quot;http://www.xbrl.org/2003/arcrole/parent-child&quot;
xlink:from=&quot;DocumentAndEntityInformationAbstract&quot;
xlink:to=&quot;EntityRegistrantName&quot;
xlink:title=&quot;presentation:DocumentAndEntityInformationAbstract to
EntityRegistrantName&quot; xlink:type=&quot;arc&quot; /&gt;

I am trying to take element name from first file and translating &quot;:&quot; into
&quot;-&quot;. Then i want to take attribute value of &lt;loc&gt; element and take substring
of attribute affter &quot;#&quot; and compare with element name from first file.
If the comparison is equal , I want all the &lt;loc&gt; elements.

This is xquery code:
for $x in
fn:doc(&quot;C:/Users/A/Documents/Sweta/users/sweta231119791251796126671/Other/20
08/Quarterly/2nd Quarterly/bvf-20081231/bvf-20081231.xml&quot;)//*[@contextRef
and @unitRef]
for $s in
fn:doc(&quot;C:/Users/A/Documents/Sweta/users/sweta231119791251796126671/Other/20
08/Quarterly/2nd
Quarterly/bvf-20081231/bvf-20081231_pre.xml&quot;)/linkbase/presentationLink
return
if(compare($s/loc[substring-after(@xlink:href,'#')],translate(name($x),':','
_'))=0)
then $s/loc
else count($s/loc)

 This query is giving error. Please suggest how can i do this.
Thanks

Sweta.






On Wed, Dec 23, 2009 at 1:30 AM, &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:


Send talk <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing list</a> submissions to
       http://x-query.com/mailman/listinfo/talk

To subscribe or unsubscribe via the World Wide Web, visit
       http://x-query.com/mailman/listinfo/talk
or, via email, send a message with subject or body 'help' to
       http://x-query.com/mailman/listinfo/talk

You can reach the person managing the list at
       http://x-query.com/mailman/listinfo/talk

When replying, please edit your Subject line so it is more specific
than &quot;Re: Contents of talk digest...&quot;


Today's Topics:

  1. Follow Up Re:  [ANN] XML Prague 2010 Final Call
     for       Participation (CFP) (James Fuller)


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

Message: 1
Date: Tue, 22 Dec 2009 18:27:49 +0100
From: James Fuller &lt;http://x-query.com/mailman/listinfo/talk&gt;
Subject: Follow Up Re:  [ANN] XML Prague 2010 Final Call
       for     Participation (CFP)
To: Daniela Florescu &lt;http://x-query.com/mailman/listinfo/talk&gt;
Cc: xquery-discuss &lt;http://x-query.com/mailman/listinfo/talk&gt;
Message-ID:
       &lt;http://x-query.com/mailman/listinfo/talk&gt;
Content-Type: text/plain; charset=ISO-8859-2

as promised, here is a more official followup from the University
about speakers presentations and published papers.

* In Czech law copyright is always implicit and remains with the
original author, unless an explicit agreement (Copyright Transfer
Agreement) is signed by the Author. The copyright symbol has no real
meaning in legal terms so it being attached or not means naught.

* as for licensing, If there is no written agreement about license
terms in Czech, authors are always giving non-exclusive rights to
publishers as default setting.

* In last years proceedings you will see the following copyrights asserted

Copyright (c) 2009 Ji&#345;&#237; Kosek, V&#237;t Janota
Copyright (c) 2009 MATFYZPRESS, vydavatelstv&#237; Matematicko-fyzik&#225;ln&#237; fakulty

Copyright of individual articles remains in hands of original authors.

MATFYZPRESS retains copyright only on the cover pages, whilst Mr.
Kosek and Mr. Janota retain copyright on the design and
ordering/layout of the articles. Once again, by czech law, the
copyright symbols themselves mean nothing and all rights would get
asserted based on authorship or separate signed agreements.

hope that clears up any misunderstandings.

regards, Jim Fuller


On Thu, Dec 17, 2009 at 6:56 PM, Daniela Florescu &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> James, Michael,
</I>&gt;<i>
</I>&gt;<i> thanks for your answers.
</I>&gt;<i>
</I>&gt;<i> I think my question wasn't clear.
</I>&gt;<i>
</I>&gt;<i> XML Prague has to take a clear decision about the status of the papers:
</I>&gt;<i> (a) are they part of an informal proceedings (in which case they can be
</I>&gt;<i> submitted
</I>&gt;<i> somewhere else without infringing any copyright and affecting prior
</I>&gt;<i> publication
</I>&gt;<i> status), or (b)  they are part of a copyrighted publication (in which case
</I>&gt;<i> they cannot).
</I>&gt;<i>
</I>&gt;<i> The Web site doesn't say either way, and that causes problems.
</I>&gt;<i> [[ I understand from James's answer that (a) is what is meant to be, but
</I>&gt;<i> it's not clear...]]
</I>&gt;<i> [[ and unfortunately, being published &quot;on the Web&quot; can be interpreted
</I>either
&gt;<i> way...]]
</I>&gt;<i>
</I>&gt;<i> For example, if a student submits a research proposal to XML Prague, and
</I>&gt;<i> sends it
</I>&gt;<i>  in the same time to a copyrighted publication (like Sigmod), then Sigmod
</I>&gt;<i> had serious
</I>&gt;<i> grounds for rejecting the submission because of the lack of clarity of the
</I>&gt;<i> XML Prague
</I>&gt;<i> web site about this issue.
</I>&gt;<i>
</I>&gt;<i> The students I am working with are worried about this.  Copyrights are
</I>&gt;<i> serious business
</I>&gt;<i> in their world.
</I>&gt;<i>
</I>&gt;<i> Thanks, best regards
</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;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> On Dec 17, 2009, at 1:33 AM, Michael Kay wrote:
</I>&gt;<i>
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> here is link to 2007 proceedings
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> http://www.xmlprague.cz/2007/images/xmlprague2007.pdf
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> to give you an idea.
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Having attended and spoken at several past events, but not being in any
</I>&gt;&gt;<i> way
</I>&gt;&gt;<i> involved in the organisation, I would say: concentrate on saying
</I>something
&gt;&gt;<i> that is going to be interesting to the audience, and not commercial;
</I>don't
&gt;&gt;<i> worry too much about the academic criteria of originality or full
</I>&gt;&gt;<i> citations
</I>&gt;&gt;<i> of previous related work. For example, if you were to talk on scripting
</I>in
&gt;&gt;<i> XQuery, present the current state of play, not the delta changes that
</I>have
&gt;&gt;<i> occurred in the three months since your last paper on the subject. No-one
</I>&gt;&gt;<i> except other researchers in your own field wants to hear that kind of
</I>&gt;&gt;<i> paper,
</I>&gt;&gt;<i> and this is not primarily a conference where you are addressing other
</I>&gt;&gt;<i> researchers in your own field.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> It is (or has been in the past) a single-stream conference, which means
</I>&gt;&gt;<i> your
</I>&gt;&gt;<i> audience is less specialized. This also means that because everyone is
</I>&gt;&gt;<i> present at the same talks, speakers get a lot of opportunity to relate
</I>&gt;&gt;<i> their
</I>&gt;&gt;<i> work to other things that have been discussed in the conference, which
</I>&gt;&gt;<i> makes
</I>&gt;&gt;<i> it a more interactive experience.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Michael Kay
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>

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

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

End of talk Digest, Vol 80, Issue 12
************************************



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100102/e427d8b0/attachment-0001.htm
</PRE>
]]></content></entry><entry><title>  Substring of an attribute.
   </title><id>http://www.stylusstudio.com/xquerytalk/201001/003684.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/201001/003684.html" /><updated>2010-01-01T17:28:15Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>At 2010-01-02 01:10 +0530, Sweta Kedia wrote:
&gt;<i>I want to take substring from the value of attribute and compare it 
</I>&gt;<i>with other string.Here is the sample <a title="xml files" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_file_explorer.html">xml files</a> and sample <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> code.
</I>
This is what you are asking for:

   substring-after(@xlink:href,'#') eq translate(name($x),':','_')]

&gt;<i>This is first File.
</I>&gt;<i>...
</I>&gt;<i>This is second File
</I>&gt;<i>...
</I>&gt;<i>I am trying to take element name from first file and translating &quot;:&quot; 
</I>&gt;<i>into &quot;-&quot;. Then i want to take attribute value of &lt;loc&gt; element and 
</I>&gt;<i>take substring of attribute affter &quot;#&quot; and compare with element name 
</I>&gt;<i>from first file.
</I>&gt;<i>If the comparison is equal , I want all the &lt;loc&gt; elements.
</I>&gt;<i>
</I>&gt;<i>This is xquery code:
</I>&gt;<i>...
</I>&gt;<i>This query is giving error. Please suggest how can i do this.
</I>
It would really help volunteers to know what the problem is you are 
having.  And to give XML fragments volunteers can use that will work 
with your query.  For example, your query has a reference to an 
element named linkbase which is not in the XML.

But I've tried to recreate your example below ... I hope this helps.

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

T:\ftemp&gt;type bvf-20081231.xml
&lt;bvf:DocumentAndEntityInformationAbstract id=&quot;DIM820&quot; 
contextRef=&quot;I2008_AccumulatedOtherComprehensiveIncomeMember&quot; 
unitRef=&quot;USD&quot; decimals=&quot;-3&quot; xmlns:bvf=&quot;urn:X-bvf&quot; 
xmlns:us-gaap=&quot;urn:X-us-gaap&quot;&gt;62582000
   &lt;bvf:StockholdersEquityBeforeComprehensiveIncomeNetOfTax 
id=&quot;DIM830&quot; contextRef=&quot;I2008&quot; unitRef=&quot;USD&quot; 
decimals=&quot;-3&quot;&gt;1038608000&lt;/bvf:StockholdersEquityBeforeComprehensiveIncomeNetOfTax&gt;
   &lt;us-gaap:NetIncomeLoss id=&quot;DIM840&quot; 
contextRef=&quot;D2008_RetainedEarningsMember&quot; unitRef=&quot;USD&quot; 
decimals=&quot;-3&quot;&gt;199904000&lt;/us-gaap:NetIncomeLoss&gt;
   &lt;us-gaap:NetIncomeLoss id=&quot;DIM850&quot; contextRef=&quot;D2008&quot; 
unitRef=&quot;USD&quot; decimals=&quot;-3&quot;&gt;199904000&lt;/us-gaap:NetIncomeLoss&gt;
&lt;/bvf:DocumentAndEntityInformationAbstract&gt;
T:\ftemp&gt;type bvf-20081231_pre.xml
&lt;presentationLink 
xlink:role=&quot;http://www.biovail.com/2008-12-31/role/DocumentandEntityInformation&quot; 
xlink:type=&quot;extended&quot; xmlns:xlink=&quot;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/1999/xlink&quot;&gt;
   &lt;loc 
xlink:href=&quot;http://taxonomies.<a title="XBRL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/xbrl/index.html">xbrl</a>.us/us-gaap/2009/non-gaap/dei-2009-01-31.<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xsd</a>#dei_EntityRegistrantName&quot; 
xlink:label=&quot;EntityRegistrantName&quot; xlink:type=&quot;locator&quot; /&gt;
   &lt;loc 
xlink:href=&quot;bvf-20081231.xsd#bvf_DocumentAndEntityInformationAbstract&quot; 
xlink:label=&quot;DocumentAndEntityInformationAbstract&quot; xlink:type=&quot;locator&quot; /&gt;
   &lt;presentationArc order=&quot;10&quot; use=&quot;optional&quot; 
xlink:arcrole=&quot;http://www.xbrl.org/2003/arcrole/parent-child&quot; 
xlink:from=&quot;DocumentAndEntityInformationAbstract&quot; 
xlink:to=&quot;EntityRegistrantName&quot; 
xlink:title=&quot;presentation:DocumentAndEntityInformationAbstract to 
EntityRegistrantName&quot; xlink:type=&quot;arc&quot; /&gt;
&lt;/presentationLink&gt;
T:\ftemp&gt;type sweta.xq
declare namespace xlink = &quot;http://www.w3.org/1999/xlink&quot;;
for $x in fn:doc(&quot;bvf-20081231.xml&quot;)//*[@contextRef and @unitRef]
for $s in fn:doc(&quot;bvf-20081231_pre.xml&quot;)//presentationLink
return
   if($s/loc[substring-after(@xlink:href,'#') eq translate(name($x),':','_')])
           then $s/loc
           else count($s/loc)


T:\ftemp&gt;xquery sweta.xq
&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;loc xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;
      xlink:href=&quot;http://taxonomies.xbrl.us/us-gaap/2009/non-gaap/dei-2009-01-31.
xsd#dei_EntityRegistrantName&quot;
      xlink:label=&quot;EntityRegistrantName&quot;
      xlink:type=&quot;locator&quot;/&gt;
&lt;loc xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;
      xlink:href=&quot;bvf-20081231.xsd#bvf_DocumentAndEntityInformationAbstract&quot;
      xlink:label=&quot;DocumentAndEntityInformationAbstract&quot;
      xlink:type=&quot;locator&quot;/&gt;2 2 2
T:\ftemp&gt;


--
UBL and Code List training:      Copenhagen, Denmark 2010-02-08/10
XSLT/XQuery/XPath training after http://XMLPrague.cz 2010-03-15/19
XSLT/XQuery/XPath training:   San Carlos, California 2010-04-26/30
Vote for your XML training:   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> Follow Up Re:  [ANN] XML Prague 2010 Final Call for
	Participation (CFP)
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003682.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003682.html" /><updated>2009-12-23T09:24:36Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Dear James,

thank you for the clarification. This answers my question.

Best  regards, looking forward to an interesting conference in Prague !
Dana



On Dec 22, 2009, at 9:27 AM, James Fuller wrote:

&gt;<i> as promised, here is a more official followup from the University
</I>&gt;<i> about speakers presentations and published papers.
</I>&gt;<i>
</I>&gt;<i> * In Czech law copyright is always implicit and remains with the
</I>&gt;<i> original author, unless an explicit agreement (Copyright Transfer
</I>&gt;<i> Agreement) is signed by the Author. The copyright symbol has no real
</I>&gt;<i> meaning in legal terms so it being attached or not means naught.
</I>&gt;<i>
</I>&gt;<i> * as for <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/buy/">licensing</a>, If there is no written agreement about license
</I>&gt;<i> terms in Czech, authors are always giving non-exclusive rights to
</I>&gt;<i> publishers as default setting.
</I>&gt;<i>
</I>&gt;<i> * In last years proceedings you will see the following copyrights  
</I>&gt;<i> asserted
</I>&gt;<i>
</I>&gt;<i> Copyright (c) 2009 Ji&#345;&#237; Kosek, V&#237;t Janota
</I>&gt;<i> Copyright (c) 2009 MATFYZPRESS, vydavatelstv&#237; Matematicko-fyzik&#225;ln&#237;  
</I>&gt;<i> fakulty
</I>&gt;<i>
</I>&gt;<i> Copyright of individual articles remains in hands of original authors.
</I>&gt;<i>
</I>&gt;<i> MATFYZPRESS retains copyright only on the cover pages, whilst Mr.
</I>&gt;<i> Kosek and Mr. Janota retain copyright on the design and
</I>&gt;<i> ordering/layout of the articles. Once again, by czech law, the
</I>&gt;<i> copyright symbols themselves mean nothing and all rights would get
</I>&gt;<i> asserted based on authorship or separate signed agreements.
</I>&gt;<i>
</I>&gt;<i> hope that clears up any misunderstandings.
</I>&gt;<i>
</I>&gt;<i> regards, Jim Fuller
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> On Thu, Dec 17, 2009 at 6:56 PM, <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> &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
</I>&gt;&gt;<i> James, Michael,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> thanks for your answers.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I think my question wasn't clear.
</I>&gt;&gt;<i>
</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> Prague has to take a clear decision about the status of the  
</I>&gt;&gt;<i> papers:
</I>&gt;&gt;<i> (a) are they part of an informal proceedings (in which case they  
</I>&gt;&gt;<i> can be
</I>&gt;&gt;<i> submitted
</I>&gt;&gt;<i> somewhere else without infringing any copyright and affecting prior
</I>&gt;&gt;<i> publication
</I>&gt;&gt;<i> status), or (b)  they are part of a copyrighted publication (in  
</I>&gt;&gt;<i> which case
</I>&gt;&gt;<i> they cannot).
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> The Web site doesn't say either way, and that causes problems.
</I>&gt;&gt;<i> [[ I understand from James's answer that (a) is what is meant to  
</I>&gt;&gt;<i> be, but
</I>&gt;&gt;<i> it's not clear...]]
</I>&gt;&gt;<i> [[ and unfortunately, being published &quot;on the Web&quot; can be  
</I>&gt;&gt;<i> interpreted either
</I>&gt;&gt;<i> way...]]
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> For example, if a student submits a research proposal to XML  
</I>&gt;&gt;<i> Prague, and
</I>&gt;&gt;<i> sends it
</I>&gt;&gt;<i> in the same time to a copyrighted publication (like Sigmod), then  
</I>&gt;&gt;<i> Sigmod
</I>&gt;&gt;<i> had serious
</I>&gt;&gt;<i> grounds for rejecting the submission because of the lack of clarity  
</I>&gt;&gt;<i> of the
</I>&gt;&gt;<i> XML Prague
</I>&gt;&gt;<i> web site about this issue.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> The students I am working with are worried about this.  Copyrights  
</I>&gt;&gt;<i> are
</I>&gt;&gt;<i> serious business
</I>&gt;&gt;<i> in their world.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Thanks, best regards
</I>&gt;&gt;<i> Dana
</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>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> On Dec 17, 2009, at 1:33 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> wrote:
</I>&gt;&gt;<i>
</I>&gt;&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;&gt;<i> here is link to 2007 proceedings
</I>&gt;&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;&gt;<i> http://www.xmlprague.cz/2007/images/xmlprague2007.pdf
</I>&gt;&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;&gt;<i> to give you an idea.
</I>&gt;&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> Having attended and spoken at several past events, but not being  
</I>&gt;&gt;&gt;<i> in any
</I>&gt;&gt;&gt;<i> way
</I>&gt;&gt;&gt;<i> involved in the organisation, I would say: concentrate on saying  
</I>&gt;&gt;&gt;<i> something
</I>&gt;&gt;&gt;<i> that is going to be interesting to the audience, and not  
</I>&gt;&gt;&gt;<i> commercial; don't
</I>&gt;&gt;&gt;<i> worry too much about the academic criteria of originality or full
</I>&gt;&gt;&gt;<i> citations
</I>&gt;&gt;&gt;<i> of previous related work. For example, if you were to talk on  
</I>&gt;&gt;&gt;<i> scripting in
</I>&gt;&gt;&gt;<i> XQuery, present the current state of play, not the delta changes  
</I>&gt;&gt;&gt;<i> that have
</I>&gt;&gt;&gt;<i> occurred in the three months since your last paper on the subject.  
</I>&gt;&gt;&gt;<i> No-one
</I>&gt;&gt;&gt;<i> except other researchers in your own field wants to hear that kind  
</I>&gt;&gt;&gt;<i> of
</I>&gt;&gt;&gt;<i> paper,
</I>&gt;&gt;&gt;<i> and this is not primarily a conference where you are addressing  
</I>&gt;&gt;&gt;<i> other
</I>&gt;&gt;&gt;<i> researchers in your own field.
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> It is (or has been in the past) a single-stream conference, which  
</I>&gt;&gt;&gt;<i> means
</I>&gt;&gt;&gt;<i> your
</I>&gt;&gt;&gt;<i> audience is less specialized. This also means that because  
</I>&gt;&gt;&gt;<i> everyone is
</I>&gt;&gt;&gt;<i> present at the same talks, speakers get a lot of opportunity to  
</I>&gt;&gt;&gt;<i> relate
</I>&gt;&gt;&gt;<i> their
</I>&gt;&gt;&gt;<i> work to other things that have been discussed in the conference,  
</I>&gt;&gt;&gt;<i> which
</I>&gt;&gt;&gt;<i> makes
</I>&gt;&gt;&gt;<i> it a more interactive experience.
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> Michael Kay
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i>
</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>

</PRE>
]]></content></entry><entry><title> Follow Up Re:  [ANN] XML Prague 2010 Final Call for 
	Participation (CFP)
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003681.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003681.html" /><updated>2009-12-22T18:27:49Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>as promised, here is a more official followup from the University
about speakers presentations and published papers.

* In Czech law copyright is always implicit and remains with the
original author, unless an explicit agreement (Copyright Transfer
Agreement) is signed by the Author. The copyright symbol has no real
meaning in legal terms so it being attached or not means naught.

* as for <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/buy/">licensing</a>, If there is no written agreement about license
terms in Czech, authors are always giving non-exclusive rights to
publishers as default setting.

* In last years proceedings you will see the following copyrights asserted

Copyright (c) 2009 Ji&#345;&#237; Kosek, V&#237;t Janota
Copyright (c) 2009 MATFYZPRESS, vydavatelstv&#237; Matematicko-fyzik&#225;ln&#237; fakulty

Copyright of individual articles remains in hands of original authors.

MATFYZPRESS retains copyright only on the cover pages, whilst Mr.
Kosek and Mr. Janota retain copyright on the design and
ordering/layout of the articles. Once again, by czech law, the
copyright symbols themselves mean nothing and all rights would get
asserted based on authorship or separate signed agreements.

hope that clears up any misunderstandings.

regards, Jim Fuller


On Thu, Dec 17, 2009 at 6:56 PM, <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; wrote:
&gt;<i> James, Michael,
</I>&gt;<i>
</I>&gt;<i> thanks for your answers.
</I>&gt;<i>
</I>&gt;<i> I think my question wasn't clear.
</I>&gt;<i>
</I>&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> Prague has to take a clear decision about the status of the papers:
</I>&gt;<i> (a) are they part of an informal proceedings (in which case they can be
</I>&gt;<i> submitted
</I>&gt;<i> somewhere else without infringing any copyright and affecting prior
</I>&gt;<i> publication
</I>&gt;<i> status), or (b)  they are part of a copyrighted publication (in which case
</I>&gt;<i> they cannot).
</I>&gt;<i>
</I>&gt;<i> The Web site doesn't say either way, and that causes problems.
</I>&gt;<i> [[ I understand from James's answer that (a) is what is meant to be, but
</I>&gt;<i> it's not clear...]]
</I>&gt;<i> [[ and unfortunately, being published &quot;on the Web&quot; can be interpreted either
</I>&gt;<i> way...]]
</I>&gt;<i>
</I>&gt;<i> For example, if a student submits a research proposal to XML Prague, and
</I>&gt;<i> sends it
</I>&gt;<i>  in the same time to a copyrighted publication (like Sigmod), then Sigmod
</I>&gt;<i> had serious
</I>&gt;<i> grounds for rejecting the submission because of the lack of clarity of the
</I>&gt;<i> XML Prague
</I>&gt;<i> web site about this issue.
</I>&gt;<i>
</I>&gt;<i> The students I am working with are worried about this.  Copyrights are
</I>&gt;<i> serious business
</I>&gt;<i> in their world.
</I>&gt;<i>
</I>&gt;<i> Thanks, best regards
</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;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> On Dec 17, 2009, at 1:33 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> wrote:
</I>&gt;<i>
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> here is link to 2007 proceedings
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> http://www.xmlprague.cz/2007/images/xmlprague2007.pdf
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> to give you an idea.
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Having attended and spoken at several past events, but not being in any
</I>&gt;&gt;<i> way
</I>&gt;&gt;<i> involved in the organisation, I would say: concentrate on saying something
</I>&gt;&gt;<i> that is going to be interesting to the audience, and not commercial; don't
</I>&gt;&gt;<i> worry too much about the <a title="academic" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/academic_pricing.html">academic</a> criteria of originality or full
</I>&gt;&gt;<i> citations
</I>&gt;&gt;<i> of previous related work. For example, if you were to talk on scripting in
</I>&gt;&gt;<i> XQuery, present the current state of play, not the delta changes that have
</I>&gt;&gt;<i> occurred in the three months since your last paper on the subject. No-one
</I>&gt;&gt;<i> except other researchers in your own field wants to hear that kind of
</I>&gt;&gt;<i> paper,
</I>&gt;&gt;<i> and this is not primarily a conference where you are addressing other
</I>&gt;&gt;<i> researchers in your own field.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> It is (or has been in the past) a single-stream conference, which means
</I>&gt;&gt;<i> your
</I>&gt;&gt;<i> audience is less specialized. This also means that because everyone is
</I>&gt;&gt;<i> present at the same talks, speakers get a lot of opportunity to relate
</I>&gt;&gt;<i> their
</I>&gt;&gt;<i> work to other things that have been discussed in the conference, which
</I>&gt;&gt;<i> makes
</I>&gt;&gt;<i> it a more interactive experience.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Michael Kay
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>
</PRE>
]]></content></entry><entry><title>  [ANN] XML Prague 2010 Final Call for Participation 
	(CFP)
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003680.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003680.html" /><updated>2009-12-18T20:48:58Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Thu, Dec 17, 2009 at 6:56 PM, <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; wrote:
&gt;<i> James, Michael,
</I>&gt;<i>
</I>&gt;<i> thanks for your answers.
</I>&gt;<i>
</I>&gt;<i> I think my question wasn't clear.
</I>
let me try to be clear and respond in an official capacity.

&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> Prague has to take a clear decision about the status of the papers:
</I>&gt;<i> (a) are they part of an informal proceedings (in which case they can be
</I>&gt;<i> submitted
</I>&gt;<i> somewhere else without infringing any copyright and affecting prior
</I>&gt;<i> publication
</I>&gt;<i> status), or (b) &#160;they are part of a copyrighted publication (in which case
</I>&gt;<i> they cannot).
</I>
the answer to this is a) ... with all the usual caveats (e.g. that the
pub does not invalidate someone else's copyright, which is the Authors
responsibility).

&gt;<i> The Web site doesn't say either way, and that causes problems.
</I>&gt;<i> [[ I understand from James's answer that (a) is what is meant to be, but
</I>&gt;<i> it's not clear...]]
</I>
its a)

&gt;<i> [[ and unfortunately, being published &quot;on the Web&quot; can be interpreted either
</I>&gt;<i> way...]]
</I>
XML Prague is affiliated with Charles University/ITI and takes such
questions seriously so I will also get an official statement repeating
what I have said directly from the University (and the <a title="press" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_news.html">press</a> that
publishes the proceedings) to confirm and amend the website
accordingly.

Previous proceedings were less clear then they could have been, thank
you for pointing this out and know that next years will be crystal
clear on this point.

Jim Fuller
on behalf of the XML Prague Committee

</PRE>
]]></content></entry><entry><title>  adding elements
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003679.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003679.html" /><updated>2009-12-18T12:16:20Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi Jens,

as an alternative <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">to using XSLT</a> or <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> Update, my <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> XQuery
solution would be to create a recursive filter function with a
typeswitch statement. Tested with <a title="saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">saxon</a>:

declare namespace dc=&quot;http://purl.org/dc/elements/1.1/&quot;;

declare variable $<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> :=
    &lt;object id=&quot;O33051&quot;&gt;
        &lt;view id=&quot;V33052&quot;&gt;
            &lt;original filename=&quot;374.jpg&quot;
hash=&quot;a72ff5300a4e5cba7c6d58d581f7c220&quot;/&gt;
            &lt;img height=&quot;141&quot; src=&quot;img/V33052.original&quot; use=&quot;pict&quot; width=&quot;213&quot;/&gt;
            &lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;
                 xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;&gt;
                &lt;rdf:Description

rdf:about=&quot;<A HREF="petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor_2.0-Service/P67/V33052&quot;">petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor_2.0-Service/P67/V33052&quot;</A>
                    xml:lang=&quot;en&quot;&gt;
                    &lt;dc:title&gt;da&#7747;tahastavin&#257;yaka&lt;/dc:title&gt;
                    &lt;dc:source/&gt;
                &lt;/rdf:Description&gt;
            &lt;/rdf:RDF&gt;
        &lt;/view&gt;
    &lt;/object&gt;;

declare function local:modify($title as element(dc:title)) {
    &lt;dc:title xml:lang=&quot;xx&quot;&gt;{$title/text()}&lt;/dc:title&gt;
};

declare function local:filter($node as node()) {
    typeswitch ($node)
        case element(dc:title) return
            ($node, local:modify($node))
        case element() return
            element { node-name($node) } { $node/@*, for $child in
$node/node() return local:filter($child) }
        default return
            $node
};

local:filter($xml)

Wolfgang

</PRE>
]]></content></entry><entry><title>  adding elements
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003677.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003677.html" /><updated>2009-12-18T11:30:07Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello! I am an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> newbie - please bear over with me (for a while, at least)!

Some of the elements in my file I want to duplicate in order to make some character substitutions in the duplicate (the original element contents uses diacritica and in the duplicated one the diacritica is dissolved). I can easily extract the elements 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> their contents, but how do I insert into the parent element? There are functions for adding and deleting attributes and one can &quot;except&quot; an element, but how does one add one?

What I have is something like this:

&lt;object id=&quot;O33051&quot;&gt;
        &lt;view id=&quot;V33052&quot;&gt;
            &lt;original filename=&quot;374.jpg&quot; hash=&quot;a72ff5300a4e5cba7c6d58d581f7c220&quot;/&gt;
            &lt;img height=&quot;141&quot; src=&quot;img/V33052.original&quot; use=&quot;pict&quot; width=&quot;213&quot;/&gt;
            &lt;rdf:RDF&gt;
                &lt;rdf:Description
                    rdf:about=&quot;<A HREF="petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor_2.0-Service/P67/V33052&quot;">petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor_2.0-Service/P67/V33052&quot;</A>
                    <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;&gt;
                    &lt;dc:title&gt;da&#7747;tahastavin&#257;yaka&lt;/dc:title&gt;
                    &lt;dc:source/&gt;
                    &lt;HIBase:annotation/&gt;
                &lt;/rdf:Description&gt;
            &lt;/rdf:RDF&gt;
        &lt;/view&gt;
    &lt;/object&gt;

and I want to get something like this (note the two &lt;dc:title&gt;, the added one with an extra attribute):

&lt;object id=&quot;O33051&quot;&gt;
        &lt;view id=&quot;V33052&quot;&gt;
            &lt;original filename=&quot;374.jpg&quot; hash=&quot;a72ff5300a4e5cba7c6d58d581f7c220&quot;/&gt;
            &lt;img height=&quot;141&quot; src=&quot;img/V33052.original&quot; use=&quot;pict&quot; width=&quot;213&quot;/&gt;
            &lt;rdf:RDF&gt;
                &lt;rdf:Description
                    rdf:about=&quot;<A HREF="petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor_2.0-Service/P67/V33052&quot;">petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor_2.0-Service/P67/V33052&quot;</A>
                    xml:lang=&quot;en&quot;&gt;
                    &lt;dc:title&gt;da&#7747;tahastavin&#257;yaka&lt;/dc:title&gt;
                    &lt;dc:title xml:lang=&quot;xx&quot;&gt;damtahastavinayaka&lt;/dc:title&gt;
                    &lt;dc:source/&gt;
                    &lt;HIBase:annotation/&gt;
                &lt;/rdf:Description&gt;
            &lt;/rdf:RDF&gt;
        &lt;/view&gt;
&lt;/object&gt;

but all I manage to get is something like this:

&lt;object id=&quot;O33051&quot;&gt;
        &lt;view id=&quot;V33052&quot;&gt;
            &lt;original filename=&quot;374.jpg&quot; hash=&quot;a72ff5300a4e5cba7c6d58d581f7c220&quot;/&gt;
            &lt;img height=&quot;141&quot; src=&quot;img/V33052.original&quot; use=&quot;pict&quot; width=&quot;213&quot;/&gt;
            &lt;rdf:RDF&gt;
                &lt;rdf:Description
                    rdf:about=&quot;<A HREF="petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor_2.0-Service/P67/V33052&quot;">petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor_2.0-Service/P67/V33052&quot;</A>
                    xml:lang=&quot;en&quot;&gt;
                    &lt;dc:title&gt;da&#7747;tahastavin&#257;yaka&lt;/dc:title&gt;
                    &lt;dc:source/&gt;
                    &lt;HIBase:annotation/&gt;
                &lt;/rdf:Description&gt;
            &lt;/rdf:RDF&gt;
        &lt;/view&gt;
&lt;/object&gt;
&lt;object id=&quot;O33051&quot;&gt;
        &lt;view id=&quot;V33052&quot;&gt;
            &lt;rdf:RDF&gt;
                &lt;rdf:Description
                    rdf:about=&quot;<A HREF="petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor_2.0-Service/P67/V33052&quot;">petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor_2.0-Service/P67/V33052&quot;</A>
                    xml:lang=&quot;en&quot;&gt;
                    &lt;dc:title xml:lang=&quot;xx&quot;&gt;damtahastavinayaka&lt;/dc:title&gt;
                &lt;/rdf:Description&gt;
            &lt;/rdf:RDF&gt;
        &lt;/view&gt;
 &lt;/object&gt;

Does my question make sense? And is there a way to do this?

The files are from the XML output of HyperImage &lt;http://www.uni-lueneburg.de/hyperimage/hyperimage/&gt;.

Best,

Jens &#216;stergaard Petersen
University of Heidelberg
</PRE>
]]></content></entry><entry><title>  adding elements
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003678.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003678.html" /><updated>2009-12-18T10:53:32Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
Transformations that involve making a small change to an existing document are best handled either with <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>, or using <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> Update. It can be done in XQuery, but it's a lot of work in comparison with the other approaches. So the first thing is to establish whether this really has to be an XQuery solution.

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 Jens 
</I>&gt;<i> &#216;stergaard Petersen
</I>&gt;<i> Sent: 18 December 2009 10:30
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject:  adding elements
</I>&gt;<i> 
</I>&gt;<i> Hello! I am an xquery newbie - please bear over with me (for 
</I>&gt;<i> a while, at least)!
</I>&gt;<i> 
</I>&gt;<i> Some of the elements in my file I want to duplicate in order 
</I>&gt;<i> to make some character substitutions in the duplicate (the 
</I>&gt;<i> original element contents uses diacritica and in the 
</I>&gt;<i> duplicated one the diacritica is dissolved). I can easily 
</I>&gt;<i> extract the elements 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> their contents, but how do I 
</I>&gt;<i> insert into the parent element? There are functions for 
</I>&gt;<i> adding and deleting attributes and one can &quot;except&quot; an 
</I>&gt;<i> element, but how does one add one?
</I>&gt;<i> 
</I>&gt;<i> What I have is something like this:
</I>&gt;<i> 
</I>&gt;<i> &lt;object id=&quot;O33051&quot;&gt;
</I>&gt;<i>         &lt;view id=&quot;V33052&quot;&gt;
</I>&gt;<i>             &lt;original filename=&quot;374.jpg&quot; 
</I>&gt;<i> hash=&quot;a72ff5300a4e5cba7c6d58d581f7c220&quot;/&gt;
</I>&gt;<i>             &lt;img height=&quot;141&quot; src=&quot;img/V33052.original&quot; 
</I>&gt;<i> use=&quot;pict&quot; width=&quot;213&quot;/&gt;
</I>&gt;<i>             &lt;rdf:RDF&gt;
</I>&gt;<i>                 &lt;rdf:Description
</I>&gt;<i>                     
</I>&gt;<i> rdf:about=&quot;<A HREF="petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor">petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor</A>
</I>&gt;<i> _2.0-Service/P67/V33052&quot;
</I>&gt;<i>                     <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;&gt;
</I>&gt;<i>                     &lt;dc:title&gt;da&#7747;tahastavin&#257;yaka&lt;/dc:title&gt;
</I>&gt;<i>                     &lt;dc:source/&gt;
</I>&gt;<i>                     &lt;HIBase:annotation/&gt;
</I>&gt;<i>                 &lt;/rdf:Description&gt;
</I>&gt;<i>             &lt;/rdf:RDF&gt;
</I>&gt;<i>         &lt;/view&gt;
</I>&gt;<i>     &lt;/object&gt;
</I>&gt;<i> 
</I>&gt;<i> and I want to get something like this (note the two 
</I>&gt;<i> &lt;dc:title&gt;, the added one with an extra attribute):
</I>&gt;<i> 
</I>&gt;<i> &lt;object id=&quot;O33051&quot;&gt;
</I>&gt;<i>         &lt;view id=&quot;V33052&quot;&gt;
</I>&gt;<i>             &lt;original filename=&quot;374.jpg&quot; 
</I>&gt;<i> hash=&quot;a72ff5300a4e5cba7c6d58d581f7c220&quot;/&gt;
</I>&gt;<i>             &lt;img height=&quot;141&quot; src=&quot;img/V33052.original&quot; 
</I>&gt;<i> use=&quot;pict&quot; width=&quot;213&quot;/&gt;
</I>&gt;<i>             &lt;rdf:RDF&gt;
</I>&gt;<i>                 &lt;rdf:Description
</I>&gt;<i>                     
</I>&gt;<i> rdf:about=&quot;<A HREF="petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor">petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor</A>
</I>&gt;<i> _2.0-Service/P67/V33052&quot;
</I>&gt;<i>                     xml:lang=&quot;en&quot;&gt;
</I>&gt;<i>                     &lt;dc:title&gt;da&#7747;tahastavin&#257;yaka&lt;/dc:title&gt;
</I>&gt;<i>                     &lt;dc:title 
</I>&gt;<i> xml:lang=&quot;xx&quot;&gt;damtahastavinayaka&lt;/dc:title&gt;
</I>&gt;<i>                     &lt;dc:source/&gt;
</I>&gt;<i>                     &lt;HIBase:annotation/&gt;
</I>&gt;<i>                 &lt;/rdf:Description&gt;
</I>&gt;<i>             &lt;/rdf:RDF&gt;
</I>&gt;<i>         &lt;/view&gt;
</I>&gt;<i> &lt;/object&gt;
</I>&gt;<i> 
</I>&gt;<i> but all I manage to get is something like this:
</I>&gt;<i> 
</I>&gt;<i> &lt;object id=&quot;O33051&quot;&gt;
</I>&gt;<i>         &lt;view id=&quot;V33052&quot;&gt;
</I>&gt;<i>             &lt;original filename=&quot;374.jpg&quot; 
</I>&gt;<i> hash=&quot;a72ff5300a4e5cba7c6d58d581f7c220&quot;/&gt;
</I>&gt;<i>             &lt;img height=&quot;141&quot; src=&quot;img/V33052.original&quot; 
</I>&gt;<i> use=&quot;pict&quot; width=&quot;213&quot;/&gt;
</I>&gt;<i>             &lt;rdf:RDF&gt;
</I>&gt;<i>                 &lt;rdf:Description
</I>&gt;<i>                     
</I>&gt;<i> rdf:about=&quot;<A HREF="petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor">petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor</A>
</I>&gt;<i> _2.0-Service/P67/V33052&quot;
</I>&gt;<i>                     xml:lang=&quot;en&quot;&gt;
</I>&gt;<i>                     &lt;dc:title&gt;da&#7747;tahastavin&#257;yaka&lt;/dc:title&gt;
</I>&gt;<i>                     &lt;dc:source/&gt;
</I>&gt;<i>                     &lt;HIBase:annotation/&gt;
</I>&gt;<i>                 &lt;/rdf:Description&gt;
</I>&gt;<i>             &lt;/rdf:RDF&gt;
</I>&gt;<i>         &lt;/view&gt;
</I>&gt;<i> &lt;/object&gt;
</I>&gt;<i> &lt;object id=&quot;O33051&quot;&gt;
</I>&gt;<i>         &lt;view id=&quot;V33052&quot;&gt;
</I>&gt;<i>             &lt;rdf:RDF&gt;
</I>&gt;<i>                 &lt;rdf:Description
</I>&gt;<i>                     
</I>&gt;<i> rdf:about=&quot;<A HREF="petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor">petal://kjc-fs2.kjc.uni-heidelberg.de:8081/HIEditor</A>
</I>&gt;<i> _2.0-Service/P67/V33052&quot;
</I>&gt;<i>                     xml:lang=&quot;en&quot;&gt;
</I>&gt;<i>                     &lt;dc:title 
</I>&gt;<i> xml:lang=&quot;xx&quot;&gt;damtahastavinayaka&lt;/dc:title&gt;
</I>&gt;<i>                 &lt;/rdf:Description&gt;
</I>&gt;<i>             &lt;/rdf:RDF&gt;
</I>&gt;<i>         &lt;/view&gt;
</I>&gt;<i>  &lt;/object&gt;
</I>&gt;<i> 
</I>&gt;<i> Does my question make sense? And is there a way to do this?
</I>&gt;<i> 
</I>&gt;<i> The files are from the XML output of HyperImage 
</I>&gt;<i> &lt;http://www.uni-lueneburg.de/hyperimage/hyperimage/&gt;.
</I>&gt;<i> 
</I>&gt;<i> Best,
</I>&gt;<i> 
</I>&gt;<i> Jens &#216;stergaard Petersen
</I>&gt;<i> University of Heidelberg
</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] XML Prague 2010 Final Call for Participation
	(CFP)
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003676.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003676.html" /><updated>2009-12-17T09:56:07Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>James, Michael,

thanks for your answers.

I think my question wasn't clear.

<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> Prague has to take a clear decision about the status of the papers:
(a) are they part of an informal proceedings (in which case they can  
be submitted
somewhere else without infringing any copyright and affecting prior  
publication
status), or (b)  they are part of a copyrighted publication (in which  
case they cannot).

The Web site doesn't say either way, and that causes problems.
[[ I understand from James's answer that (a) is what is meant to be,  
but it's not clear...]]
[[ and unfortunately, being published &quot;on the Web&quot; can be interpreted  
either way...]]

For example, if a student submits a research proposal to XML Prague,  
and sends it
  in the same time to a copyrighted publication (like Sigmod), then  
Sigmod had serious
grounds for rejecting the submission because of the lack of clarity of  
the XML Prague
web site about this issue.

The students I am working with are worried about this.  Copyrights are  
serious business
in their world.

Thanks, best regards
Dana












On Dec 17, 2009, at 1:33 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> wrote:

&gt;&gt;<i>
</I>&gt;&gt;<i> here is link to 2007 proceedings
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> http://www.xmlprague.cz/2007/images/xmlprague2007.pdf
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> to give you an idea.
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i> Having attended and spoken at several past events, but not being in  
</I>&gt;<i> any way
</I>&gt;<i> involved in the organisation, I would say: concentrate on saying  
</I>&gt;<i> something
</I>&gt;<i> that is going to be interesting to the audience, and not commercial;  
</I>&gt;<i> don't
</I>&gt;<i> worry too much about the <a title="academic" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/academic_pricing.html">academic</a> criteria of originality or full  
</I>&gt;<i> citations
</I>&gt;<i> of previous related work. For example, if you were to talk on  
</I>&gt;<i> scripting 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>, present the current state of play, not the delta changes  
</I>&gt;<i> that have
</I>&gt;<i> occurred in the three months since your last paper on the subject.  
</I>&gt;<i> No-one
</I>&gt;<i> except other researchers in your own field wants to hear that kind  
</I>&gt;<i> of paper,
</I>&gt;<i> and this is not primarily a conference where you are addressing other
</I>&gt;<i> researchers in your own field.
</I>&gt;<i>
</I>&gt;<i> It is (or has been in the past) a single-stream conference, which  
</I>&gt;<i> means your
</I>&gt;<i> audience is less specialized. This also means that because everyone is
</I>&gt;<i> present at the same talks, speakers get a lot of opportunity to  
</I>&gt;<i> relate their
</I>&gt;<i> work to other things that have been discussed in the conference,  
</I>&gt;<i> which makes
</I>&gt;<i> it a more interactive experience.
</I>&gt;<i>
</I>&gt;<i> Michael Kay
</I>&gt;<i>
</I>&gt;<i>
</I>
</PRE>
]]></content></entry><entry><title>  [ANN] XML Prague 2010 Final Call for Participation
	(CFP)
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003675.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003675.html" /><updated>2009-12-17T09:33:15Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> 
</I>&gt;<i> here is link to 2007 proceedings
</I>&gt;<i> 
</I>&gt;<i> http://www.xmlprague.cz/2007/images/xmlprague2007.pdf
</I>&gt;<i> 
</I>&gt;<i> to give you an idea.
</I>&gt;<i> 
</I>
Having attended and spoken at several past events, but not being in any way
involved in the organisation, I would say: concentrate on saying something
that is going to be interesting to the audience, and not commercial; don't
worry too much about the <a title="academic" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/academic_pricing.html">academic</a> criteria of originality or full citations
of previous related work. For example, if you were to talk on scripting in
<a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>, present the current state of play, not the delta changes that have
occurred in the three months since your last paper on the subject. No-one
except other researchers in your own field wants to hear that kind of paper,
and this is not primarily a conference where you are addressing other
researchers in your own field.

It is (or has been in the past) a single-stream conference, which means your
audience is less specialized. This also means that because everyone is
present at the same talks, speakers get a lot of opportunity to relate their
work to other things that have been discussed in the conference, which makes
it a more interactive experience.

<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>


</PRE>
]]></content></entry><entry><title>  [ANN] XML Prague 2010 Final Call for Participation 
	(CFP)
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003674.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003674.html" /><updated>2009-12-17T08:46:24Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>here is link to 2007 proceedings

http://www.xmlprague.cz/2007/images/xmlprague2007.pdf

to give you an idea.

Jim Fuller
</PRE>
]]></content></entry><entry><title>  [ANN] XML Prague 2010 Final Call for Participation 
	(CFP)
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003673.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003673.html" /><updated>2009-12-17T08:44:24Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Wed, Dec 16, 2009 at 11:24 PM, <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; wrote:
&gt;<i> James,
</I>&gt;<i>
</I>&gt;<i> the conference web site says very little (close to nothing) about the fate
</I>&gt;<i> of the submissions,
</I>&gt;<i> which makes it difficult to contribute to.
</I>
good point we will amend the site

&gt;<i> For example, how are the papers considered: are they considered publications
</I>&gt;<i> ?
</I>
ITI  (Charlies University) publishes the proceedings by their internal
pub ... I can send you pdf of last years (send me direct email)) in a
pdf

&gt;<i> are double submissions accepted ? can they resubmit their results somewhere
</I>&gt;<i> else after that ?
</I>
sure double submissions are fine and you are free to resubmit elsewhere ....

&gt;<i> It would be important to know the answer to such questions, especially for
</I>&gt;<i> students
</I>&gt;<i> and their research contributions.
</I>
pls feel free to contact me if you have any further questions.

Jim Fuller
</PRE>
]]></content></entry><entry><title>  XQuery functions returning multiple element types
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003671.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003671.html" /><updated>2009-12-16T19:20:28Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> 
</I>&gt;<i> I'm trying to declare a function that can return 2 element 
</I>&gt;<i> types but with no success.  Maybe its not possible.
</I>
If foo and bar are sufficiently related to be alternative results of the
function, then perhaps they should be members of a substitution group, in
which case you can say $root as <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a>-element(s) where s is the name of the
substitution group.

This becomes easier in XSD 1.1 where elements can belong to more than one
substitution group.
&gt;<i> 
</I>&gt;<i> What I'd like to do is something like this  (simplified)
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i> declare function  search( $root as element(root) )  as 
</I>&gt;<i> element(foo|bar)* {
</I>
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>  XQuery functions returning multiple element types
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003669.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003669.html" /><updated>2009-12-16T18:31:07Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>David A. Lee wrote:

&gt;<i> declare function&#160; search( $root as element(root)
</I>&gt;<i> )&#160; as element(foo|bar)*
</I>
  Yes, that would be interesting, but that's not possible.  See the production <a title="SequenceType" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">SequenceType</a> in the spec.

  Regards,

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






















      


</PRE>
]]></content></entry><entry><title>  Recursive functions and function types
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003664.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003664.html" /><updated>2009-12-16T17:50:49Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>* David A. Lee wrote:
&gt;<i>This is a bizzare thought and ugly but how about
</I>&gt;<i>
</I>&gt;<i>let $fib :=
</I>&gt;<i>      function($func ,  $n as xs:integer) as xs:integer {
</I>&gt;<i>          if ($n&lt;  3) then 1 else $func($n-1) + $func($n+2)
</I>&gt;<i>      }
</I>&gt;<i>return $fib($fib,10)
</I>
Well that's not very bizarre, eventually you would arrive at the Y
combinator, &lt;http://en.<a title="XML Wikipedia" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://wiki.stylusstudio.com/">wikipedia</a>.org/wiki/Fixed_point_combinator&gt;.
-- 
Bj&#246;rn H&#246;hrmann &#183; mailto:http://x-query.com/mailman/listinfo/talk &#183; http://bjoern.hoehrmann.de
Am Badedeich 7 &#183; Telefon: +49(0)160/4415681 &#183; http://www.bjoernsworld.de
25899 Dageb&#252;ll &#183; PGP Pub. KeyID: 0xA4357E78 &#183; http://www.websitedev.de/ 
</PRE>
]]></content></entry><entry><title>  Recursive functions and function types
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003663.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003663.html" /><updated>2009-12-16T16:44:06Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
&gt;<i> Hmmm, we should mention that in the spec ....
</I>
or fix the defficiency rather than documenting it?

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>  Recursive functions and function types
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003660.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003660.html" /><updated>2009-12-16T16:11:09Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE> 
&gt;<i> 
</I>&gt;<i> Can't this already be done with inline functions?
</I>&gt;<i> 
</I>&gt;<i> let $fib :=
</I>&gt;<i>      function($n as xs:integer) as xs:integer {
</I>&gt;<i>          if ($n &lt; 3) then 1 else fib($n-1) + fib($n+2)
</I>&gt;<i>      }
</I>&gt;<i> return $fib(10)
</I>&gt;<i> 
</I>
No: the inner (recursive) calls to fib() would fail saying the function is
undefined. Anonymous functions can't be recursive because there is no way
they can refer to themselves.

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>  [ANN] XML Prague 2010 Final Call for Participation
	(CFP)
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003672.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003672.html" /><updated>2009-12-16T14:24:21Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>James,

the conference web site says very little (close to nothing) about the  
fate of the submissions,
which makes it difficult to contribute to.

For example, how are the papers considered: are they considered  
publications ?
are double submissions accepted ? can they resubmit their results  
somewhere else after that ?

It would be important to know the answer to such questions, especially  
for students
and their research contributions.

Thanks, best regards
Dana


On Dec 16, 2009, at 4:13 AM, James Fuller wrote:

&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> Prague 2010 Final Call for Papers
</I>&gt;<i>
</I>&gt;<i> Please submit your papers for XML Prague as the CFP deadline  
</I>&gt;<i> approaches.
</I>&gt;<i>
</I>&gt;<i>   * December 21st - End of CFP (extended abstract or full paper)
</I>&gt;<i>   * January 6th - Notification of acceptance/rejection of paper to  
</I>&gt;<i> authors
</I>&gt;<i>   * January 22nd - Final paper
</I>&gt;<i>
</I>&gt;<i> If you have any question regarding submission process please contact
</I>&gt;<i> Jirka Kosek at http://x-query.com/mailman/listinfo/talk
</I>&gt;<i>
</I>&gt;<i> on behalf,
</I>&gt;<i> XML Prague Committee
</I>&gt;<i>
</I>&gt;<i> -------------------------
</I>&gt;<i> Jim Fuller
</I>&gt;<i> http://www.xmlprague.cz
</I>&gt;<i> XML Prague 2010 Sponsor - MarkLogic (http://www.marklogic.com)
</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>  XQuery functions returning multiple element types
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003670.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003670.html" /><updated>2009-12-16T13:32:25Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>At 2009-12-16 13:26 -0500, David A. Lee wrote:
&gt;<i>I'm trying to declare a function that can return 2 element types but 
</I>&gt;<i>with no success.  Maybe its not possible.
</I>
It is possible to have the function return them, but you can't 
constrain the function to validate that they are being returned.

&gt;<i>What I'd like to do is something like this  (simplified)
</I>&gt;<i>
</I>&gt;<i>declare function  search( $root as element(root) )  as element(foo|bar)*
</I>&gt;<i>{
</I>&gt;<i>    $root//(foo|bar)
</I>&gt;<i>};
</I>&gt;<i>
</I>&gt;<i>No go ... :(
</I>&gt;<i>
</I>&gt;<i>I'm stuck with
</I>&gt;<i>
</I>&gt;<i>declare function  search( $root as element(root) )  as element()*
</I>&gt;<i>
</I>&gt;<i>Am I missing some magic syntax to allow a function to be mulit-valued ?
</I>
Sequence types are used as the constraints for function declarations, 
and the following is not a sequence type:

   element(foo|bar)*

A sequence type is a combination of a <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 a 
cardinality.  So each of these are sequence types:

   element(foo)*

and

   element(bar)*

But you cannot combine the two and still have a sequence type.

I think if you had a <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> aware process and you created a 
user-defined type that unions the foo and bar elements, then you 
could create a sequence type of your user-defined type ... but I 
haven't got the time today to test that.

I hope this helps.

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


--
<a title="UBL Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/ubl/index.html">UBL</a> and Code List training:      Copenhagen, Denmark 2010-02-08/10
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>/XQuery/<a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a> training after http://XMLPrague.cz 2010-03-15/19
XSLT/XQuery/XPath training:   San Carlos, California 2010-04-26/30
Vote for your <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>:   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>  XQuery functions returning multiple element types
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003668.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003668.html" /><updated>2009-12-16T13:26:34Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>I'm trying to declare a function that can return 2 element types but 
with no success.  Maybe its not possible.

What I'd like to do is something like this  (simplified)


declare function  search( $root as element(root) )  as element(foo|bar)*
{
    $root//(foo|bar)
};

No go ... :(

I'm stuck with

declare function  search( $root as element(root) )  as element()*



Am I missing some magic syntax to allow a function to be mulit-valued ?


-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>  [ANN] XML Prague 2010 Final Call for Participation
	(CFP)
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003658.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003658.html" /><updated>2009-12-16T13:13:47Z</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/xml.html">XML</a> Prague 2010 Final Call for Papers

Please submit your papers for XML Prague as the CFP deadline approaches.

   * December 21st - End of CFP (extended abstract or full paper)
   * January 6th - Notification of acceptance/rejection of paper to authors
   * January 22nd - Final paper

If you have any question regarding submission process please contact
Jirka Kosek at http://x-query.com/mailman/listinfo/talk

on behalf,
XML Prague Committee

-------------------------
Jim Fuller
http://www.xmlprague.cz
XML Prague 2010 Sponsor - MarkLogic (http://www.marklogic.com)
</PRE>
]]></content></entry><entry><title>  Recursive functions and function types
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003665.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003665.html" /><updated>2009-12-16T11:55:30Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>we need a &quot;$this&quot;

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> On Wed, Dec 16, 2009 at 8:41 AM, David A. Lee &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
</I>&gt;<i>   
</I>&gt;&gt;<i> This is a bizzare thought and ugly but how about
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> let $fib :=
</I>&gt;&gt;<i>     function($func ,  $n as xs:integer) as xs:integer {
</I>&gt;&gt;<i>         if ($n&lt;  3) then 1 else $func($n-1) + $func($n+2)
</I>&gt;&gt;<i>     }
</I>&gt;&gt;<i> return $fib($fib,10)
</I>&gt;&gt;<i>     
</I>&gt;<i>
</I>&gt;<i> I've mentioned this in my initial post. It works, but I don't like the
</I>&gt;<i> lack of type annotation on $func (and there's no way to express the
</I>&gt;<i> type of a function taking itself as an argument).
</I>&gt;<i>   
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091216/6ba5e6a6/attachment.htm
</PRE>
]]></content></entry><entry><title>  Recursive functions and function types
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003662.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003662.html" /><updated>2009-12-16T11:41:59Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>This is a bizzare thought and ugly but how about



let $fib :=
      function($func ,  $n as xs:integer) as xs:integer {
          if ($n&lt;  3) then 1 else $func($n-1) + $func($n+2)
      }
return $fib($fib,10)



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



<a title="An Interview with Jonathan Robie" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/interviews/jonathan_robie.html">Jonathan Robie</a> wrote:
&gt;<i> On 12/16/2009 11:11 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> wrote:
</I>&gt;&gt;&gt;<i> Can't this already be done with inline functions?
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> let $fib :=
</I>&gt;&gt;&gt;<i>       function($n as xs:integer) as xs:integer {
</I>&gt;&gt;&gt;<i>           if ($n&lt;  3) then 1 else fib($n-1) + fib($n+2)
</I>&gt;&gt;&gt;<i>       }
</I>&gt;&gt;&gt;<i> return $fib(10)
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i>      
</I>&gt;&gt;<i> No: the inner (recursive) calls to fib() would fail saying the 
</I>&gt;&gt;<i> function is
</I>&gt;&gt;<i> undefined. Anonymous functions can't be recursive because there is no 
</I>&gt;&gt;<i> way
</I>&gt;&gt;<i> they can refer to themselves.
</I>&gt;&gt;<i>    
</I>&gt;<i>
</I>&gt;<i> Hmmm, we should mention that in the spec ....
</I>&gt;<i>
</I>&gt;<i> Jonathan
</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>  Recursive functions and function types
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003661.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003661.html" /><updated>2009-12-16T11:29:57Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On 12/16/2009 11:11 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> wrote:
&gt;&gt;<i> Can't this already be done with inline functions?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> let $fib :=
</I>&gt;&gt;<i>       function($n as xs:integer) as xs:integer {
</I>&gt;&gt;<i>           if ($n&lt;  3) then 1 else fib($n-1) + fib($n+2)
</I>&gt;&gt;<i>       }
</I>&gt;&gt;<i> return $fib(10)
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>      
</I>&gt;<i> No: the inner (recursive) calls to fib() would fail saying the function is
</I>&gt;<i> undefined. Anonymous functions can't be recursive because there is no way
</I>&gt;<i> they can refer to themselves.
</I>&gt;<i>    
</I>
Hmmm, we should mention that in the spec ....

Jonathan
</PRE>
]]></content></entry><entry><title>  Recursive functions and function types
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003659.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003659.html" /><updated>2009-12-16T10:43:27Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On 12/15/2009 05:51 PM, Pavel Minaev wrote:
&gt;<i> On Tue, Dec 15, 2009 at 2:32 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:
</I>&gt;<i>    
</I>&gt;&gt;<i> If one did want to provide such a thing, I would have thought it could be
</I>&gt;&gt;<i> done using local function declarations: named functions declared locally
</I>&gt;&gt;<i> rather than globally, e.g.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>        local function fib ($n as xs:integer) as xs:integer {
</I>&gt;&gt;<i>           if ($n&lt;  3) then 1 else fib($n-1) + fib($n+2)
</I>&gt;&gt;<i>        }
</I>&gt;&gt;<i>        return fib(10)
</I>&gt;&gt;<i>      
</I>&gt;<i> Something like that would be wonderful. I'm not specifically
</I>&gt;<i> interested in syntax details here, just the existence of a clear and
</I>&gt;<i> straightforward way to do this.
</I>&gt;<i>    
</I>
Can't this already be done with inline functions?

let $fib :=
     function($n as xs:integer) as xs:integer {
         if ($n &lt; 3) then 1 else fib($n-1) + fib($n+2)
     }
return $fib(10)

Jonathan
</PRE>
]]></content></entry><entry><title>  Recursive functions and function types
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003667.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003667.html" /><updated>2009-12-16T09:06:00Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Wed, Dec 16, 2009 at 8:55 AM, David A. Lee &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> we need a &quot;$this&quot;
</I>
This would actually be an interesting approach to this, as it would
eliminate the need to bind a function to a variable altogether (since
we really just want to call it right away, and the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">binding</a> is only
there to recurse on it). This doesn't handle mutually recursive
functions, though, but then that is a much bigger issue, as it would
effectively require some way to define a group of &quot;let&quot; or &quot;local
function&quot; bindings that can all see each other, like OCaml &quot;let rec
... and ... and ...&quot; syntax.
</PRE>
]]></content></entry><entry><title>  Recursive functions and function types
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003666.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003666.html" /><updated>2009-12-16T08:54:27Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Wed, Dec 16, 2009 at 8:41 AM, David A. Lee &lt;http://x-query.com/mailman/listinfo/talk&gt; wrote:
&gt;<i> This is a bizzare thought and ugly but how about
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> let $fib :=
</I>&gt;<i> &#160; &#160; function($func , &#160;$n as xs:integer) as xs:integer {
</I>&gt;<i> &#160; &#160; &#160; &#160; if ($n&lt; &#160;3) then 1 else $func($n-1) + $func($n+2)
</I>&gt;<i> &#160; &#160; }
</I>&gt;<i> return $fib($fib,10)
</I>
I've mentioned this in my initial post. It works, but I don't like the
lack of type annotation on $func (and there's no way to express the
type of a function taking itself as an argument).

</PRE>
]]></content></entry><entry><title>  Problems inserting an attribute that contains
	newlines
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003657.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003657.html" /><updated>2009-12-15T23:43:37Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On 14.12.2009 22:35, Newman, John W wrote:
&gt;<i> Hello,
</I>
Dear John,

there is indeed a bug in the code for whitespace normalization and
attributes. Based on your example, we could fix it internally.

I can send you a patch, if you are willing to build MXQuery from source
and want to minimize the changes to your current setup. Alternatively, I
can point you to an internal build of MXQuery, which will contain the
fix, but also other changes and <a title="new features" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_product_new_features.html">new features</a>. A new version of MXQuery
is due for general release in the next weeks, and the fix will be in.

Please let me know what you prefer.

I am sorry for not following up your previous report in more detail, but
the posting indicated that the problem was on your side, and you had
solved it.

Best Regards,
Peter Fischer

&gt;<i>  
</I>&gt;<i> 
</I>&gt;<i> We are using mxquery 0.6.  A few months ago, I noticed a problem where our <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> updates were losing newlines.   One of my coworkers did some testing, closed it as &quot;not a bug, cannot reproduce&quot;, but now today I've found that the problem is still happening when inserting attributes but not replacing them (which is probably what he tested).
</I>&gt;<i> 
</I>&gt;<i>  
</I>&gt;<i> 
</I>&gt;<i> Sample query:
</I>&gt;<i> 
</I>&gt;<i>  
</I>&gt;<i> 
</I>&gt;<i> declare variable $source external;
</I>&gt;<i> 
</I>&gt;<i> declare variable $newNote := &quot;A note&amp;#X0A;with&amp;#X0A;some new&amp;#X0A;&amp;#X0A;lines in it.&quot;;
</I>&gt;<i> 
</I>&gt;<i>  
</I>&gt;<i> 
</I>&gt;<i> copy $target := $source modify (
</I>&gt;<i>    let $targetElement := $target//&lt;el&gt;;
</I>&gt;<i> 
</I>&gt;<i>    let $notes := $targetElement/@Notes
</I>&gt;<i> 
</I>&gt;<i>    return (
</I>&gt;<i> 
</I>&gt;<i>              if ($notes) then (
</I>&gt;<i> 
</I>&gt;<i>                    replace value of node $notes with $newNote    (: this works fine, new lines are preserved :)
</I>&gt;<i> 
</I>&gt;<i>              ) else (
</I>&gt;<i> 
</I>&gt;<i>                    insert nodes attribute Notes '{' $newNote '}' into $targetElement  (: this loses new lines, they are replaced with a space :) 
</I>&gt;<i> 
</I>&gt;<i>             )
</I>&gt;<i> 
</I>&gt;<i>    )
</I>&gt;<i> 
</I>&gt;<i> )
</I>&gt;<i> 
</I>&gt;<i> return $target
</I>&gt;<i> 
</I>&gt;<i>  
</I>&gt;<i> 
</I>&gt;<i> input:    &lt;root&gt;&lt;el /&gt;&lt;/root&gt;
</I>&gt;<i> 
</I>&gt;<i> output:  &lt;root&gt;&lt;el Notes=&quot;A note with some new  lines in it.&quot; /&gt;&lt;/root&gt; (incorrect, escaped new lines have been replaced with regular spaces)
</I>&gt;<i> 
</I>&gt;<i>  
</I>&gt;<i> 
</I>&gt;<i> input:    &lt;root&gt;&lt;el Notes=&quot;x&quot; /&gt;&lt;/root&gt;
</I>&gt;<i> 
</I>&gt;<i> output: &lt;root&gt;&lt;el Notes=&quot;A note&amp;#X0A;with&amp;#X0A;some new&amp;#X0A;&amp;#X0A;lines in it.&quot; /&gt;&lt;/root&gt;    (correct, replace is OK)
</I>&gt;<i> 
</I>&gt;<i>  
</I>&gt;<i> 
</I>&gt;<i> I've been digging through the xquery update spec for a bit but I am not finding my answer - is there an extra symbol or setting we need to preserve the new lines for an insert?  Is the processor doing 'too much' normalization?  I'd be happier if it wasn't modifying data on its own. =)
</I>&gt;<i> 
</I>&gt;<i>  
</I>&gt;<i> 
</I>&gt;<i> Thanks in advance for any advice
</I>&gt;<i> 
</I>&gt;<i> -John
</I>&gt;<i> 
</I>

-- 
Dr. Peter Fischer              Systems Group/D-INFK/ETH Zurich
http://x-query.com/mailman/listinfo/talk		 Tel: +41/44/632 36 16
http://www.dbis.ethz.ch/people/petfisch       	     CAB F56.1
</PRE>
]]></content></entry><entry><title>  Recursive functions and function types
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003655.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003655.html" /><updated>2009-12-15T22:32:54Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
Does this offer a significant advantage over using a named global function
when recursion is required? Is the advantage great enough to justify what
appears to be significant extra complexity?

If one did want to provide such a thing, I would have thought it could be
done using local function declarations: named functions declared locally
rather than globally, e.g.

       local function fib ($n as xs:integer) as xs:integer {
          if ($n &lt; 3) then 1 else fib($n-1) + fib($n+2)
       }
       return fib(10)

and if you want it in a variable, it's 

       let $fib := fib#1

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 Pavel Minaev
</I>&gt;<i> Sent: 15 December 2009 22:11
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject:  Recursive functions and function types
</I>&gt;<i> 
</I>&gt;<i> With the introduction of inline functions and function item 
</I>&gt;<i> type to <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>, I hoped that we'll finally get a decent 
</I>&gt;<i> looping construct in form of inline recursive functions; e.g.:
</I>&gt;<i> 
</I>&gt;<i>      let $fib := function($n as xs:integer) {
</I>&gt;<i>         if ($n &lt; 3) then 1 else $fib($n-1) + $fib($n+2)
</I>&gt;<i>      }
</I>&gt;<i>      return $fib(10)
</I>&gt;<i> 
</I>&gt;<i> The above doesn't work as is because let-<a title="bindings" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a> in XQuery 
</I>&gt;<i> cannot be recursive, and therefore the inline function cannot 
</I>&gt;<i> reference $fib.
</I>&gt;<i> The usual workaround for that is to make the function take 
</I>&gt;<i> itself as an argument, i.e.:
</I>&gt;<i> 
</I>&gt;<i>      let $fib := function($fib as ???, $n as xs:integer) {
</I>&gt;<i>         if ($n &lt; 3) then 1 else $fib($n-1) + $fib($n+2)
</I>&gt;<i>      }
</I>&gt;<i>      return $fib($fib, 10)
</I>&gt;<i> 
</I>&gt;<i> But then the problem is with the declared type of the 
</I>&gt;<i> function. So far as I can see, there's no way to declare an 
</I>&gt;<i> <a title="XQuery Function Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/xquery_functions.html">XQuery function</a> type that references itself in any way. Is 
</I>&gt;<i> that right? It is, of course, possible to use item() as the 
</I>&gt;<i> type, and let the implementation do the runtime check (or 
</I>&gt;<i> optimize it out), but this isn't very neat...
</I>&gt;<i> 
</I>&gt;<i> I wonder if some way of defining recursive bindings, where 
</I>&gt;<i> the binding itself is in the scope of its initializer - 
</I>&gt;<i> specifically for recursive functions - has been considered, 
</I>&gt;<i> similar to &quot;let rec&quot; of OCaml? It's obvious why this isn't 
</I>&gt;<i> safe to refer to the binding in its initializer in the most 
</I>&gt;<i> general case, but the special case of directly binding an 
</I>&gt;<i> inline function is both perfectly safe, and should become 
</I>&gt;<i> fairly common.
</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>  How to copy in-scope namespace bindings
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003651.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003651.html" /><updated>2009-12-15T19:00:10Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> <a title="specification" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">specification</a> explicitly doesn't say that a conforming implementation must
</I>&gt;<i> reject any construct that isn't defined in (or &quot;supported by&quot;) the spec: and
</I>&gt;<i> as far as I have been able to determine, that is a deliberate omission. The
</I>&gt;<i> cultural background of <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> is in the database world, where vendors
</I>&gt;<i> routinely expect to implement their own enhancements to standards and users
</I>&gt;<i> typically don't complain.
</I>
That is a tough decision in my opinion. For example, the standard
mandates that &quot;5div 3&quot; must be treated as an error, at least that's
the way I read it. Our parser actually contains several special case
statements that check for such conditions - normally, we'd be able to
properly parse that (and I don't quite understand why it should be a
problem), but we need special logic to prevent that. The same thing
applies to casting strings to QNames at run time, and other similar
things. I'm actually thinking about implementing a more rigid
standards compliancy mode that enforces these things, and a more
lenient mode. Preventing things like the run time case to QName is
quite a pain for users, and it's entirely gratuitous in my opinion.

Regards,
Martin
</PRE>
]]></content></entry><entry><title>  How to copy in-scope namespace bindings
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003652.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003652.html" /><updated>2009-12-15T18:21:12Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> 
</I>&gt;<i> That is a tough decision in my opinion. For example, the 
</I>&gt;<i> <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> mandates that &quot;5div 3&quot; must be treated as an error, 
</I>&gt;<i> at least that's the way I read it. 
</I>
Yes, I've generally gone out of my way to implement and enforce such rules.
But I also tried to get the WG to agree to tighter wording on conformance to
disallow syntactic extensions, and they pushed back.

&gt;<i> (and I don't quite understand why it should be a problem),
</I>
If I remember, it was a rather silly <a title="discussion" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discussion</a> of why 5e0 should be
tokenized differently from 5else0, leading to the rule in 2.2 that adjacent
non-delimiting termial symbols must be separated by whitespace.
 
&gt;<i> Preventing things like the 
</I>&gt;<i> run time case to QName is quite a pain for users, and it's 
</I>&gt;<i> entirely gratuitous in my opinion.
</I>
Again there's a history, but the final result ended up slightly absurd,
given that there are other constructs in <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> (element constructors) where
the static namespace context needs to be known at run-time. The original
rule was to ensure that casting QName to string didn't need to know the
static namespace context (because the system would then have to keep this
context for all casts, just in case the operand turns out to be a QName);
the current rule was introduced for symmetry, and somehow got left in when
the QName-&gt;string case was resolved by making QNames into triples.

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>  How to copy in-scope namespace bindings
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003650.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003650.html" /><updated>2009-12-15T16:14:54Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>&gt;<i> 
</I>&gt;<i> I've based the section in my teaching materials on the note in:
</I>&gt;<i> 
</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/2007/REC-<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a>-20070123/#id-basics
</I>&gt;<i> 
</I>&gt;<i> ... just before section 2.1:
</I>&gt;<i> 
</I>&gt;<i>    http://www.w3.org/TR/2007/REC-xquery-20070123/#context
</I>&gt;<i> 
</I>&gt;<i> ... where it states:
</I>&gt;<i> 
</I>&gt;<i>    &quot;XQuery does not support the namespace axis and does not
</I>&gt;<i>     represent namespace <a title="bindings" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a> in the form of nodes.
</I>&gt;<i> 
</I>&gt;<i> That sounds pretty explicit to me ... but it is in a note.  
</I>&gt;<i> Does putting it in a note make it informative instead of 
</I>&gt;<i> normative in W3C specifications?  I think in ISO 
</I>&gt;<i> specifications that is true, but given this was in the 
</I>&gt;<i> section on basics I thought it was binding.
</I>
Well, personally, I treat the word &quot;support&quot; in specifications as poison.
What does it mean? We read of applications that &quot;support&quot; Linux, of products
that &quot;support&quot; standards (say XQuery), and here of a language that
&quot;supports&quot; a particular <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>. Almost invariably, and certainly here, it's
a bad choice of verb.

It's fairly clear that this sentence means that a minimally conformant
XQuery implementation will reject use of the namespace axis, and provides no
mechanism for getting access to namespace nodes. But it doesn't say that an
implementation is non-conformant if it does provide those features. The
specification explicitly doesn't say that a conforming implementation must
reject any construct that isn't defined in (or &quot;supported by&quot;) the spec: and
as far as I have been able to determine, that is a deliberate omission. The
cultural background of XQuery is in the database world, where vendors
routinely expect to implement their own enhancements to standards and users
typically don't complain.

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>  How to copy in-scope namespace bindings
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003649.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003649.html" /><updated>2009-12-15T16:05:18Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>I would say it is not bothering anybody when there happens to be some implementation that supports it, for some kind of backwards compatibility reason perhaps.

But if it is mentioned that explicitly, its use should not be advocated. I will refrain from it, though I have to say that it made solving my problem quite easy.. :-/

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 G. Ken Holman
</I>&gt;<i> Sent: dinsdag 15 december 2009 15:54
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject: RE:  How to copy in-scope namespace <a title="bindings" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a>
</I>&gt;<i>
</I>&gt;<i> At 2009-12-15 10:21 +0000, <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:
</I>&gt;<i> &gt;I was under the impression that an XQuery processor isn't even
</I>&gt;<i> &gt;*allowed* to support the namespace axis, which is why <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> contains
</I>&gt;<i> &gt;explicit logic to reject it: though reading the conformance rules
</I>&gt;<i> &gt;again, XQuery is actually very liberal about vendor
</I>&gt;<i> extensions, so that
</I>&gt;<i> &gt;might not have been the right decision.
</I>&gt;<i>
</I>&gt;<i> I've based the section in my teaching materials on the note in:
</I>&gt;<i>
</I>&gt;<i>    http://www.w3.org/TR/2007/REC-xquery-20070123/#id-basics
</I>&gt;<i>
</I>&gt;<i> ... just before section 2.1:
</I>&gt;<i>
</I>&gt;<i>    http://www.w3.org/TR/2007/REC-xquery-20070123/#context
</I>&gt;<i>
</I>&gt;<i> ... where it states:
</I>&gt;<i>
</I>&gt;<i>    &quot;XQuery does not support the namespace axis and does not
</I>&gt;<i>     represent namespace bindings in the form of nodes.
</I>&gt;<i>
</I>&gt;<i> That sounds pretty explicit to me ... but it is in a note.
</I>&gt;<i> Does putting it in a note make it informative instead of
</I>&gt;<i> normative in W3C specifications?  I think in ISO
</I>&gt;<i> specifications that is true, but given this was in the
</I>&gt;<i> section on basics I thought it was binding.
</I>&gt;<i>
</I>&gt;<i> . . . . . . . . . . Ken
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>/XQuery/<a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a> training after http://XMLPrague.cz 2010-03-15/19
</I>&gt;<i> Vote for your <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>:   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>&gt;<i>
</I>

</PRE>
]]></content></entry><entry><title>  New XQuery / XPath Working Drafts
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003653.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003653.html" /><updated>2009-12-15T15:57:57Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>The <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> working Group has just published new versions of the 
following specifications:

XQuery 1.1: An XML Query Language
http://www.w3.org/TR/2009/WD-xquery-11-20091215/

XQueryX 1.1
http://www.w3.org/TR/2009/WD-xqueryx-11-20091215/

XQuery 1.1 Requirements
http://www.w3.org/TR/2009/WD-xquery-11-requirements-20091215/

These include a number of significant new XQuery features, including:

* group by clause in <a title="FLWOR in XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery_flwor.html">FLWOR Expressions</a>
* tumbling window and sliding window in FLWOR Expressions
* count clause in FLWOR Expressions
* allowing empty in 3.8.2 For Clause (for <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
   outer joins in SQL)
* try/catch expressions
* Dynamic function invocation
* Inline functions
* Private functions
* Nondeterministic functions
* Switch expressions
* Computed namespace constructors
* Output declarations

The XQuery and <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSL</a> Working Groups have published First Public Working 
Drafts of the following specifications:

<a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath 2.1</a>
http://www.w3.org/TR/2009/WD-xpath-21-20091215/

XQuery and XPath <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> 1.1
http://www.w3.org/TR/2009/WD-xpath-datamodel-11-20091215/

XPath and <a title="XQuery Functions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/xquery_functions.html">XQuery Functions</a> and Operators 1.1
http://www.w3.org/TR/2009/WD-xpath-functions-11-20091215/

XSLT and XQuery Serialization 1.1
http://www.w3.org/TR/2009/WD-xslt-xquery-serialization-11-20091215/

Jonathan
</PRE>
]]></content></entry><entry><title>  Recursive functions and function types
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003656.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003656.html" /><updated>2009-12-15T14:51:00Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>On Tue, Dec 15, 2009 at 2:32 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;<i> Does this offer a significant advantage over using a named global function
</I>&gt;<i> when recursion is required? Is the advantage great enough to justify what
</I>&gt;<i> appears to be significant extra complexity?
</I>
I believe so. In a pure language like <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>, recursion has to be used
in any place where an imperative language would use a loop where every
next iteration depends on results computed by a previous iteration.
The problem with using global function definitions for that purpose is
that they 1) pollute the namespace, and 2) don't capture the local
environment. In practice, #2 is probably the biggest deal. I'm not
talking about reusable recursive functions here, but basically
something that would be written only to be immediately called
somewhere inside another function, where I'd write a loop in e.g.
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a>. Typical example would be a function that uses
accumulator-passing style for implementation, but does not wish to
expose that accumulator in its public signature (as is normally the
case).

&gt;<i> If one did want to provide such a thing, I would have thought it could be
</I>&gt;<i> done using local function declarations: named functions declared locally
</I>&gt;<i> rather than globally, e.g.
</I>&gt;<i>
</I>&gt;<i> &#160; &#160; &#160; local function fib ($n as xs:integer) as xs:integer {
</I>&gt;<i> &#160; &#160; &#160; &#160; &#160;if ($n &lt; 3) then 1 else fib($n-1) + fib($n+2)
</I>&gt;<i> &#160; &#160; &#160; }
</I>&gt;<i> &#160; &#160; &#160; return fib(10)
</I>
Something like that would be wonderful. I'm not specifically
interested in syntax details here, just the existence of a clear and
straightforward way to do this.

</PRE>
]]></content></entry><entry><title>  Recursive functions and function types
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003654.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003654.html" /><updated>2009-12-15T14:10:31Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>With the introduction of inline functions and function item type to
<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>, I hoped that we'll finally get a decent looping construct
in form of inline recursive functions; e.g.:

     let $fib := function($n as xs:integer) {
        if ($n &lt; 3) then 1 else $fib($n-1) + $fib($n+2)
     }
     return $fib(10)

The above doesn't work as is because let-<a title="bindings" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a> in XQuery cannot be
recursive, and therefore the inline function cannot reference $fib.
The usual workaround for that is to make the function take itself as
an argument, i.e.:

     let $fib := function($fib as ???, $n as xs:integer) {
        if ($n &lt; 3) then 1 else $fib($n-1) + $fib($n+2)
     }
     return $fib($fib, 10)

But then the problem is with the declared type of the function. So far
as I can see, there's no way to declare an <a title="XQuery Function Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/xquery_functions.html">XQuery function</a> type that
references itself in any way. Is that right? It is, of course,
possible to use item() as the type, and let the implementation do the
runtime check (or optimize it out), but this isn't very neat...

I wonder if some way of defining recursive bindings, where the binding
itself is in the scope of its initializer - specifically for recursive
functions - has been considered, similar to &quot;let rec&quot; of OCaml? It's
obvious why this isn't safe to refer to the binding in its initializer
in the most general case, but the special case of directly binding an
inline function is both perfectly safe, and should become fairly
common.
</PRE>
]]></content></entry><entry><title>  How to copy in-scope namespace bindings
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003646.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003646.html" /><updated>2009-12-15T10:21:30Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
I was under the impression that an XQuery processor isn't even *allowed* to
support the namespace axis, which is why <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> contains explicit logic to
reject it: though reading the conformance rules again, XQuery is actually
very liberal about vendor extensions, so that might not have been the right
decision.

<a title="Saxon does have a function" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xslt_processor.html">Saxon does have a function</a> saxon:namespace() which allows you to construct
namespace nodes and add them to a containing element, which is less
contorted than your workaround, but not as portable.

It's worth pointing out that the <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> actually allows processors to
remove namespaces that don't appear in element or attribute names
completely. That was done because there were influential vendors on the
Working Group who simply saw &quot;namespaces in content&quot; as an unnecessary
complexity, and one which made mapping of XML to relational databases too
hard. I don't know if any products have taken this option - it's worth
checking, because any such product cannot be <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">used to store schemas</a>,
<a title="Stylesheet Design" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/publisher1/publisher1.html">stylesheets</a>, or even instance documents containing an &quot;xsi:type&quot; attribute.

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 Geert Josten
</I>&gt;<i> Sent: 15 December 2009 08:17
</I>&gt;<i> To: Hans-Juergen Rennau; http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject: RE:  How to copy in-scope namespace bindings
</I>&gt;<i> 
</I>&gt;<i> Hi Hans-Juergen,
</I>&gt;<i> 
</I>&gt;<i> I had a similar case (or perhaps it is the same?) in which I 
</I>&gt;<i> wanted to preserve namespace bindings on the element when 
</I>&gt;<i> copying it, even those not used or only used by descendants. 
</I>&gt;<i> I simply solved it by using the namespace axis. It would come 
</I>&gt;<i> down to adding $n/namespace::* just above your for loop. But 
</I>&gt;<i> I am not certain it is supported by all XQuery processors, 
</I>&gt;<i> and you may get some xml namespace bindings you will have to 
</I>&gt;<i> filter out as well..
</I>&gt;<i> 
</I>&gt;<i> Kind regards,
</I>&gt;<i> Geert
</I>&gt;<i> 
</I>&gt;<i> &gt;
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i> Drs. G.P.H. Josten
</I>&gt;<i> Consultant
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i> http://www.daidalos.nl/
</I>&gt;<i> Daidalos BV
</I>&gt;<i> Source of Innovation
</I>&gt;<i> Hoekeindsehof 1-4
</I>&gt;<i> 2665 JZ Bleiswijk
</I>&gt;<i> Tel.: +31 (0) 10 850 1200
</I>&gt;<i> Fax: +31 (0) 10 850 1199
</I>&gt;<i> http://www.daidalos.nl/
</I>&gt;<i> KvK 27164984
</I>&gt;<i> De informatie - verzonden in of met dit emailbericht - is 
</I>&gt;<i> afkomstig van Daidalos BV en is uitsluitend bestemd voor de 
</I>&gt;<i> geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, 
</I>&gt;<i> verzoeken wij u het te verwijderen. Aan dit bericht kunnen 
</I>&gt;<i> geen rechten worden ontleend.
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i> &gt; From: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> &gt; [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf Of Hans-Juergen Rennau
</I>&gt;<i> &gt; Sent: dinsdag 15 december 2009 8:27
</I>&gt;<i> &gt; To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> &gt; Subject:  How to copy in-scope namespace bindings
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Hello People,
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; glad to get advice concerning the processing of namespace-sensitive 
</I>&gt;<i> &gt; content.
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; The problem. When recursively processing a document with 
</I>&gt;<i> &gt; namespace-sensitive content - e.g. an XSD - one has this
</I>&gt;<i> &gt; problem: the classic copying pattern:
</I>&gt;<i> &gt;       element {node-name($n)} {
</I>&gt;<i> &gt;          for $ac in $n/(@*, node()) return yogi:process($ac)
</I>&gt;<i> &gt;       }
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; does not copy namespace-bindings unless they will be provided by 
</I>&gt;<i> &gt; namespace fixup due to their use in item names. In particular, 
</I>&gt;<i> &gt; namespace bindings which the source may possess solely for the 
</I>&gt;<i> &gt; interpretation of namespace-sensitive content may be lost... How to 
</I>&gt;<i> &gt; deal with this problem?
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; The technique I use is collecting the source element's 
</I>&gt;<i> bindings (via 
</I>&gt;<i> &gt; in-scope-prefixes + namespace-uri-for-prefix), construct a wrapper 
</I>&gt;<i> &gt; around the target node, attach dummy attributes to it using the 
</I>&gt;<i> &gt; namespace bindings, and then discard the wrapper:
</I>&gt;<i> &gt; &lt;_wrapper&gt;{$nsDummayAtts, element{node-name($n)} {...}}&lt;/_wrapper&gt;/*
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; which is as elegant as Monty Python's silly walks but less 
</I>&gt;<i> funny. And 
</I>&gt;<i> &gt; worse: it is a fragile solution, depending on the 
</I>&gt;<i> copy-namespaces mode 
</I>&gt;<i> &gt; containing the value 'inherit', and some (even neither bad 
</I>&gt;<i> nor cheap) 
</I>&gt;<i> &gt; processors do not even support setting that mode! Not to 
</I>&gt;<i> mention that 
</I>&gt;<i> &gt; in other parts of the same module a different mode value may be 
</I>&gt;<i> &gt; appropriate...
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Does anybody have alternative suggestions how to cope with 
</I>&gt;<i> the problem 
</I>&gt;<i> &gt; (except for turning to XQuery 1.1 which will not be a 
</I>&gt;<i> recommendation 
</I>&gt;<i> &gt; within two years, and XSLT2.0)?
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Thank you very much -
</I>&gt;<i> &gt; Hans-Juergen
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; __________________________________________________
</I>&gt;<i> &gt; Do You Yahoo!?
</I>&gt;<i> &gt; Sie sind Spam leid? Yahoo! Mail verf&#252;gt &#252;ber einen herausragenden 
</I>&gt;<i> &gt; Schutz gegen Massenmails.
</I>&gt;<i> &gt; http://mail.yahoo.com
</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>&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>  How to copy in-scope namespace bindings
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003647.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003647.html" /><updated>2009-12-15T09:53:31Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>At 2009-12-15 10:21 +0000, <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 was under the impression that an XQuery processor isn't even *allowed* to
</I>&gt;<i>support the namespace axis, which is why <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> contains explicit logic to
</I>&gt;<i>reject it: though reading the conformance rules again, XQuery is actually
</I>&gt;<i>very liberal about vendor extensions, so that might not have been the right
</I>&gt;<i>decision.
</I>
I've based the section in my teaching materials on the note in:

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

... just before section 2.1:

   http://www.w3.org/TR/2007/REC-xquery-20070123/#context

... where it states:

   &quot;XQuery does not support the namespace axis and does not
    represent namespace <a title="bindings" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a> in the form of nodes.

That sounds pretty explicit to me ... but it is in a note.  Does 
putting it in a note make it informative instead of normative in W3C 
specifications?  I think in ISO specifications that is true, but 
given this was in the section on basics I thought it was binding.

. . . . . . . . . . Ken


--
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>/XQuery/<a title="XPath" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">XPath</a> training after http://XMLPrague.cz 2010-03-15/19
Vote for your <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>:   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>  How to copy in-scope namespace bindings
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003645.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003645.html" /><updated>2009-12-15T09:16:38Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi Hans-Juergen,

I had a similar case (or perhaps it is the same?) in which I wanted to preserve namespace <a title="bindings" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a> on the element when copying it, even those not used or only used by descendants. I simply solved it by using the namespace axis. It would come down to adding $n/namespace::* just above your for loop. But I am not certain it is supported by all <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a> processors, and you may get some <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> namespace bindings you will have to filter out as well..

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 Hans-Juergen Rennau
</I>&gt;<i> Sent: dinsdag 15 december 2009 8:27
</I>&gt;<i> To: http://x-query.com/mailman/listinfo/talk
</I>&gt;<i> Subject:  How to copy in-scope namespace bindings
</I>&gt;<i>
</I>&gt;<i> Hello People,
</I>&gt;<i>
</I>&gt;<i> glad to get advice concerning the processing of
</I>&gt;<i> namespace-sensitive content.
</I>&gt;<i>
</I>&gt;<i> The problem. When recursively processing a document with
</I>&gt;<i> namespace-sensitive content - e.g. an <a title="XSD" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> - one has this
</I>&gt;<i> problem: the classic copying pattern:
</I>&gt;<i>       element {node-name($n)} {
</I>&gt;<i>          for $ac in $n/(@*, node()) return yogi:process($ac)
</I>&gt;<i>       }
</I>&gt;<i>
</I>&gt;<i> does not copy namespace-bindings unless they will be provided
</I>&gt;<i> by namespace fixup due to their use in item names. In
</I>&gt;<i> particular, namespace bindings which the source may possess
</I>&gt;<i> solely for the interpretation of namespace-sensitive content
</I>&gt;<i> may be lost... How to deal with this problem?
</I>&gt;<i>
</I>&gt;<i> The technique I use is collecting the source element's
</I>&gt;<i> bindings (via in-scope-prefixes + namespace-uri-for-prefix),
</I>&gt;<i> construct a wrapper around the target node, attach dummy
</I>&gt;<i> attributes to it using the namespace bindings, and then
</I>&gt;<i> discard the wrapper:
</I>&gt;<i> &lt;_wrapper&gt;{$nsDummayAtts, element{node-name($n)} {...}}&lt;/_wrapper&gt;/*
</I>&gt;<i>
</I>&gt;<i> which is as elegant as Monty Python's silly walks but less
</I>&gt;<i> funny. And worse: it is a fragile solution, depending on the
</I>&gt;<i> copy-namespaces mode containing the value 'inherit', and some
</I>&gt;<i> (even neither bad nor cheap) processors do not even support
</I>&gt;<i> setting that mode! Not to mention that in other parts of the
</I>&gt;<i> same module a different mode value may be appropriate...
</I>&gt;<i>
</I>&gt;<i> Does anybody have alternative suggestions how to cope with
</I>&gt;<i> the problem (except for turning to XQuery 1.1 which will not
</I>&gt;<i> be a recommendation within two years, and XSLT2.0)?
</I>&gt;<i>
</I>&gt;<i> Thank you very much -
</I>&gt;<i> Hans-Juergen
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> __________________________________________________
</I>&gt;<i> Do You Yahoo!?
</I>&gt;<i> Sie sind Spam leid? Yahoo! Mail verf&#252;gt &#252;ber einen
</I>&gt;<i> herausragenden Schutz gegen Massenmails.
</I>&gt;<i> http://mail.yahoo.com
</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>  Andy K Chang is on vacation
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003648.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003648.html" /><updated>2009-12-15T08:01:59Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>
I will be out of the office starting  12/12/2009 and will not return until
01/04/2010.

Hi,
I will be out of my office on vacation starting Monday, 12/14/2009.  Coming
back to work on 1/4/2010.  During this time, my delegation will be:
on 12/14:         John S Strozyk;         email: http://x-query.com/mailman/listinfo/talk;
phone: 602-537-2854
from 12/15 to 12/23:    Nicole A Black;         email: http://x-query.com/mailman/listinfo/talk;
      phone: 302-653-8240
from 12/24 to 12/27:    no delegate and I will be out of pocket.  If you need
help, please contact Rob Sassman at 480-528-0880 for emergency
from 12/28 to 12/29:    John S Strozyk;         email: http://x-query.com/mailman/listinfo/talk;
phone: 602-537-2854
from 12/30 to 1/3:      no delegate but I will be available.  Please call me at
480-203-3964 for emergency

Thanks and have a happy holiday.


American Express made the following annotations on Tue Dec 15 2009 08:02:00
------------------------------------------------------------------------------
&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 Tue Dec 15 2009 08:02:00

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>  How to copy in-scope namespace bindings
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003644.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003644.html" /><updated>2009-12-15T07:27:14Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello People,

glad to get advice concerning the processing of namespace-sensitive content.

The problem. When recursively processing a document with namespace-sensitive content - e.g. an <a title="XSD" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> - one has this problem: the classic copying pattern:
      element {node-name($n)} {
         for $ac in $n/(@*, node()) return yogi:process($ac)
      }

does not copy namespace-<a title="bindings" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a> unless they will be provided by namespace fixup due to their use in item names. In particular, namespace bindings which the source may possess solely for the interpretation of namespace-sensitive content may be lost... How to deal with this problem?

The technique I use is collecting the source element's bindings (via in-scope-prefixes + namespace-uri-for-prefix), construct a wrapper around the target node, attach dummy attributes to it using the namespace bindings, and then discard the wrapper:
&lt;_wrapper&gt;{$nsDummayAtts, element{node-name($n)} {...}}&lt;/_wrapper&gt;/*

which is as elegant as Monty Python's silly walks but less funny. And worse: it is a fragile solution, depending on the copy-namespaces mode containing the value 'inherit', and some (even neither bad nor cheap) processors do not even support setting that mode! Not to mention that in other parts of the same module a different mode value may be appropriate...

Does anybody have alternative suggestions how to cope with the problem (except for turning to <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> which will not be a recommendation within two years, and XSLT2.0)?

Thank you very much -
Hans-Juergen


__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verf&#252;gt &#252;ber einen herausragenden Schutz gegen Massenmails. 
http://mail.yahoo.com 

</PRE>
]]></content></entry><entry><title>  Problems inserting an attribute that contains new
	lines
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003643.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003643.html" /><updated>2009-12-14T16:35:31Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hello,

We are using mxquery 0.6.  A few months ago, I noticed a problem where our <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">xquery</a> updates were losing newlines.   One of my coworkers did some testing, closed it as &quot;not a bug, cannot reproduce&quot;, but now today I've found that the problem is still happening when inserting attributes but not replacing them (which is probably what he tested).

Sample query:

declare variable $source external;
declare variable $newNote := &quot;A note&amp;#X0A;with&amp;#X0A;some new&amp;#X0A;&amp;#X0A;lines in it.&quot;;

copy $target := $source modify (
   let $targetElement := $target//&lt;el&gt;;
   let $notes := $targetElement/@Notes
   return (
             if ($notes) then (
                   replace value of node $notes with $newNote    (: this works fine, new lines are preserved :)
             ) else (
                   insert nodes attribute Notes '{' $newNote '}' into $targetElement  (: this loses new lines, they are replaced with a space :)
            )
   )
)
return $target

input:    &lt;root&gt;&lt;el /&gt;&lt;/root&gt;
output:  &lt;root&gt;&lt;el Notes=&quot;A note with some new  lines in it.&quot; /&gt;&lt;/root&gt; (incorrect, escaped new lines have been replaced with regular spaces)

input:    &lt;root&gt;&lt;el Notes=&quot;x&quot; /&gt;&lt;/root&gt;
output: &lt;root&gt;&lt;el Notes=&quot;A note&amp;#X0A;with&amp;#X0A;some new&amp;#X0A;&amp;#X0A;lines in it.&quot; /&gt;&lt;/root&gt;    (correct, replace is OK)

I've been digging through the xquery update spec for a bit but I am not finding my answer - is there an extra symbol or setting we need to preserve the new lines for an insert?  Is the processor doing 'too much' normalization?  I'd be happier if it wasn't modifying data on its own. =)

Thanks in advance for any advice
-John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091214/a403d269/attachment.htm
</PRE>
]]></content></entry><entry><title>  How to preserve &amp;amp;quot;
	in text node output in result tree
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003640.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003640.html" /><updated>2009-12-10T18:51:03Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>Hi All,
I am creating a result tree from my source tree using <a title="XQuery" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery.html">XQuery</a>.
I have source tree sample data as follows:
*&lt;p&gt;&quot;Conservancy.&quot;A charitable corporation&lt;/p&gt;*
My result tree data should be like this :
*&lt;p&gt;&lt;text&gt;&amp;quot;Conservancy. &amp;quot; A charitable corporation&lt;/text&gt;&lt;/p&gt;*

My question is, how can i <a title="convert" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/convert_to_xml.html">convert</a> *&quot;* (single quote) in my source tree into
its <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">Unicode</a> equivalent *&amp;quot; * in my result tree using XQuery.

Please help.
-- 
Regards,
Anuj Kumar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091210/9b75ed0b/attachment.htm
</PRE>
]]></content></entry><entry><title>  How to preserve &amp;amp;quot;
	in text node output in result tree
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003642.html</id><link rel="alternate" type="text/html" href="http://www.stylusstudio.com/xquerytalk/200912/003642.html" /><updated>2009-12-10T13:37:02Z</updated><content type="text/plain"><![CDATA[<!--beginarticle-->
<PRE>A result tree never contains &amp;quot; - that is an artefact of serializing the
result tree into lexical <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> doesn't give you this amount of control over the way in which the
result tree is serialized. Generally, character and entity references will
be used only where there is no other way of representing the character.
 
You can achieve what you want by post-processing the results through an <a title="XSLT
2.0" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT
2.0</a> serializer that supports character maps. This allows you to define rules
for outputting individual characters during serialization.
 
However, it's worth asking the question - why do you care? Any component
that reads this output and cares about the difference between &quot; and &amp;quot;
is not using XML in the way XML was intended to be used, and your best
course of action is to fix that component.
 
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 anuj kumar
Sent: 10 December 2009 13:21
To: http://x-query.com/mailman/listinfo/talk
Subject:  How to preserve &amp;quot;in text node output in result
tree


Hi All,
I am creating a result tree from my source tree using XQuery.
I have source tree sample data as follows:

&lt;p&gt;&quot;Conservancy.&quot;A charitable corporation&lt;/p&gt;
My result tree data should be like this :

&lt;p&gt;&lt;text&gt;&amp;quot;Conservancy. &amp;quot; A charitable corporation&lt;/text&gt;&lt;/p&gt;

My question is, how can i <a title="convert" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/convert_to_xml.html">convert</a> &quot; (single quote) in my source tree into
its <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">Unicode</a> equivalent &amp;quot;  in my result tree using XQuery.

Please help.
-- 
Regards,
Anuj Kumar



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20091210/97e5a64e/attachment.htm
</PRE>
]]></content></entry><entry><title>  How to preserve &amp;amp;quot; in text node output
	in result tree
   </title><id>http://www.stylusstudio.com/xquerytalk/200912/003641.html</id><link rel="alternate" type="text/html" href="http://