![]() |
![]() |
![]() |
|
![]() |
|||
![]() |
|||
![]() |
GoLive 6 Dynamic Content Samples | ||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||||||
Main View | How it Works | |||||||
![]() |
||||||||
![]() |
|
This example uses XML data sources to describe the structure of the calendar and provide the information to be displayed as calendar events. Two XML files are used along with an XSLT transform script to join them and create a data format that makes it easy to generate the web page. Calendar.xmlThis file lists dates in the months. It has the following structure: <?xml version="1.0" encoding="UTF-8"?> Note that the top level element is Calendar which contains a series of 12 <Page> elements. Within each <Page> element are 35 <Box> elements each of which represent a calendar box. Some boxes are numbered and some are blank. Events.xmlThis XML file contains elements representing items that should appear in the calendar boxes. The structure of this file is: <?xml version="1.0" encoding="UTF-8"?> Each <Event> element has a Date attribute and a value. Calendar.xslThe XSLT script combines the two XML files and returns a structure similar to a database JOIN of two tables. The resulting structure looks like the Calendar.xml file but includes an added attribute containing the Event value. Calendar XML Data SourceTo use XML content on a page, you need to create an XML datasource that contains information about the structure of the XML file that will be used. This is done in the Site Settings dialog. You fill in the information to access a sample XML file with structure representative of what will later be used on the page. You then expand the display and select xml elements and attributes that you want to use on your page. |