Skip to content

Week 12 XML Review

November 17, 2009
by

This week was truly bi-modal in that 1/2 the class seemed to run with the assignment and 1/2 were baffled and did odd things which signalled a complete lack of understanding of the basics of what an element is, and what an attribute is…from my POV it means I didn’t do a good enough job as a teacher and the next class who gets this assignment will get a slightly different presentation (my apologies to all who suffered, but I was very lenient in grading this aspect of the homework).

But just to revisit, in the lecture where I show this example:

<parent> (root element)
<child>
<grandChild0 att0=”req”>object aspect 0</grandChild>
<grandChild1 att1=”opt”>object aspect 1</grandChild1>
<grandChild2 att2=”opt”>object aspect 2</grandChild2>
<grandChild3 att3=”opt”>object aspect 3</grandChild3>
</child>
<child>
<grandChild0 att0=”req”>object aspect 0</grandChild>
<grandChild1 att1=”opt”>object aspect 1</grandChild1>
<grandChild2 att2=”opt”>object aspect 2</grandChild2>
<grandChild3 att3=”opt”>object aspect 3</grandChild3>
</child>
<child>
<grandChild0 att0=”req”>object aspect 0</grandChild>
<grandChild1 att1=”opt”>object aspect 1</grandChild1>
<grandChild2 att2=”opt”>object aspect 2</grandChild2>
<grandChild3 att3=”opt”>object aspect 3</grandChild3>
</child>
</parent>

The << att3=”opt” >> parts are fake examples (as are all of the above; that example was given to show the student what the minimum document tree should contain).  About half the students used these exact “fake” attributes, including the “opt” or “req” part. This would be OK if the DTD defined the attribute; one student actually used the DTD to define !ATTLIST some_element att #REQUIRED which is legal, but still makes no sense from a data model standpoint.

Elements and attributes are related in the sense that the element contains the data, and the attribute contains the metadata. A good example is the <a> element in XHTML, the content of the HREF attribute is the physical location on a server of a document described between the 2 <a></a> element pieces. The ALT attribute of an <img> element is similar, in the case of the <img> element it has only metadata (attributes) because it is an “EMPTY” element like the <meta> or  <link> elements.

Even though it might appear this is confined to just XML and coding adventures, understanding metadata and its role in information collections is a gigantic part of LIS and is something all students who have successfully passed LIBR 202 should know in a deep and instinctive way. If this subject is still mysterious, I recommend some refresher study before attempting the ePortfolio.

Advertisements
No comments yet

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: