Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [emf-dev] Duplicate namespace error importing RuleML

Geoff,

Please use the EMF newsgroup for asking questions.
news://new.eclipse.org/eclipse.tools.emf

Geoff Drake wrote:
I am trying to create a model by import an XSD schema.  This has some
references to parts of RuleML and gives errors on the target namespace
for these.  Does any one know how I can get around these problems?

The snippet of the XSD I am trying to import is:

<?xml version="1.0" encoding="UTF-8"?>
<!-- IST-CONTRACT project Contract Schema version 2.2 -->
<xs:schema
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:fol="http://www.ruleml.org/0.91/xsd"
    xmlns:ist="http://ist-contract.org/schema/ISTContract"
    targetNamespace="http://ist-contract.org/schema/ISTContract">
     
    <xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
    <xs:import schemaLocation="http://www.ruleml.org/0.91/xsd/folog.xsd"
               namespace="http://www.ruleml.org/0.91/xsd"/>
    <xs:import
schemaLocation="http://www.ruleml.org/0.91/xsd/modules/connective_module.xsd"
              namespace="http://www.ruleml.org/0.91/xsd"/>
    
    <xs:element name="Contract" type="ist:Contract"/>
    
..... etc ........


The lines that seem to cause the error are:
    <xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
    <xs:import schemaLocation="http://www.ruleml.org/0.91/xsd/folog.xsd"
               namespace="http://www.ruleml.org/0.91/xsd"/>
    <xs:import
schemaLocation="http://www.ruleml.org/0.91/xsd/modules/connective_module.xsd"    
               namespace="http://www.ruleml.org/0.91/xsd"/>
  
It's okay to have multiple imports of the same namespace.  But I see these schemas use redefines which are unspeakably evil and so ill defined, in my opinion as to be effectively unimplementable; that's why they've been deprecated in XML Schema 1.1 and why I've never been able to fully implement them.
 
I can see that these are duplicate namespaces, but I cannot see how I
can get around this.  If I change the namespace to something else other
parts of the ruleML import fail.

I cannot cut/paste the error message from the error message box,so here
is a manually copied example:

Error: XSD: The attribute group may not have a duplicate name and target
namespace 'http://www.ruleml.org/0.91/xsd#And-inner.attlist' : URI
platform:/resurce/ContractSchema/ISTContract.xd Line2 Column 58
  
Convince the ruleml people to define their schemas once and only one, not define them and then redefine them with the hope that any tool in the known universe will understand what redefine actually means. It's a misguided hope.  If they want to redefine things, make a copy and change it.
Cheers
Geoff Drake


_______________________________________________
emf-dev mailing list
emf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/emf-dev
  

Back to the top