problem with the instances

Hi,

I got a problem with the instances: I have defined the schema with Schema Editor and it’s OK. Then with Tamino Interactive interface I load the instance and it’s ok too.
So I tried to make a query with X-Query and also with XQUERY but I got no result: I mean, if I query input() (with XQUERY) or * (with X-QUERY) I find the whole instance, but if I query anything else (the root or any other element)I got no response.

Is there someone that can helm me ?

Thank you.

Hi,

your question is too vague. We don’t know how well you know XQuery and if you are not making a mistake in your queries.

Why don’t you post a sample XQuery that doesn’t work for you, along with an instance, and then someone will be able to help you out.

Peter Endisch

---------------------------------------
I’m a Zen Garden Maintenance Engineer
---------------------------------------

Thank you for the reply.

This is the instance:



dc:descriptionWorkspace della sede principale di Roma</dc:description>


dc:identifierString</dc:identifier>

… and so on.

This is the simple query (with XQUERY):

input()//workspace

I tried with a lot of queries but the only one I receive response is input().

I tried also with X-QUERY :

workspace
/workspace
/workspace/identifier
//folder

but only with * I gave a response.

Can you help me?

Thank you.

Hi Gennaro

your problem is related to namespaces - in this case especially default namespace usage:

(1) XQuery: use something like

declare namespace p = “www.dmsml.com
input()/p:workspace

Afaik, XQuery does not allow for default namespace declarations,
hence you must use the explicit prefix.

(2) X-Query:
general rule: the prefix used in your schema counts!
if you used the default namespace also in the schema, you must _define a collection
object like
<tsd:collection name=“myCollection”
xmlns:tsd=“http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition
xmlns:p=“www.dmsml.com”/>
e.g. using the Tamino Interactive Interface.
Then _xql=p:workspace should work (_delete as well).
For details you may search the Tamino 4.1.x documentation:
(Unfortunately, there is a bug in the navigation, hence, it is not
really straightforward to find the relevant section)
Tamino XML Server Documentation/Special Topics
> XML Namespaces in Tamino
> Next: “Introduction”
> Next: “Namespaces in Tamino 4.1”

Search for section "Namespace Context of a Doctype"

Hope that helps
Uli

Thank you Ulrich Post: your reply has solved my problem.

Bye