Re: schema in multiple files: trang problems

David Tolpin <[email protected]>
Newsgroups gmane.text.xml.relaxng.general
Message-ID <[email protected]>
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.