Feb 2008
         xml-hr.com        
Practical XML for HR Departments            
Home
Let's start with something visual, then add a little complexity.  Take a look at the blue rectangle immediately to the left and let's describe 'what it is'.
1) It's 'blue', but to be more accurate, it is a specific color -> #66CCFF.2) The upper left corner is at an (x,y) position.  For simplicity, lets say that the upper left is at (0,0) -- the x,y axis.3) Next, we know that it has a certain size.  In this case, it is a square with sides of 2 cm each, but still a rectangle.4) If we call the white 'page area' a Layout, we could say that the layout is 17.33 cm wide x 12.06cm high.
At first glance, that is what we 'know', but we actually know more and can plan ahead for 'stuff' we may want to add later.  We also know that:
1) We can see it, so Visible = True2) The rectangle doesn't have a border, so let's say that border = 0.3) We can't see through the rectangle, so it has an 'alpha' of 100.4) Most likely it is being viewed with a browser that has a dpi of 96.5) The white layout (background) is white which is a color of #FFFFFF.  Seems obvious, but let's describe it in full.6) We may as well call that white background something.  Body works.7) We're making our own rules but UTF-8 is a 'standard' so we'll use that.  We'll need it for the text in the next lesson.  
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><layout version="3.0" dpi="96" generator="GYRE"><part visible="true" type="body" height="12.06" width="17.33" author="" pageheight="12.06" backcolor="#FFFFFF" datasourceid="0" datasourcename=""> <object type="rectangle" name="rectangle_1" height="2" width="2" y="0" x="0" fillstyle="1" fillcolor="#66CCFF" bordercolor="#000000" bordertype="0" alpha="100" thickness="0" /></layout>
So, if we 'rewrite' the information about the rectangle - and - make our own 'rules' on how to describe it, we could say that the rectangle - in xml =
8) Now we'll plan ahead for a few more items that may become useful later, author, datasourceid and name (in case there was HR employee data), bordertype (inside, outside or middle), and thickness of the border.  We almost forgot that.
Note that we are only going to detail those items that we think may become useful in the future. Since they may become useful - but 'aren't there' - we'll put a '0'.
That's enough for one, boring lesson.  Next week, we'll add some text to the rectangle and a bit more.  The best part is coming.  You won't have to type any of the above.  All you'll need to do is draw the rectangle.
This page is Valid, Strict XHTML & created on line with Younicycle, a Division of HR Communications.
Please wait...