[relaxng-user] schema in multiple files: trang problems

David Tolpin dvd at davidashen.net
Tue Dec 2 01:44:53 ICT 2003


> 2) In my schema design, all modules define elements and attributes in the default namespace, and the driver file includes them in a namespace with the "inherit" keyword. It looks like:
> 
> namespace myns = "http://mynamespace"
> include "module1.rnc" inherit = myns
> include "module2.rnc" inherit = myns 
> ...
> 
> However, after the translation into XML syntax the resulting RNG files (driver and modules) have all grammars, elements and attributes defined in the default namespace. It seems that trang ignores the namespace definition in my RNC driver file.
> 
> I tried with a driver file like this:
> 
> default namespace = "http://mynamespace"
> include "module1.rnc"
> include "module2.rnc"
> ...
> 
> And it happens the same. Any workarround for this?

Looking at the trang's source, there must be something that triggers addition of a namespace.
The following should work:

namespace myns = "http://mynamespace"
bar = element myns:bar {empty}
include "module1.rnc" inherit = myns

David


More information about the relaxng-user mailing list