Overview

The schema consists of a few actual XSD files and is generated from a few different sources. This makes the generation a bit confusing.

Using an already generated schema should be easy: just keep the three XSD files together and use xul.xsd for validation and other needs.

The two main sources are:

  1. refall_elemref.xml—Neil Deakin's XUL Elements Reference in XML format. The list of elements and supported attributes and descriptions is generated from it.
  2. xulstructure.xml (included in the package)—Structural information based on work by Franklin de Graaf on XULMaker's schema.

The resulting schema is split across a few different files:

  1. xul.xsd—The main file you should specify whenever you need the schema. It is the only resulting file that's not generated, and it contains license and basic usage information. At this moment it just includes other, generated, files, but it can also be used to provide additional schema definitions, if needed.
  2. xulplanet.xsd—Provides definitions and descriptions for XUL elements, attributes, values and types. Generated from the XUL Reference.
  3. xulstructure.xsd—Provides information on element types, and what valid content for a given element is. Generated from xulstructure.xml.

Step-by-step guide

  1. Get the XUL Elements Reference in XML format (refall_elemref.xml)
  2. Remove redundant data from it by processing the file with strip_elemref.xsl stylesheet. Name the resulting file xulplanet.xml.
  3. Run the xulplanet2schema.xsl stylesheet on xulplanet.xml, save result as xulplanet.xsd.
  4. Run the xulstructure.xsl stylesheet on the xulstructute.xml file to get xulstructure.xsd.
  5. Put xulplanet.xsd, xulstructure.xsd and xul.xsd files in the same directory. Use xul.xsd.

Why is it so confusing