Whats the best way to report this bug ?

 

If I run an ad-hoc query in XCC which returns a single attribute, for
example :

       attribute {"foo"} {"bar"}

 

The resulting item in XCC is reporting itself as an element, but (of
course) wont serialize.

I would like to be able to detect lone attributes for special handling
but I cant because XCC is incorrectly representing them as Elements

 

Example code  fragment:

 

  while (rs.hasNext()) {

     ResultItem rsItem = rs.next();

                        

                          

     ItemType type = rsItem.getItemType();

     XdmItem item = rsItem.getItem();     

     if( (type.isNode() && item instanceof XdmAttribute)  )


                                // FAILS TEST ...  item is an
ElementImpl not an XdmAttribute

 

 

---

item       ElementImpl  (id=62)      

   stream               null         

   stringVal           "bar" (id=73)      

   type                    NodeType  (id=58)          

 

 

 

 

 

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

David A. Lee

Senior Principal Software Engineer

Epocrates, Inc.

[email protected] <mailto:[email protected]> 

812-482-5224

 

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to