relax-ng empty named pattern

A

Andy Chambers

Hi All,

Is there a way to define an empty named pattern? Here's the use-case.

I'm trying to use relax-ng to specify an extendable schema.
Basically, people should be able to tack on whatever they like to a
core set of elements/attributes provided their extensions are in a
different namespace.

It would be nice if I could split it up into

core.rnc
ext-1.rnc
ext-2.rnc

so that a final schema could be made from just doing

include "core.rnc"
include "ext-2.rnc"

which would allow elements/attributes from ext-2 but not ext-1.

I thought I could do this by adding the named pattern "extension" to
each element defined in core.rnc. ext-1 etc could then redefine
extension accordingly.

If there's a better a way to accomplish similar goals, I'd be
interested in hearing them too.

Cheers,
Andy
 
M

Magnus Henriksson

Andy said:
Hi All,

Is there a way to define an empty named pattern? Here's the use-case.

I'm trying to use relax-ng to specify an extendable schema.
Basically, people should be able to tack on whatever they like to a
core set of elements/attributes provided their extensions are in a
different namespace.

It would be nice if I could split it up into

core.rnc
ext-1.rnc
ext-2.rnc

so that a final schema could be made from just doing

include "core.rnc"
include "ext-2.rnc"

which would allow elements/attributes from ext-2 but not ext-1.

I thought I could do this by adding the named pattern "extension" to
each element defined in core.rnc. ext-1 etc could then redefine
extension accordingly.

If there's a better a way to accomplish similar goals, I'd be
interested in hearing them too.

Cheers,
Andy

Have you read http://books.xmlschemata.org/relaxng/relax-CHP-12.html?

// Magnus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top