relax-ng empty named pattern

Discussion in 'XML' started by Andy Chambers, Feb 27, 2008.

  1. 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
     
    Andy Chambers, Feb 27, 2008
    #1
    1. Advertising

  2. Andy Chambers wrote:
    > 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
     
    Magnus Henriksson, Feb 27, 2008
    #2
    1. Advertising

  3. On 27 Feb, 14:44, Magnus Henriksson
    <> wrote:
    >
    > Have you readhttp://books.xmlschemata.org/relaxng/relax-CHP-12.html?


    I hadn't seen that. Thanks very much.

    --
    Andy
     
    Andy Chambers, Feb 27, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jari Kujansuu
    Replies:
    0
    Views:
    830
    Jari Kujansuu
    Sep 4, 2003
  2. James McComb
    Replies:
    1
    Views:
    397
    Bob Foster
    Nov 20, 2003
  3. Pieter
    Replies:
    6
    Views:
    451
    Pieter
    Nov 28, 2003
  4. Morten W. Petersen
    Replies:
    0
    Views:
    460
    Morten W. Petersen
    Feb 2, 2004
  5. Geert

    RELAX NG text constraint

    Geert, Dec 4, 2004, in forum: XML
    Replies:
    0
    Views:
    432
    Geert
    Dec 4, 2004
Loading...

Share This Page