X Library Structure

x_symbol

X consists of symbols. A symbol is a variable, object prototype, object property, object method or function.

X is 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.

Symbols that are object methods must have id = objectName.methodName, and symbols that are object properties must have id = objectName.propertyName.

Each symbol is completely defined by two files: an XML file and at least one Javascript source file.

The x_symbol XML 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 (and alternate files), a list of dependencies, complete usage documentation, revision history, and more. In /templates/ you will find an x_symbol_template.xml file.

x_symbol.groups

The groups node can contain one or more grp nodes. Valid values for a grp node are: Animation, DOM, Debug, Event, Image, Iteration, Misc, Position, Size, String, Style, Table, UI or Window.

x_symbol.type

Valid values for the type node are: Var, Object, Property, Method or Function.

The x_symbol Source File

Most X symbol identifiers begin with a lower-case 'x' but it is not required. Each symbol's source code is in its own file. 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 do not use tabs - use spaces for indentation.

Please do not use implicit statement termination.

 

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.

X Documentation

X Library Viewer - View documentation, source code, revision history and more for all X symbols.

X Quick-Start - Getting started with the X Library.

X Tutorial - Collapsible/expandable sections.

X Structure - Describes how an X symbol is defined by an xml and js file.

X Tools - Summary and revision history for the X build tool chain.

XAG Reference - X Library Aggregator.

XPP Reference - General Purpose Text Preprocessor.

Search

Cross-Browser.com

World Wide Web

Tech Support

Forum support is available at the X Library Support Forums.

License

By your use of X and/or CBE and/or any Javascript from this site you consent to the GNU LGPL - please read it. If you have any questions about the license, read the FAQ and/or come to the forums.