[7.4] XML marshalling: key / keyRef

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[7.4] XML marshalling: key / keyRef

jtuchel
Hello there,

now that my anyCollection problem seems to be solved, I stumbled right into the next one...

I seem to have problems with key/keyRefs it seems that a keyRef reference only works when it is part of an xml element and not an xml attribute. But then it results in technical attributes (id=" and href=) instead of business values as keys and references.

Again, things look really good when writing objects to xml but unmarshaling the resulting xml back to objects results in nil's instead of the referenced objects.

Is there any way of referencing objects by some of their attributes instead of technical hrefs? Is this only a 7.4 related bug and do things work in 7.5?

we currently seriously consider implementing our own sax drivers instead of using the XML object bindings because it takes a hell lot of time to play with the bindings just to find out they don't work the way they are documented (if they are documented at all)...

regards

Joachim

Reply | Threaded
Open this post in threaded view
|

re: [7.4] XML marshalling: key / keyRef

Maarten Mostert-2

Hi Joachim,

Notice that if all you want to do is to serialise and deserialise objects you can use SIXX which is excellent and simple for these things (But then that might not be the case).

Rgrds,

@+Maarten,

> Message du 23/07/07 16:05

> De : [hidden email]
> A : [hidden email]
> Copie à :
> Objet : [7.4] XML marshalling: key / keyRef
>
> Hello there,
>
> now that my anyCollection problem seems to be solved, I stumbled right into the next one...
>
> I seem to have problems with key/keyRefs it seems that a keyRef reference only works when it is part of an xml element and not an xml attribute. But then it results in technical attributes (id=" and href=) instead of business values as keys and references.
>
> Again, things look really good when writing objects to xml but unmarshaling the resulting xml back to objects results in nil's instead of the referenced objects.
>
> Is there any way of referencing objects by some of their attributes instead of technical hrefs? Is this only a 7.4 related bug and do things work in 7.5?
>
> we currently seriously consider implementing our own sax drivers instead of using the XML object bindings because it takes a hell lot of time to play with the bindings just to find out they don't work the way they are documented (if they are documented at all)...
>
> regards
>
> Joachim
>
>
>
Reply | Threaded
Open this post in threaded view
|

RE: [7.4] XML marshalling: key / keyRef

Kogan, Tamara
In reply to this post by jtuchel
> I seem to have problems with key/keyRefs it seems that a keyRef
reference
> only works when it is part of an xml element and not an xml attribute.
But
> then it results in technical attributes (id=" and href=) instead of
> business values as keys and references.

See the attached sample with key/keyref references. Is that sample
helpful?

>
> Again, things look really good when writing objects to xml but
> unmarshaling the resulting xml back to objects results in nil's
instead of
> the referenced objects.

Can you send your test case? I'll take a look.

>
> Is there any way of referencing objects by some of their attributes
> instead of technical hrefs? Is this only a 7.4 related bug and do
things
> work in 7.5?

The key/keyref mapping was created to resolve object identities by
specified keys.

Tamara


Key KeyRef Mapping.zip (928 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [7.4] XML marshalling: key / keyRef

jtuchel
Tamara,

thank you very much for helping. It turned out that this key/keyRef
stuff works as I expect it to in 7.5 but didn't work in 7.4. So I guess
there's not much use in looking into this any deeper...

Jochim


Kogan, Tamara schrieb:

>> I seem to have problems with key/keyRefs it seems that a keyRef
> reference
>> only works when it is part of an xml element and not an xml attribute.
> But
>> then it results in technical attributes (id=" and href=) instead of
>> business values as keys and references.
>
> See the attached sample with key/keyref references. Is that sample
> helpful?
>
>> Again, things look really good when writing objects to xml but
>> unmarshaling the resulting xml back to objects results in nil's
> instead of
>> the referenced objects.
>
> Can you send your test case? I'll take a look.
>
>> Is there any way of referencing objects by some of their attributes
>> instead of technical hrefs? Is this only a 7.4 related bug and do
> things
>> work in 7.5?
>
> The key/keyref mapping was created to resolve object identities by
> specified keys.
>
> Tamara
>


--
-------------------------------------------------------------------
Objektfabrik Joachim Tuchel          mailto:[hidden email]
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1