All,

Would someone know of a good list to post questions concerning XML
document design?  Maybe some of you might have some comments to add.
Either way, I would appreciate other points of views to my approach.

I'm trying to represent a hierarchical data structure in an XML
document.  In this case I am dealing with geographical regions.  For
example, Solar system could be the root region which contains planets,
open space, etc.  Then next could be planet Earth.  The planet Earth
contains continents and oceans like North American and the Pacific
Ocean.  Then North America contain Canada and United States.  The United
States contains North Carolina, Georgia.  Georgia contains Cobb County,
Fulton County.  Fulton County contains Metro Atlanta.  Metro Atlanta
Contains Buckhead neighborhood.  Etc, Etc, Etc.

So theoretically my Region Path to the High Museum of Art in Atlanta,
Georgia would be:

 \\ High Museum of Art \\ Atlanta \\ Georgia \\ United States \\ North
America \\ Earth \\ Solar System \\ Universe \\ Root

In order to represent this in an XML document I have considered this
approach:

<?xml version="1.0"?>
<region rid="0" regiontype="Root" rcutter="R000">Root
  <region rid="1000" regiontype="astronomical object"
rcutter="U304">Universe
    <region rid="1010" regiontype="astronomical object"
rcutter="S682">Solar System
      <region rid="1001" regiontype="astronomical objects"
rcutter="E010">Earth
        <region rid="300" regiontype="continent" rcutter="N823">North
America
          <region rid="269" regiontype="country" rcutter="F715">United
States
            <region rid="316" regiontype="state (US)"
rcutter="G256">Georgia
              <region rid="1103" regiontype="city"
rcutter="A861">Atlanta
                <region rid="1253" regiontype="museum" rcutter="">High
Museum of Art
                </region>
              </region>
            </region>
          </region>
        </region>
      </region>
    </region>
  </region>
</region>

Here is my concern.  Even though this may be good form, these elements
are of "Mixed Type Elements" in which they contain both PCDATA and
Elements.  I personally would like to stay clear from Mixed type
Elements in an XML document if possible.  This is do to personal
preference and what I read in the book "XML Unleashed" by Michael
Morrison, et al.  that provided disadvantages to using this type of
markup.

I would appreciate another set of eyes to point out the flaws/advantages
in this design.

I do truely appreciate your comments.

Sincerely,
Troy

--
-------------------------
Troy Simpson
  Applications Analyst/Programmer, MCSE, OCP-DBA
North Carolina State University Libraries
Campus Box 7111 | Raleigh | North Carolina
ph.919.515.3855 | fax.919.513.3330
E-mail: [EMAIL PROTECTED]


______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to