Discussion:
[Exist-open] distinct-attribute-names function return ""
林晓东
2017-05-06 08:22:16 UTC
Permalink
hi,all , when I using function distinct-attribute-names, but I got some return like "", why?




--

ŽËÖÂ

easy

Ī³îǰ·ÎÞÖªŒº£¬ÌìÏÂË­È˲»Ê¶Ÿý¡£
林晓东
2017-05-07 01:21:25 UTC
Permalink
develop version, windows, jdk1.8,


node with no attribute will return "", is reasonable?




--

ŽËÖÂ

easy

Ī³îǰ·ÎÞÖªŒº£¬ÌìÏÂË­È˲»Ê¶Ÿý¡£

ÔÚ 2017-05-06 16:22:16£¬"ÁÖÏþ¶«" <***@126.com> ÐŽµÀ£º


hi,all , when I using function distinct-attribute-names, but I got some return like "", why?




--

ŽËÖÂ

easy

Ī³îǰ·ÎÞÖªŒº£¬ÌìÏÂË­È˲»Ê¶Ÿý¡£
Joe Wicentowski
2017-05-07 01:57:48 UTC
Permalink
Hi Xiaodong,

I'm not familiar with this function. Are you talking about this one?

http://www.xqueryfunctions.com/xq/functx_distinct-attribute-names.html

Looking at the code for this function, I would not expect an empty string
as a result.

Joe
Post by 林晓东
develop version, windows, jdk1.8,
node with no attribute will return "", is reasonable?
--
歀臎
easy
莫愁前路无知己倩䞋谁人䞍识君。
hi,all , when I using function distinct-attribute-names, but I got some
return like "", why?
--
歀臎
easy
莫愁前路无知己倩䞋谁人䞍识君。
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
https://lists.sourceforge.net/lists/listinfo/exist-open
--
Sent from my iPhone
林晓东
2017-05-08 15:10:52 UTC
Permalink
right,
node with no attribute will back ""





--

ŽËÖÂ

easy

Ī³îǰ·ÎÞÖªŒº£¬ÌìÏÂË­È˲»Ê¶Ÿý¡£


ÔÚ 2017-05-07 09:57:48£¬"Joe Wicentowski" <***@gmail.com> ÐŽµÀ£º

Hi Xiaodong,


I'm not familiar with this function. Are you talking about this one?


http://www.xqueryfunctions.com/xq/functx_distinct-attribute-names.html


Looking at the code for this function, I would not expect an empty string as a result.


Joe


On Sat, May 6, 2017 at 9:23 PM ÁÖÏþ¶« <***@126.com> wrote:



develop version, windows, jdk1.8,


node with no attribute will return "", is reasonable?




--

ŽËÖÂ

easy

Ī³îǰ·ÎÞÖªŒº£¬ÌìÏÂË­È˲»Ê¶Ÿý¡£


ÔÚ 2017-05-06 16:22:16£¬"ÁÖÏþ¶«" <***@126.com> ÐŽµÀ£º


hi,all , when I using function distinct-attribute-names, but I got some return like "", why?




--

ŽËÖÂ

easy

Ī³îǰ·ÎÞÖªŒº£¬ÌìÏÂË­È˲»Ê¶Ÿý¡£












------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
Exist-open mailing list
Exist-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open

--

Sent from my iPhone
Joe Wicentowski
2017-05-08 15:31:20 UTC
Permalink
Can you give a reproducible example?
Post by 林晓东
right,
node with no attribute will back ""
--
歀臎
easy
莫愁前路无知己倩䞋谁人䞍识君。
Hi Xiaodong,
I'm not familiar with this function. Are you talking about this one?
http://www.xqueryfunctions.com/xq/functx_distinct-attribute-names.html
Looking at the code for this function, I would not expect an empty string as a result.
Joe
Post by 林晓东
develop version, windows, jdk1.8,
node with no attribute will return "", is reasonable?
--
歀臎
easy
莫愁前路无知己倩䞋谁人䞍识君。
hi,all , when I using function distinct-attribute-names, but I got some
return like "", why?
--
歀臎
easy
莫愁前路无知己倩䞋谁人䞍识君。
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
https://lists.sourceforge.net/lists/listinfo/exist-open
--
Sent from my iPhone
--
Sent from my iPhone
林晓东
2017-05-09 00:40:50 UTC
Permalink
import module namespace functx = "http://www.functx.com" at "/db/system/repo/functx-1.0/functx/functx.xql";

functx:distinct-attribute-names(<HDSD00.01.02><row/></HDSD00.01.02>)






--

ŽËÖÂ
easy

Ī³îǰ·ÎÞÖªŒº£¬ÌìÏÂË­È˲»Ê¶Ÿý¡£


ÔÚ 2017-05-08 23:31:20£¬"Joe Wicentowski" <***@gmail.com> ÐŽµÀ£º

Can you give a reproducible example?


On Mon, May 8, 2017 at 11:11 AM ÁÖÏþ¶« <***@126.com> wrote:

right,
node with no attribute will back ""





--

ŽËÖÂ

easy

Ī³îǰ·ÎÞÖªŒº£¬ÌìÏÂË­È˲»Ê¶Ÿý¡£


ÔÚ 2017-05-07 09:57:48£¬"Joe Wicentowski" <***@gmail.com> ÐŽµÀ£º

Hi Xiaodong,


I'm not familiar with this function. Are you talking about this one?


http://www.xqueryfunctions.com/xq/functx_distinct-attribute-names.html


Looking at the code for this function, I would not expect an empty string as a result.


Joe


On Sat, May 6, 2017 at 9:23 PM ÁÖÏþ¶« <***@126.com> wrote:



develop version, windows, jdk1.8,


node with no attribute will return "", is reasonable?




--

ŽËÖÂ

easy

Ī³îǰ·ÎÞÖªŒº£¬ÌìÏÂË­È˲»Ê¶Ÿý¡£


ÔÚ 2017-05-06 16:22:16£¬"ÁÖÏþ¶«" <***@126.com> ÐŽµÀ£º


hi,all , when I using function distinct-attribute-names, but I got some return like "", why?




--

ŽËÖÂ

easy

Ī³îǰ·ÎÞÖªŒº£¬ÌìÏÂË­È˲»Ê¶Ÿý¡£












------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
Exist-open mailing list
Exist-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open

--

Sent from my iPhone
--

Sent from my iPhone
Dannes Wessels
2017-05-09 19:22:22 UTC
Permalink
please mention more details, like *how* do you run the query? when providing more info upfront, you get your answer much quicker, and saves us a lot of time;

My assumption is: the query is executed in eXide, in adaptive mode.

rewritten as "empty(functx:distinct-attribute-names(<HDSD00.01.02></HDSD00.01.02>))” it looks like that indeed not an empty string is returned
 digging deeper, "<HDSD00.01.02><a/></HDSD00.01.02>//@*/name(.)” does not return an empty sequence either.

according to Saxon (OxygenXML) the result is indeed not OK...
import module namespace functx = "http://www.functx.com <http://www.functx.com/>" at "/db/system/repo/functx-1.0/functx/functx.xql";
functx:distinct-attribute-names(<HDSD00.01.02><row/></HDSD00.01.02>)
Dmitriy Shabanov
2017-05-10 11:23:53 UTC
Permalink
Post by Dannes Wessels
please mention more details, like *how* do you run the query? when
providing more info upfront, you get your answer much quicker, and saves us
a lot of time;
My assumption is: the query is executed in eXide, in adaptive mode.
rewritten as "empty(functx:distinct-attribute-names(<HDSD00.01.02></HDSD00.01.02>))”
it looks like that indeed not an empty string is returned
 digging deeper,
sequence either.
according to Saxon (OxygenXML) the result is indeed not OK...
You are not right here: https://www.w3.org/TR/xpath-functions-30/#func-name

"If the argument is supplied and is the empty sequence, the function
returns the zero-length string."
--
Dmitriy Shabanov
Loading...