Suppose that I have an XML schema that includes some schema types that are abstract (as well as some schema types that provide concrete implementations of the abstract types). Now assume that I'm using the Xerces C++ API to build a DOM (xercesc::DOMDocument) for a schema type from my schema that happens to be abstract. I will construct the element structure and content appropriate for a concrete implementation of that abstract type. What I don't understand is: how does the DOM "know" the concrete type implementation that I built?
To put this another way, if I were to write XML that does the same thing
described above, I'd have something like the following:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SomethingThatIsAbstract xmlns="." xsi:type="ConcreteImplementorA" .>
<!-internal elements, etc. representing the structure of
ConcreteImplementorA -->
</SomethingThatIsAbstract>
There does not appear to be anything in the API that allows for the
specification of the "type" when creating an element. How does this work?
Thanks,
Joe Gagnon
Engineer II
Group 53 - Secure Resilient Systems and Technology
MIT Lincoln Laboratory
Lexington, MA
smime.p7s
Description: S/MIME cryptographic signature
