What was I thinking? 

I had a little time to think about this (American holiday and all :-)
and realize that this is not just bigger than is useful, it's bigger
than is handlable.

There are 461 elements in TEI. If we presume no recursion whatsoever,
to find the number of possible element paths without any schema
restriction we want to calculate the sum of nCr where n=461 and r
goes from 0 to 461. That turns out to be 2 to the power 461 minus 1
possible paths. It barely matters how much I cut that down by
observing that we are only following *schema-permitted* paths, not
all possible paths. Let's say the schema limits the number of paths
by ten orders of magnitude, and reduces n by 1 (since the root must
always be <TEI>).

2**460 / 10**10 is still a *huge* number, over 2.9 * 10**128; if we
presume the results take only 1 byte each, that's still over 35 TiB
of disk space needed to hold the output.

Sigh.


Reply via email to