开发者

Abstract Superclass and association in XML

开发者 https://www.devze.com 2023-03-05 06:47 出处:网络
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 bidirec

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

精彩评论

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