[
Lists Home 
Date Index 
Thread Index
]
One way of thinking about a schema (using "schema" in its generic sense
rather than to refer to WXS, RNG, DTDs etc.) is as defining a possibly
infinite set of document instances. And one way of thinking about a
transformation (again, in its generic sense rather than to refer
specifically to XSLT) is as defining a function from one set of
documents/schema (the domain of the transformation) to another
set/schema (the codomain). Thinking this way we can use functional
notation for transforms, eg.,
t: S1 > S2
saying that transformation t takes members/instances of S1 onto
members/instances of S2.
Now, suppose we want to compose two transforms,
t1: S1 > S2
t2: S3 > S4
to get,
t3: S1 > S4
In general we can only do this if S2 is a subset of S3. However, if the
intersection of S2 and S3 is at least nonempty we can compose a
restriction of t1 with t2, ie.,
where S1' is a subset of S1
and S2' is the image of S1' under t1
and S2' is a subset of S3
we can compose,
t1/S1': S1' > S2'
t2: S3 > S4
to get,
t3/S1': S1' > S4
So far so good. But my question is, how, using the various XML schema
languages, can I specify the restricted schema S1'? I'm fairly sure
that this is straightforward to do in WXS using derivation by
restriction. And I'm sure it can't be done with DTDs (you'd have to
construct a completely new DTD to get the same effect). What I'm not
sure about is whether or not there's any mechanism for this in RNG.
Is there? If not, should there be? Am I right wrt WXS?
Cheers,
Miles
