[relaxng-user] combining schemas

Bruce D'Arcus bdarcus at fastmail.fm
Wed Nov 26 05:53:54 ICT 2003


On Nov 26, 2003, at 1:55 AM, Eric van der Vlist wrote:

>> In this example, if remove the namespace prefix from the declaration
>> and the included elements, I get an "unknown element" error on the
>> extension element.
>
> What do you mean?

That nxml mode then says that the extension element is "unknown."  
Moving the declaration to the biblio-notes element solves that issue 
though.

>> Finally, as I recall nxml mode normally automatically completes the
>> namespace declaration.  it does not do so in this circumstance.  Is
>> this likely a limitation of nxml, or a problem in my definition?
>
> Your definition looks good.

OK thanks.  Will look into it more.

I'm now going through and cleaning up the mods schema.  Can someone 
suggest how I might simplify the below?  This is the 
auto-generated-from-the-XML-Schema stuff:

anyType =
   mixed {
     (attribute * { text }
      | element1)*
   },
   empty

and:

element0 =
   element * {
     mixed {
       (element0
        | attribute * { text })*
     }
   }

element1 =
   element * {
     mixed {
       (attribute * { text }
        | element1)*
     }
   }

The patterns get used throughout like so:

     | element displayForm { anyType }

I wonder if I can just eliminate those patterns and replace them with 
simply "text." My goal is a clean RNG schema, but also one fully 
compatible with the XML Schema, so I'm just being careful here.

Bruce



More information about the relaxng-user mailing list