开发者

Abstract Superclass and association in XML

let's say we have an abstract superclass "Animal" as ComplexType in XML-Schema with "Cat" and "Dog" as subclasses. And we have a 开发者_运维问答class "Zoo". Is it possible to create a bidirectional association between Animal and Zoo via IDREF ? How? Can someone show me a short example for it?


Did you mean IDREF? An IDREF says nothing about what kind of element it is referring to, so putting IDs and IDREFs in Animal and Zoo solves your problem trivially. If you want a reference mechanism that points to specific element types, you need to use key and keyref.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜