Umbraco XSLT

Transforms and the CMS

Xslt is the CPU of an umbraco website. Umbraco stores Content separately from the mechanics of Presentation. Content is stored as Xml, in a series of elements corresponding to the contents and their doctypes. Document types (aka Content types) have properties. The content documents are available as high-level nodes in the site Xml, and their properties are defined and set there as well.

This All Just Means You Have An Excellently Marked-up Set of Data Ready to Parse and Present

Xslt is the global standard for parsing (transforming) Xml. So, umbraco uses the Xslt as a souped-up query/script language, ready to return all News Iems or all Blog Posts, or all posted between noon and 3pm or whatever.

Xslt and XPath Form A "Turing Complete" Language In and Of Themselves

Xslt may be complete, but this list of features is not. Just think of Xslt as, for the most part, fetching and displaying in Html whatever bit of data is called for. For example, a Template might want Xslt to take the nodeName (of whatever document is being rendered) and form a <title> tag for the <head> of the <html>.

Another way is in the Content section of the UI with a Richtext Editor (TinyMCE3). Both Templates and edited content have an Insert macro button available. This Macro calls the corresponding Xslt, which could fetch and make a thumbnail of an image for the content.

Content is comprised of Documents of a certain type. Documents have templates (masterpages) to define the outline of the Html. Both Content and Templates can insert Macros. Macros (typically) call Xslt snippets to transform the current document xml (content) into rendered content (with all the html tags and everything lined up).

Check XHTML  «  feebdack.com  Copyright ©  Xander Lih  2000-2009   »  Check CSS