OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   ID and IDREF and databases

[ Lists Home | Date Index | Thread Index ]
  • From: Chuck White <chuckwh@pacbell.net>
  • To: xml-dev@lists.xml.org
  • Date: Wed, 27 Dec 2000 19:23:25 -0800

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

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



<Order_ID  io_id="o:11111">30011</Order_ID>

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.

Chuck White
Author, Mastering XML Premium Edition, Sybex Books
(February 2001)
Internet Explorer 5 Developer's Guide, IDG Books


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS