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
> [email protected]
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion