Developers
   Introduction to Brainwave
   Developer's Cheat Sheet
   Grid User Manual
   API Reference Guide
   Brainwave Forum
   Downloads
  Developer Support
   FAQ
   Bug Reporting
   Feature Requests
   Tech Support
  Applications
   Getting Started
   Example Applications
   Application Framework
   Idea Framework
   Iris
   Aphrodite
   Poseidon
   Cerberus

Download Free SDK

Brainwave Academy


 Home
>> Developers >> Application >> Aphrodite

Aphrodite

Aphrodite is the XSLT (stands for Extensible Stylesheet Language Transformation used to convert XML documents to HTML documents so that they can be displayed in the browser ) based Brainwave standard templating system. It provides templates for a specific set of XML tags. These templates are rendered server-side into HTML 4.0 Transitional compliant code compatible in most popular browsers. Currently, it supports IE5+ and FF1.0+ on Windows and Mac. In addition, it is known to work in Safari/Mac but has not been tested and is not supported.

Aphrodite contains a large collection of predefined templates which the developers can use to achieve a variety of tasks without having to code from scratch. For example if the developer needs to use a calendar in his applications then he can simply use our calendar template which will show up a nice looking calendar which can be easily customized and the developer does not have to write the code of the calendar at all.

How does it work?

Aphrodite uses the filtering capabilities of Iris to do XSL transformations on XML into HTML. The filter used is known as Aphrodite and is provided as part of the standard Brainwave distribution. So, when a developer uses a template provided in Aphrodite then that template will be converted to standard HTML codes which will achieve a particular task.

To use Aphrodite in your application, it needs to be integrated with your application. Aphrodite will transform all the templates which have been used in your application. The steps that are followed are that Aphrodite will search for a file in the "resources" folder in your application directory. The file is called "master.xsl". Aphrodite will then look for the template definitions in that file. If the templates are found then it will do the transformation. In case the template is not found in the particular master.xsl file the Aphrodite will search for the same in the "aphrodite.xsl" file of the base platform. In case the template is missing in both these files then an "xmlParseDoc ( ) failed" will be thrown indicating the type of error.


class myapp(App):
	def __init__(self):
		self.aphrodite = aphrodite.Aphrodite('myapp')
		
	def index(self):
		x="<window >Insert more Aphrodite code here...</window>"
		self.aphrodite.document = x
		return self.aphrodite
	index.exposed = True

View Aphrodite Templates and tags
View Complete Brainwave API list