- Bloglines Image Wall
- Mashups tagged with science
- Elliotte Rusty Harold's XML predictions for 2007
Sunday, 18 February 2007
Hotlinks - week 16
Friday, 16 February 2007
Coursework tips
Icons
Here is the full set of icons which Goggle supply.
See Lecture 16 for an example of its use
Locations
Google Earth will display the location of a point in either decimal degrees or degrees minutes seconds - you can select which in the options.
With GoogleMaps, the lat and long appear in the URL of a place - you may have to zoom in and out to get it to appear in this format.
If your data has locations in degrees, minutes and seconds, you can convert to decimal degrees using the formula
decimal-degrees := degrees + minutes / 60 + seconds /3600
You will have to take account of the direction too. N and E are positive, S and W negative.
Here is the full set of icons which Goggle supply.
See Lecture 16 for an example of its use
Locations
Google Earth will display the location of a point in either decimal degrees or degrees minutes seconds - you can select which in the options.
With GoogleMaps, the lat and long appear in the URL of a place - you may have to zoom in and out to get it to appear in this format.
If your data has locations in degrees, minutes and seconds, you can convert to decimal degrees using the formula
decimal-degrees := degrees + minutes / 60 + seconds /3600
You will have to take account of the direction too. N and E are positive, S and W negative.
Wednesday, 14 February 2007
Week 16 - designing an XML vocabulary, XML Schema
This week we turn our attention to the design of an XML document or documents. We look at designing the schema for a single document using the QSEE case tool to generate XML schema - the top-down route. We also look at a bottom-up approach using trang.
The workshop looks at creating a simple XML document to describe Whisky Distilleries.
The workshop looks at creating a simple XML document to describe Whisky Distilleries.
Saturday, 10 February 2007
Pipes and Filters Architecture
Yahoo have recently launched pipes, a visual programming environment for creating a mashup RSS feed from user inputs and available RSS sources. XML languages for defining pipelines are emerging.
Here are some bloogers on the subject:
Ant is widely used in the Java community as a build tool, but can perform XML pipelining.
To use a pipe architecture, we need component filters to carry out standard transformations.
Here are some bloogers on the subject:
- John Musser (Programmeable Web)
- Tim O'Reilly.
- Fred Stutzman (about the need to change web applications to support fine-grained RSS feeds.)
- TechCrunch
- Kurt Cagle (on XML pipelines)
- Jeni Tennison's Xtech paper is an excellent overview of XML pipelines
- whether the pipeline itself is expressed in XML (and thus processable with XML tools)
- whether non-XML data streams are allowed. For example where an intermediate file is non-XML (e.g. Graphviz dot) or the output is non XML (a GIF image)
Ant is widely used in the Java community as a build tool, but can perform XML pipelining.
To use a pipe architecture, we need component filters to carry out standard transformations.
- Dapper is a tool for scraping HTML pages to create an XML or RSS feed . The neat thing about this tool is that you can give it a number of similar pages and Dapper will try to infer which data items differ page to page, and how to recognise each item. You then name the items you want to scrape and can form these into an HTML, XML or RSS feed.
- RSS or Atom to PDF e.g. BBC Bristol Weather
Thursday, 8 February 2007
Coursework 2
Here is the specification for the second Coursework. This is an individual assignment in which you will build a simple mashup based on GoogleEarth. This brings together the results of workshops in which PHP and SimpleXML is used to transform RSS and generate kml and a basic XML schema and data are developed.
Specification HTML Word
Specification HTML Word
Wednesday, 7 February 2007
Lecture and workshop week 15
In this workshop you will be preparing to create a dynamic overlay for GoogleEarth.
The key learning points are
The key learning points are
- GoogleEarth is extended with user defined overlays, either static or dynamic
- the XML vocabulary is called kml
- a valid kml file needs very few elements to create a minimal file
- the file must have a Mime type of application/vnd.google-earth.kml+xml
- there are geocoding services which will translate a place name to its latitude and longitude
- blog entry on Google Earth
- my wiki entries on Geocoding and Location
- slides
- worksheet
- simple PHP to kml script
Friday, 2 February 2007
Workshop 2 - SimpleXML in PHP
Using the xpath function in SimpleXML in PHP is a bit tricky, so here is how to do the decoding:
Create an XML file like this. called bbcCodes.xml
and these PHP statements do the lookup:
$name = $_REQUEST["name"];
$places = simplexml_load_file("bbcCodes.xml");
$codes = $places->xpath("//Place[name='$name']/code");
print $codes[0];
Here it is running -
This PHP script uses the xpath function which returns an array of SimpleXMLElements (since this match will usually produce a sequence of elements) so you need to pick out the first one (assuming there is only one match)
Create an XML file like this. called bbcCodes.xml
and these PHP statements do the lookup:
$name = $_REQUEST["name"];
$places = simplexml_load_file("bbcCodes.xml");
$codes = $places->xpath("//Place[name='$name']/code");
print $codes[0];
Here it is running -
This PHP script uses the xpath function which returns an array of SimpleXMLElements (since this match will usually produce a sequence of elements) so you need to pick out the first one (assuming there is only one match)
Subscribe to:
Posts (Atom)