EXAMPLES

There are some example schemas in schema-examples

TOOLS

These are tools to expand an RNG (Relax NG) schema. Expansion is 
the process of replacing any <ref> elements with the content of
the define element they refer to. The schema must be expanded before
you can use it with Alexandra (this may change in the future).

First copy the schema to a file named input.rng

Run expand.sh in the background e.g.

    ./expand.sh &
    
This will generate a sequence of file, 01.xml, 02.xml, ...

Keep an eye on the file sizes, using

    ls -ltr

If your schema has a finite depth, it's expandable, and the file
sizes will level off at a value larger than the original before
the script finishes. If the file sizes keep increasing exponentially
you should kill the expand.sh process. That indicates that your
schema doesn't have a finite depth, and it contains a ref/define
loop. It's also known as a transitive loop. Currently, 
Alexandra doesn't support that.

At the end of succesfully running expand.sh, you should see something
like this:

ref count in input.rng is 
38
ref count in 14.rng is 
0

The important thing is that the last number is 0. If it is, then the
expansion successfully converted all refs into actual terminating
elements.

Now, take the final output of expand.sh, and rename it to whatever 
you like. This will be the file that AxKit sees as the source 
document for the Alexandra stylesheets.
