8:15 session
What
XML allows us to separate content from design even much more than HTML and CSS.
XML is extensible for all types of data. Unlinke HTML, XML’s purpose is to organize data.
XML is…
- containment – all data is contained within a tag structure
- an organization of data – uses tags to organize information
- user-defined tags – once sets of data have been defined, those tags can be shared among ppl for a common vocabulary. XHTML and RSS feeds are both examples of XML vocabularies. The epub format is another example.
- display independent – it does NOT describe how data is supposed to be displayed.
XSL
- It is a XML processing language
- It is a stylesheet for XML
- It describes output
XML + XSL = a file that can be read by browsers. However, even better would be to go from from XML + XSL to XSLT, which is a transformation engine. Using XSLT, you can output to HTML or any other number of formats.
Why
XML lets you…
- Repurpose content – rather than live database hits from your website, you can export data as xml + xsl to get html. Unless you’re amazon or ebay, you probably don’t have data that changes every second. Even if you update your xml every 5 minutes, that’s taking a big load off your database. From there, you can use different xsl to display that xml dataset in different ways. Summarize it on one page, detail on another, etc.
- Template control – the usage of xsl lets you change the entire presentation of data instantly, just as with css
- multi-file output – you can use the xslt engine to generate anything from csv, to web page, to PDF, etc.
When (to use it)
XML & XSL vs HTML & CSS – XSL is not the same as CSS. Use CSS everywhere, use XSL when you can.
Consider where you have data, such as faculty info, course info, calendar info, events, rss feeds, etc. If info only exists–and only needs to exist– on a web page then XML may be redundent
3 practical uses of XML
- RSS feeds – dropping external feeds into your web page. You can sort it, filter it, etc.
- course listings – think of all the way this data could be reused, repurposed if you had access to xml data dumps
- faculty/staff listsings – this could save a lot of database load by moving this to xml.
No comments yet.