Rohit,

I am not aware of any standards methods for doing what you want to do. You could create an xml file that mapped the associations between your elements (and use it to join your queries), however the general idea of having the same tags in different languages is, to be honest, somewhat backwards and not how xml was intended to be used.

A suggestion:

Use xslt to normalize all your files to use the same tag names so that it correctly conforms to a schema, and add @xml:lang attributes to signify language.

If you have no control over the xml and you cannot transform it, you will have to create another xml file to hold relations and join based on that, but this can be tricky and the file could get unwieldy depending on the number of permutations you have.

Cheers,

Casey


On Thu, Jan 27, 2011 at 12:06 AM, Rohit Jain (MT2010118) <rohit.jain@iiitb.org> wrote:
@Jordan

it was just for example , structure of document may or may not be similar
for example consider in a same document both tags are present having same meaning but belongs to different language,

<contents>
      <Datos>Datos en Inglés</Datos>

      <data> data not similar to above, but still tags means the same <data>
</contents>

now if query something like this

doc("file.xml")/contents/data or doc("file.xml")/contents/Datos

i should get both the result as both data and Datos means the same but just in different language

@Loren

i was considering no control over xml file, but still ok if i enforce the use if xml:lang tag then how could i make use of it to solve the issue i mentioned above.
________________________________________
From: Loren Cahlander [loren.cahlander@gmail.com]
Sent: Thursday, January 27, 2011 8:01 AM
To: Casey Jordan
Cc: Loren Cahlander; Rohit Jain (MT2010118); exist-development@lists.sourceforge.net
Subject: Re: [Exist-development] multi lingual XQuery support in eXist

You should use the attribute xml:lang in the tag.

Please check out Best Practices for XML Internationalization
http://www.w3.org/TR/2008/NOTE-xml-i18n-bp-20080213/

Loren

On Jan 26, 2011, at 5:47 PM, Casey Jordan wrote:

Rohit,

Is the schema for each of the three files the same? So they are structurally identical?

An example would be helpful, something like:

<contents>
    <data>Data in english</data>
</contents>

<contents>
    <data>Datos en Inglés</data>
</contents>

with the query you want to run and the results you want to see.

Cheers,

Casey

On Wed, Jan 26, 2011 at 12:20 PM, Rohit Jain (MT2010118) <rohit.jain@iiitb.org<mailto:rohit.jain@iiitb.org>> wrote:
Hey,

is it some way in which we can support multi lingual query in eXist database, to explain clearly,,, suppose i have a collection of 3 XML files containing same data but in different language.
Suppose all 3 have a element common in them suppose "data" so if i Query for "data" in 1 language it should gives me result from all files that may be containing "data" but in some other language also.

So is there some other way in which we can extend eXist to support such Query and in some way make our database capable of such problems.
It might not be related to eXist but we are planning to implement it for eXist database so just looking for some guidance and if eXist doesn't supports it then what could be few suggestions for this and what API and other tools we can use to accomplish this task.

Thank You,
Rohit Jain
IIITB
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Exist-development mailing list
Exist-development@lists.sourceforge.net<mailto:Exist-development@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/exist-development



--
--
Casey Jordan
Jorsek Software LLC.
"CaseyDJordan" on LinkedIn, Twitter & Facebook
Cell (585) 348 7399
Office (585) 239 6060
Jorsek.com<http://Jorsek.com>


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d_______________________________________________
Exist-development
mailing list
Exist-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-development




--
--
Casey Jordan
Jorsek Software LLC.
"CaseyDJordan" on LinkedIn, Twitter & Facebook
Cell (585) 348 7399
Office (585) 239 6060
Jorsek.com


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.