Creating XML Taxonomies - What Are Our Needs?
(Page 2 of 4 )
For starters, we are going to create our categories. After that, we will focus on breaking them down into subcategories. From this point on we will refer to the categories as the parent and the subcategories as the child.
First though, we need to define what our root is. Our root, in this instance, is going to be what we are selling, which is, for lack of a better word, albums. We could make the root the singular version, album. But we must remember that a customer could buy more than one album from us in a transaction. Therefore, we will use albums as the root.
In real life if we were going to create a taxonomy, we would speak to the owner of a company, look at their files, speak to the people creating the program that will eventually process our XML, look at receipts of previous transactions, and take into account all of the possible data that we might want to write reports based off of. We would then trim this data down into what we truly need.
For instance, if we sold grape juice, we wouldn’t need to know the color of the juice being sold, as we could already assume that it's purple, and having the color probably would have no bearing on our business.
We could also look for pre-written taxonomies. Pre-written taxonomies exist to create a common thread through a given industry. The SEC (Securities and Exchange Commission), for instance, has a set of taxonomies in place that help ensure when a company submits filings such as quarterly reports, 8-Ks, and annual reports, that all of the information is in compliance with the standards they have set forth. This in turn allows companies that aggregate or gather that information to be able to do so in a simple manner.
For our purposes, however, we are going to create our own. After all, a major reason we are using XML is to define our own data and not be limited by someone else's.
Next: Our Parents >>
More XML Tutorials Articles
More By James Payne