On 6 May 2010, at 13:42, Peter Stadler wrote:
> I have some common macro and element definitions which I would like to
> import into different ODD files (with different schemaSpecs).
did you know you can have multiple <schemaSpec> in the same file?
I might solve the problem that way, and using <specGrp>, if the
various ODDs are related
> Right now I have tried these possibilities:
> 1. copy & paste ;-)
> 2a. xincluding every macroSpec separately
> 2b. xincluding a specGrp with the macroSpecs
> 3. modulerefing a relaxNG file with the appropriate definitions
we use a version of 2a for the ODD used for the P5 Guidelines. It says
<xi:fallback> ERROR: cannot locate XInclude ODD elements </xi:fallback>
ie "grab all the elements in the <body> of the file oddity.odd". It works fine,
and I don't see any huge downside. Your 2b would be good too.
Using entity references is another traditional way. Again from the Guidelines
<!ENTITY TitlePageVerso SYSTEM "./TitlePageVerso.xml">
The only downside is that not all XML software groks entities.
(acting) Information and Support Group Manager
Oxford University Computing Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431
Sólo le pido a Dios
que el futuro no me sea indiferente