[xml] "XML Schema - xsd:union and references to subtypes"


I see a problem if implementing the xsd:union type. In 
"xmlSchemaParseUnion" the value of "memberTypes" is stored in 
"type->ref". A post-parse process should fix the references. But, since 
"memberTypes" can consist of multiple types, I don't know how to store 
them. I cannot put them on the "type->subtypes" chained list, since they 
might be referenced somewhere else as well. I'm aware that, during 
validation, one could parse the "type->ref" and lookup the types 
everytime needed, but this sounds not very performant. Could this design 
be somehow changed to include a struct, acting as a chained list item, 
referencing the schema type? Can you think of an other solution?
Sorry me if I'm totally blind here, and this was already solved - I 
couldn't find anything on this subject.

Regards and a belated happy easter :-)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]