XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Three ways to organize data

On 3/20/2023 12:02 PM, Roger L Costello wrote:
... The third way is to use the ID-IDREF capability of XML.

<BooksAndWatches>
     <Book id="PLAI">
         <Title>Programming Languages Application and Interpretation</Title>
         <Date>2007</Date>
         <Author idref="SK">Shriram Krishnamurti</Author>
     </Book>
     <Watch id="TimexInd">
         <Brand>Timex</Brand>
         <Model>Indiglo</Model>
         <Power idref="Lit">Battery</Power>
     </Watch>
     <Author id="SK">
         <Name>Shriram Krishnamurti</Name>
         <Employer>Brown University</Employer>
     </Author>
     <Battery id="Lit">
         <Chemistry>Lithium</Chemistry>
         <Volts>3</Volts>
     </Battery>
</BooksAndWatches>
Not so different as the second way, really. id/idref can be thought of as Primary Key/Foreign Key pairs. And the four xml docs of the second way could all be brought into a single XML document as external entities. Or Way #2 could be transformed into Way #3 with an XSLT transformation.




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS