X consists of symbols. A symbol is a variable, object prototype, object property, object method or function.
Previously, X was defined as a set of symbols where each identifier began with a lower-case 'x'. XC 1.0 frees us from that limitation. Now X symbols can be any legal Javascript identifier. X is now defined by a set of x_symbol XML elements. The id attribute of x_symbol specifies the identifier for the symbol. The only requirement is that each symbol's id be unique within the library.
When I wrote the xAnimation object I wanted its animation methods to be separate compilation units (modules). When I first designed XC and the X structure I did not plan on having symbols of type 'method' or 'property'. So here is how I've handled this: Symbols of type 'method' must have id = objectName.methodName, and symbols of type 'property' must have id = objectName.propertyName. This satisfies the requirement that all symbol ids be unique but presents XC with a challenge. To see how XC handles this refer to the XC Reference.
Each symbol is completely defined by two files: an XML file and a Javascript source file.
For every X symbol there must be an XML file with an x_symbol root element. For convenience the name of the XML file is the symbol identifier in all lower-case.
The XML file provides the symbol's actual identifier, the location of the Javascript source file, a list of dependencies, complete usage documentation, revision history, author copyright, license statement, and more. In /templates/ you will find an x_symbol_template.xml file.
With the release of XC 1.0 there is now no requirement for the name of the Javascript source file. It can be any legal filename. For convenience the filenames are all lower-case. Also, multiple symbols (multiple XML files) can have their sources in the same Javascript file (but XC will include the entire source file in the ouput even if only one of the symbols is used in the application code).
The Javascript source file should begin with the following, standard header. If you are the author you should use your own copyright info. I do not require copyright assignment for code contributions to X. For "[your URL]" please provide the URL to your web-site. I never make your email addresses publically available.
// [symbol identifier], Copyright [your date] [your name] ([your URL]) // Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL
Please only use 'text' files with no special characters.
Please don't use tabs - use spaces for indentation.
Implicit statement termination is not supported. For more information see the XC Reference.
I am proud to include your contribution in the official X distribution - but it is your responsibility to document, test and maintain your function or object.