|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] ID and IDREF and databases
Given that unique IDs in a database are integers, how does one map unique IDs from that database to an ID attribute value type? Is anybody mapping data using ID against database unique identifiers that have integer data types? The solution that comes to my mind that I haven't tried would be to generate rowsets (I'm specifically looking at Order Numbers) and use XSLT to generate ID attributes with letter prefixes from the generated Order elements so that <rowset> <Order_ID>30011</Order_ID> <IO_ID>11111</IO_ID> <rowset> becomes <rowset> <Order_ID io_id="o:11111">30011</Order_ID> <rowset> Maybe my question should be more general. Are there any best practices out there for mapping against databases using DTDs? Even if I use a schema, it seems like the QName constraints on ID makes its use prohibitive without jumping over the hurdle of transformation. I know the thing was probably designed with the DOM in mind, but ID also seems like a perfect candidate for managing primary and foreign key values, if not for this small problem. Maybe I'm missing something here, and it's worth a flame to find out if I am. thanks, Chuck White Author, Mastering XML Premium Edition, Sybex Books (February 2001) Internet Explorer 5 Developer's Guide, IDG Books http://www.javertising.com
|
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
|
|||||||||

Cart








