Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Duplicate namespace error importing RuleML
Duplicate namespace error importing RuleML [message #426154] Wed, 17 December 2008 13:27 Go to next message
Geoff Drake is currently offline Geoff DrakeFriend
Messages: 2
Registered: July 2009
Junior Member
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"/>

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

Cheers
Geoff Drake
Re: Duplicate namespace error importing RuleML [message #426162 is a reply to message #426154] Wed, 17 December 2008 14:17 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31164
Registered: July 2009
Senior Member
Geoff,

You asked this on the EMF mailing list too. There I explained that it
looks like these schemas are using redefine which would be better called
ill-define because unless used very carefully redefine tend to produce
bogus results. I.e., if one schema sees the original form but another
schema sees the redefined form then in a final schema that combines the
two, both forms will be seen and will conflict; likely that's what's
happening for you. XML Schema 1.1 deprecates the use of redefine
because it's so poorly defined, so the RuleML people should be
encouraged to provide schemas that don't use it. Sorry.


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"/>
>
> 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
>
> Cheers
> Geoff Drake
>
>
>
Re: Duplicate namespace error importing RuleML [message #426165 is a reply to message #426162] Wed, 17 December 2008 17:39 Go to previous messageGo to next message
Geoff Drake is currently offline Geoff DrakeFriend
Messages: 2
Registered: July 2009
Junior Member
Thanks Ed,

sorry about the duplicate post, I saw your comment 'Please use the EMF
newsgroup for asking questions.' and did not read any further.

This is a problem for us, as we already has a complex schema that uses
RuleML in a lot of places. I am not sure how easy it would be to copy,
then redefine the schema as then of course we are no longer connected to
the original schema and we would have to update our version when the
standard changes.

The XSD is not my area so I will have to take this back to the group that
originally decided to use RuleMl and see where we go from there.

Thanks
Geoff
Re: Duplicate namespace error importing RuleML [message #426166 is a reply to message #426165] Wed, 17 December 2008 18:03 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31164
Registered: July 2009
Senior Member
Geoff,

It should be possible to take redefinitions and simply apply that change
to the original definition. That's how the specification tried to
define the behavior, but the specification also talks about the impact
of redefinition being pervasive without being clear about the "scope" in
which these pervasive changes are visible. Redefinitions are truly
horrible and no matter how hard I try to make them work reasonably, some
other use case comes along with yet another problem, so I've effectively
just given up. I know the Xerces team has a similar opinion on them,
and has similar problems with interpreting them.


Geoff Drake wrote:
> Thanks Ed,
> sorry about the duplicate post, I saw your comment 'Please use the EMF
> newsgroup for asking questions.' and did not read any further.
>
> This is a problem for us, as we already has a complex schema that uses
> RuleML in a lot of places. I am not sure how easy it would be to
> copy, then redefine the schema as then of course we are no longer
> connected to the original schema and we would have to update our
> version when the standard changes.
>
> The XSD is not my area so I will have to take this back to the group
> that originally decided to use RuleMl and see where we go from there.
>
> Thanks
> Geoff
>
>
>
Previous Topic:Find CrossReferences in ResourceSet including unloaded Resources
Next Topic:new generic Datatype not generated properly
Goto Forum:
  


Current Time: Sat Jun 06 06:14:47 GMT 2020

Powered by FUDForum. Page generated in 0.02226 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top