The reason why you are getting only the items created or localized in the Publication you specified is because you are basically requesting the following from the system:
- Get me a list of items related to my specified subject as XML
- Constrain results to Components
- Constrain results to specified Publication
What you see is that the shared items are not really available in that Publication. Plus the fact that the Where Used data is not designed to list you contents like shown in a Folder.
To list them via a UsingItemsFilter
, you would have to drop the InRepository
property and then in the results:
- filter out duplicate item IDs
- filter out items from child Publications
- replace the Publication IDs of parent Publications in your context Publication
Number 1 and 3 are relatively easy to do with an XSLT, but for number 2 you would need to have information about the entire BluePrint chain, which is not as easy to get.
The only two other options you have available of getting such a list, is getting a list of all Components in that Publication and filtering that by Schema (which requires multiple calls since the initial list will not give you Schema info), or using a Search query as answered by Eric already.