Hi Ivan,

I have sent the testdata to your gmail account for protection of the data.  I 
actually tested adding the namespace directly on the element a few days ago. 
But that didn't work so that's why I was trying the approach setting the 
namespace through the xmldb API.

We are using release 3.4 of Sedna just to be sure and the latest (1.2.4) Sedna 
xmldb api from Charles Foster.

Kind regards,
Robby

From: Ivan Shcheklein [mailto:shchekl...@gmail.com]
Sent: Wednesday, June 29, 2011 8:30 PM
To: Robby Pelssers
Cc: sedna-discussion@lists.sourceforge.net; Ivan Lagunov
Subject: Re: [Sedna-discussion] Strange issue when declaring default element 
namespace

Ok, can you send some sample data and demoboards:filterByName(), 
demoboards:getDemoboards() to reproduce this?
On Wed, Jun 29, 2011 at 9:31 PM, Robby Pelssers 
<robby.pelss...@nxp.com<mailto:robby.pelss...@nxp.com>> wrote:
Hi Ivan,

I just tried the following queries and still expect we are dealing with a bug.

import module namespace demoboards= "http://www.nxp.com/demoboards";;
let $results := demoboards:filterByName(demoboards:getDemoboards(), 'adc0')
return <results>{ for $result in $results return 
<id>{$result/DemoboardInformation/Name/text()}</id>} </results>

<results>
  <id>ADC0801S040</id>
  <id>ADC0804S030</id>
  <id>ADC0804S040</id>
  <id>ADC0804S050</id>
  <id>ADC0808S125</id>
  <id>ADC0808S250</id>
</results>

import module namespace demoboards= "http://www.nxp.com/demoboards";;
let $results := demoboards:filterByName(demoboards:getDemoboards(), 'adc0')
return <results  xmlns="http://www.nxp.com";>{ for $result in $results return 
<id>{$result/DemoboardInformation/Name/text()}</id>} </results>

<results xmlns="http://www.nxp.com";>
  <id/>
  <id/>
  <id/>
  <id/>
  <id/>
  <id/>
</results>

From: Ivan Shcheklein [mailto:shchekl...@gmail.com<mailto:shchekl...@gmail.com>]
Sent: Wednesday, June 29, 2011 7:19 PM
To: Robby Pelssers
Cc: 
sedna-discussion@lists.sourceforge.net<mailto:sedna-discussion@lists.sourceforge.net>;
 Ivan Lagunov
Subject: Re: [Sedna-discussion] Strange issue when declaring default element 
namespace

Hi Robby,

The default element namespace declaration influences all unprefixed element 
names. Including all names in XPath: $result/DemoboardInformation/Name/text() 
(I mean DemoboardInformation and Name). If your data doesn't contain namespaces 
at all it's better for you to declare default element namespace right within 
the constructor:

...
return <result xmlns="....">{...}</result>
...

Ivan Shcheklein,
Sedna Team

Hi all,

I am a bit puzzled why the query below returns:

import module namespace demoboards= "http://www.nxp.com/demoboards";;
let $results := demoboards:filterByName(demoboards:getDemoboards(), 'adc0')
return <results>{ for $result in $results return 
<id>{$result/DemoboardInformation/Name/text()}</id>} </results>

<results>
  <id>ADC0801S040</id>
  <id>ADC0804S030</id>
  <id>ADC0804S040</id>
  <id>ADC0804S050</id>
  <id>ADC0808S125</id>
  <id>ADC0808S250</id>
</results>

If I add a default element namespace I still find the same amount of results 
but all expressions are evaluated 'empty'

import module namespace demoboards= "http://www.nxp.com/demoboards";;
declare default element namespace "http://www.nxp.com";;
let $results := demoboards:filterByName(demoboards:getDemoboards(), 'adc0')
return <results>{ for $result in $results return 
<id>{$result/DemoboardInformation/Name/text()}</id>} </results>

<results xmlns="http://www.nxp.com";>
  <id/>
  <id/>
  <id/>
  <id/>
  <id/>
  <id/>
</results>

Am I misunderstanding something here or is this a bug in Sedna?

Kind regards,
Robby Pelssers

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net<mailto:Sedna-discussion@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/sedna-discussion


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Reply via email to