[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: database primary keys in XML Schema
The publisher of the XML document understands the XSD (schema). The publisher already has access to the XSD so the publisher understand what the keys are. The same is true for parser and consumer. The publisher does not specify the key, just populates the data in the document. Everybody in the system understands the keys by the XSDs. Sounds like you want to specify the key in the XML document and not just the XSD. We decided against that approach. By including a version for each XML document we ensure compatibility just incase the keys change in the future. Dave
David, thanks for the code. > > Here is the XSD. Notice the KEY element with the min and max occurs. That > > tells our parser what the key is for this message. Our database staging > tables have them marked as keys. > If I understand your schema correctly, the XML instance document creator has to specify the key for the XML document when he creates the XML document, is that correct? How does he know the proper database key? Or is my understanding wrong? Thanks again, Markus -- Markus Seibold ------------------------------ Krebsgasse 6 D-93047 Regensburg Germany ------------------------------ Email: markus.seibold@g... Phone: +49 (941) 504 1009 Mobile: +49 (171) 212 6869 FAX: +49 (89) 1488 210457
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|