lanky Girl

Archive for December, 2009|Monthly archive page

3.7 Databases

In DITA on December 30, 2009 at 9:19 pm

This week in DITA we have been learning about Databases and the DBMS. The DBMS is used to access structured data efficiently. Previously access to data tended to be quite slow as data was stored on separate files on magnetic strips. There was inconsistency in the formats that each file was stored in and because there was program/data independence any small changes in the data meant the programs had to change.


The introduction of DBMS into companies allowed information to be centralised and easier to share and access amongst departments. Using a DBMS meant that the data was more secure as access was controlled to database administrator.

Relational model

The Relational Model of data is The purpose of the relational model is to provide a declarative method for specifying data and queries: we directly state what information the database contains and what information we want from it, and let the database management system software take care of describing data structures for storing the data and retrieval procedures for getting queries answered. (C0dd, 1970)

Below is a worked example:

Sample Table: empinfo
first last id age city state
John Jones 99980 45 Payson Arizona
Mary Jones 99982 25 Payson Arizona
Eric Edwards 88232 32 San Diego California
Mary Ann Edwards 88233 32 Phoenix Arizona
Ginger Howell 98002 42 Cottonwood Arizona
Sebastian Smith 92001 23 Gila Bend Arizona
Gus Gray 22322 35 Bagdad Arizona
Mary Ann May 32326 52 Tucson Arizona
Erica Williams 32327 60 Show Low Arizona
Leroy Brown 32380 22 Pinetop Arizona
Elroy Cleaver 32382 22 Globe Arizona


Display all columns for people under 25.


SELECT  * from empinfo

WHERE  age >25


3.6 Document Object Model (DOM) and Cascading Stylesheets (CSS)

In DITA on December 30, 2009 at 6:14 pm

This week in DITA we have been focusing on Cascading Style sheets (CSS) and the DOM Document Object Model.

According to W3C “The Document Object Model (DOM) is an application programming interface (API) for valid HTML and well-formed XML documents”. DOM is more of a concept and it stipulates that the documents should be structured hierarchically. It defines the logical structure of documents and the way a document is accessed and manipulated. CSS (cascading style sheets) control the presentation of a web page. CSS was designed so that the content of the document written in HTML could be separated from the style elements such as the layout, fonts and colours.

During our practical lab session we were asked to create a CSS file and use it to change of style of our web pages. Here you can see mine:

Advantages of CSS

  • Improvement in accessibility – when you separate the content from the style you make it easier for those who only want to view the content of the site e.g. visually impaired.
  • Flexibility- because CSS are in separate files it means that making changes to the layout are much more easily done.
  • Consistency – because one style sheet can be applied to many web pages it is easier to make sure that each page of the site looks the same.
  • The speed of which pages can be downloaded will be quicker as the browser cache can store CSS which can be used on multiple pages.

Disadvantages of CSS

  • There seems to be an inconsistency to which CSS is supported by browser.
  • CSS does not work in earlier versions of internet explorer and will only display plain HTML. Unfortunately there is evidence that there are still a few people who still use this browser.

3.5 XML -Extensible Markup Language

In DITA on December 29, 2009 at 7:48 pm

This week in DITA we have been focusing on XML and its relationships with HTML and XHTML.

Simply the difference between XML and HTML is that XML files describe the data and HTML holds the data. XML like HTML is a mark up language but it was created with the purpose to help retain the flexibility whilst reducing its complexity. XML generally came about because of the desire to make HMTL’s vocabulary more fixed.

In comparison with HTML the rules that govern XML files are strict. XML files should be well formed meaning that they conform to the XML syntax rules such as:

  •          All XML elements must have a closing tag. (In HTML this is not always necessary.)
  •          XML tags are case sensitive.
  •          All XML elements must be properly nested.
  •          All XML documents must have a root tag.
  •          Attribute values must always be quoted.

XML files should also be Valid which means which conforms to the rules of a Document Type Definition (DTD). When these rules are not followed they make the XML files unusable while in HTML if they were ignored it would be detrimental. XHTML is HTML reformulated in XML syntax.

One of the benefits of XML is that fact that it allows the content of the document to be separated from the semantic information. In the context of Electronic publishing where different platforms for accessing information ( PDA, PC, ) are used decisions made about presentation can be  left until the documents are delivered thereby aiding interoperability.