How do you add XInclude to a Relax-NG Compact schema?

This should cover W3C XML Schema, Relax NG and DTD related problems.
Zearin
Posts: 107
Location: College Park, MD, United States

How do you add XInclude to a Relax-NG Compact schema?

Tue Nov 18, 2008 11:36 pm

Two part question:


  1. Getting the schema.
    If there's an XInclude schema in existence, where is it? (Or, how would you write one in RNC? I'm sure it would be pretty easy, but I don't trust myself to write it with the highest possible degree of reusability…reusability is vital!)
  2. Using the schema.
    Once I include an XInclude schema in an RNC file, is there a flexible way to say “these are the elements that may be xincluded”, or would I just have to do element |= xi:include a bunch of times?
-- Zearin
sorin_ristache
Posts: 4144

Re: How do you add XInclude to a Relax-NG Compact schema?

Wed Nov 19, 2008 12:26 pm

Hello,

There is no special XInclude schema in RELAX NG. You have to define the xi:include element with attributes and subelements for example in a RELAX NG pattern called xi.include.def and add it to any element definition where xi:include is allowed, something like:

Code: Select all

divisions.def = part.def | reference.def | xi.include.def


Regards,
Sorin

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 1 guest