I have been thinking about this, but it is tricky to do: it breaks our "binding should not require validation" rule (it's true that we would only do it if requested), so it felt to me like one of those big effort/ not so big reward things, esp since there is the XPath workaround available. Also, no other binding solution, to my knowledge, supports this.
 
Radu


From: Alex Soto [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 09, 2006 7:47 AM
To: user@xmlbeans.apache.org
Subject: Re: accessing key objects via keyrefs

Ok i understand what you means now. I found the same problem some time ago, i because i couldn't find a way, i choose xpath option.

I wish someone else could gave his opinion.

El dj 09 de 03 del 2006 a les 15:36 +0000, en/na DM va escriure:
Hi,

Thanks for your response. I don't see home XPath will help me. I'm really just asking whether
XMLBeans contains built-in support for retrieving a referenced object. The reference is defined in
the schema using an xs:keyref which refers to an xs:key.

Cheers,
Don

--- Alex Soto <[EMAIL PROTECTED]> wrote:

> If i understand your problem you could do using an XPATH _expression_. See
> xpath tutorial in xmlbeans page. Remeber to add Saxon jar to classpath.
> 
> El dj 09 de 03 del 2006 a les 15:08 +0000, en/na DM va escriure:
> 
> > Hi, 
> > 
> > My XML docs contain a bunch of elements that look like this:
> > 
> > <mp-group id="cddv">
> >   <monitored-property key="count" label="count"/>
> >   <monitored-property key="duration" label="duration"/>
> > </mp-group>
> > 
> > and another bunch of elements that look like this:
> > 
> > <service-type mp-group-ref="cddv">
> > 
> > The "mp-group-ref" attribute is defined as a keyref, which points to an <mp-group> (the "id"
> > attribute of the the latter is defined as a key).
> > 
> > Is there any way using XMLBeans to retrieve the object pointed to by a keyref? In other words,
> > given a ServiceType, is there any way I can easily retrieve the referenced MpGroup? Of course
> I
> > could store all the MpGroups in a Map, which I could then lookup using the mp-group-ref value,
> but
> > is there an easier way....? I'm using version 2.1.0.
> > 
> > Thanks in Advance,
> > Don
> > 
> > 
> > 		
> > ___________________________________________________________ 
> > To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.
> http://uk.security.yahoo.com
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> La información contenida en el presente e-mail es confidencial y está reservada para el uso
> exclusivo de su destinatario. Se prohíbe estrictamente la distribución, copia o utilización de
> esta información sin el previo permiso de su destinatario. Si usted no fuera el destinatario,
> por favor notifíquelo inmediatamente al remitente y elimine el presente mensaje de su sistema
> informático.
> 
> Information contained in this e-mail is confidential and is intended for the use of the
> addressee only. Any dissemination, distribution, copying or use of this communication without
> prior permission of the addressee is strictly prohibited. If you are not the intended addressee,
> please notify the sender immediately by reply and then delete this message from your computer
> system.
> 



		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

La información contenida en el presente e-mail es confidencial y está reservada para el uso exclusivo de su destinatario. Se prohíbe estrictamente la distribución, copia o utilización de esta información sin el previo permiso de su destinatario. Si usted no fuera el destinatario, por favor notifíquelo inmediatamente al remitente y elimine el presente mensaje de su sistema informático.

Information contained in this e-mail is confidential and is intended for the use of the addressee only. Any dissemination, distribution, copying or use of this communication without prior permission of the addressee is strictly prohibited. If you are not the intended addressee, please notify the sender immediately by reply and then delete this message from your computer system.

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

Reply via email to