Wednesday, 12 October 2011

XSLT Assignment 2 (for Informatics students)

Unless you are also studying another Informatics course, you should do the HTML version of this assignment.

If you are doing this XSLT version of the assignment, first use the lab to do some simple experiments with XSLT.

Go to the w3schools xsl page. This provides an environment where you can experiment with XSL. The example given sets up a simple table. You can edit the XML of the XSLT and then click the Edit and Click Me button to see the result.
  1. Instead of a table, construct a bulleted list of entries, with the title in italics followed by the name of the artist.
  2. Try to present the information in different forms.
  3. Now add the price.  Use CSS to precede it by a £ sign.
  4. Try the sorting example from w3schools.
  5. Can you sort the CDs by price instead of by the artist's name?
  6. Try the conditional test example.
  7. Can you just list the CDs from the 1980s?
  8. Now put the xml version of your recipe in the XML box and try to present it by writing appropriate XSLT in the right-hand box.
  9. You should submit your recipe(s) as XML, together with XSL and CSS for presentation.

Notes

Include your matriculation number (student ID) in each file you submit.
In xml and html please include your student id between <!-- and --> inside the top-level tag of your code. For css, please include your student ID between /* and */ at the end of your recipe.css file.
Submit your assignment by email To annette.leonhard@ed.ac.uk Subject: Assignment-IL-1
You will have to edit a number of text files. We recommend TextEdit on the Mac, but you can use any editor that allows you to edit HTML as plain text. To edit files as plain text in TextEdit, go to the TextEdit Preferences (in the TextEdit menu). Select the Plain Text format under the New Document tab, then tick the box for Ignore rich text commands in HTML files, under the Open and Save tab.
For this assignment you have to produce four files (which you can store in a Folder on your Desktop on the Macs in the 3.01 lab).
These files are:

report
A short (max one page) report.
recipe.xml
An XML representation of your recipe.
recipe.html
An XSL transformation to produce the HTML layout of your recipe.
recipe.css
This file should use CSS properties to style your layout. You may find it useful to look at some examples.
Your folder should also include your image(s) and any other files used in your presentation.

Tuesday, 11 October 2011

HTML Assignment 2


  1. Starting again from the contents of your recipe.txt file, mark up your recipe using HTML tags, using the following template:

    <xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <link rel="stylesheet" type="text/css" href="recipe.css" />
    <head>
    <!-- put your student number here -->
    <title>
    ...
    </title>
    </head>
    <body>
    ...
    </body>
    </html>

    The title of your recipe should replace the first ellipsis; the second ellipsis should be replaced by well-formed HTML using the HTML 5 tags.
    The HTML sandpit is set up to process the body of the recipe. So when using this tool just copy the code from the HTML text box to replace the second ellipsis.
  2. Create a file called recipe.css to display your recipe.html file. You can again use the HTML sandpit to experiment, then cut and paste your css code into your text editor so you can save it.
  3. Finally, write a brief report (no more than one page) comparing your experiences with semantic (xml) and presentational (html) markup. You should also report on any problems you had and how you solved them. Save it as report

You should be able to see the results of your work by double-clicking on the recipe.html file. 

Notes

Include your matriculation number (student ID) in each file you submit.
In xml and html please include your student id between <!-- and --> inside the top-level tag of your code. For css, please include your student ID between /* and */ at the end of your recipe.css file.
Submit your assignment by email To annette.leonhard@ed.ac.uk Subject: Assignment-IL-1
You will have to edit a number of text files. We recommend TextEdit on the Mac, but you can use any editor that allows you to edit HTML as plain text. To edit files as plain text in TextEdit, go to the TextEdit Preferences (in the TextEdit menu). Select the Plain Text format under the New Document tab, then tick the box for Ignore rich text commands in HTML files, under the Open and Save tab.
For this assignment you have to produce four files (which you can store in a Folder on your Desktop on the Macs in the 3.01 lab).
These files are:

report
A short (max one page) report.
recipe.xml
An XML representation of your recipe.
recipe.html
An HTML representation of the layout of your recipe.
recipe.css
This file should use CSS properties to style your layout. You may find it useful to look at some examples.
Your folder should also include your image(s) and any other files used in your presentation.

Power Peering

Some content providers are national or global operators. They don’t need to connect via Tier 1. They have Tier 2 peering agreements. 
But those who control the access networks control access to consumers. “Why,” they ask, “should we pay transit charges to tier 2?”  If they want access to our customers, they should pay us. 
So they see themselves as higher in the pecking order than the content providers – and, although they are already charging their customers for internet access, they also want to charge the content providers for access to these customers.

A logical outcome of such exploitation of a monopoly over customer ‘eyeballs’ would be to reverse some of the flows of cash through the hierarchy of ISPs.

Dr Peering gives an excellent account of one example (involving Comcast, Level3 and Netflix):
http://drpeering.net/AskDrPeering/blog/articles/Ask_DrPeering/Entries/2011/9/6_Access_Power_Peering.html


PC World see a danger here:

Comcast Toll on Netflix Screams for Net Neutrality


Comcast fired the net neutrality "shot heard round the world" when it throttled BitTorrent peer-to-peer networking traffic. 
http://www.pcworld.com/businesscenter/article/211964/comcast_toll_on_netflix_screams_for_net_neutrality.html


Comcast see it slightly differently
http://blog.comcast.com/2010/11/10-facts-about-peering-comcast-and-level-3.html
and other weigh-in to support them
http://www.digitalsociety.org/2010/11/level-3-outbid-akamai-on-netflix-by-reselling-stolen-bandwidth/

The latter piece is by George Ou, whose independence has been called into question elsewhere:
http://www.roughlydrafted.com/2007/08/24/zdnets-george-ou-exposed-as-ignorant-microsoft-shill-zoon/

It comes from "Digital Society" a 'think tank' funded by Jon Henke, and Arts+Labs which is itself funded by Viacom, NBC Universal, AT&T, Broadcast Music, Inc. (BMI), Verizon, Auditude, Microsoft,
Songwriters Guild of America, Jib Jab, Blue Pixel, Cisco,  and the American Society of Composers, Authors and Publishers (ASCAP).

Monday, 10 October 2011

Trusting Information on the Internet


Man pays $200,000 to save fake girlfriend in online scam

http://m.techspot.com/42583/

How far should you trust the information that you’re getting on the internet?
http://www.thefifthestate.com.au/archives/28546


A Thought Police for the Internet Age
http://www.counterpunch.org/2011/09/28/the-dangerous-cult-of-the-guardian/

Use and abuse of the Internet

Internet is easy prey for governments

Some of us might like to believe that the genie is out of the bottle and that we all have access to an unstoppable decentralized network. In reality, the internet is entirely controlled by large corporations and central authorities.
http://edition.cnn.com/2011/OPINION/02/05/rushkoff.egypt.internet/


Secret Orders Target Email

The U.S. government has obtained a controversial type of secret court order to forceGoogle Inc. and small Internet provider Sonic.net Inc. to turn over information from the email accounts of WikiLeaks volunteer Jacob Appelbaum, according to documents reviewed by The Wall Street Journal.
http://online.wsj.com/article/SB10001424052970203476804576613284007315072.html

Egypt’s Internet shutdown

We are following the current events in Egypt with concern as it appears that all incoming and outgoing Internet traffic has been disrupted. The Internet Society believes that the Internet is a global medium that fundamentally supports opportunity, empowerment, knowledge, growth, and freedom and that these values should never be taken away from individuals.

http://isoc.org/wp/newsletter/?p=3091

Anonymity and the Dark Side of the Internet


'I wrote a book titled “There’s No Such Thing as Free Speech and It’s a Good Thing, Too.” This book could be titled “There is Such a Thing as the Free Unregulated Internet and It’s a Bad Thing, Too.”'
http://opinionator.blogs.nytimes.com/2011/01/03/anonymity-and-the-dark-side-of-the-internet/

The next Digital Decade
The book's 31 essays address questions such as: Has the Internet been good for our culture? Is the Internet at risk from the drive to build more secure, but less “open” systems and devices? Is the Internet really so “exceptional?” Has it fundamentally changed economics? Who—and what ideas—will govern the Net in 2020? Should online intermediaries like access providers, hosting providers, search engines and social networks do more to “police” their networks, increase transparency, or operate “neutrally?” What future is there for privacy online? Can online free speech be regulated? Can it really unseat tyrants? The book is now available as a free downloadable PDF and for purchase in hardcover.

Wednesday, 28 September 2011

Basic skills 28 September 2011

Before starting on this week's exercise, which is an introduction to assignment 2, you should make sure you are set up to use the Macs in the lab, and check that you can complete some simple tasks.

If you have got this far you have already logged in and are using a browser. If you're not confident about any of the following four tasks, work through this exercise before starting on Lab 2:
  1. Copying and saving text from a web page
  2. Opening an html file in a browser
  3. Editing and modifying an html file
  4. Commenting to give us feedback

Copying and saving text from a web page

  • Open the TextEdit application. This will open a blank document.
  • In the Format menu select Make Plain Text
  • Copy the text below from the web and paste it into your TextEdit document.
    <!DOCTYPE HTML>
    <html>
        <head>
            <title>HTML Hello World</title>
        </head>
        <body>
            <h1>Hullo!</h1>
            <div>
                <img src="http://bit.ly/b1PFic" 
                     alt="Hello World!" />
            </div>
            <h2>h2 heading</h2>
            <p>This is our HTML sample code. 
               It shows several elements:
            </p>
            <ul>
                <li>The html document block.</li>
                <li>The head, which contains 
                    the title of the page.</li>
                <li>The body, 
                    which contains the content.</li>
                <li>An h1 and an h2 header.</li>
                <li>An image.</li>
                <li>A paragraph.</li>
                <li>An unordered list.</li>
            </ul>
        </body>
    </html>
    
  • Did you select Make Plain Text in the Format menu? – If not, do it now!
  • Save the TextEdit document – call it "something.html". (If you are asked whether you want to use ".html" or ".txt", the answer is ".html".)

Opening an html file in a browser

  • Now make a new browser window.
  • Use Open File from the browser File menu to open the document you just saved.

Editing and modifying an html file

  • Edit the document in the TextEdit window.
  • Save it.
  • Reload the page in the browser window.

Commenting to give us feedback

  • Please leave us a comment, using the Comment button below.
  • Comments are moderated so your comment won't appear immediately, but we will read it.
  • Let us know if anything was too hard or too easy.

Laboratory Exercise 2: Data on the web – semantic markup

For this assignment we want you learn to mark up information with semantic tags. The work you do will also contribute, in due course, to your second assignment.

What to do:

  1. Create a folder to store your work.
    Name it snnnnnn-IL-1, where snnnnnn is replaced by your student ID.
  2. Type (or cut and paste) a recipe (find one on the web) into a text editor.
    Save it as a plain text file named recipe.txt.
  3. Find a suitable image to illustrate your recipe, and save it to your folder.
  4. Mark your recipe up with semantic tags using the XML sandpit – or do it by hand.
    Using a text editor, insert your xml code in place of the ellipsis
    ...
    in the following template

    <xml version="1.0" encoding="utf-8"?>
    <recipe>
    <!-- put your student number here -->
    ...
    </recipe>


    Your code should consist of properly nested XML, using the tags used in class together with your own tags for any additional components.
    Save your marked-up recipe as a plain text file recipe.xml.