How does XSLT mapper behave when duplicate namespaces defined for different Schema (xsd files)

How does XSLT mapper behave when duplicate namespaces defined for different Schema (xsd files)

book

Article ID: KB0077568

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition 5.3 and later versions

Description

You can define different schemas with same namespace and both used to be available for selection in XSLT mapper. This was working properly in older BE versions (5.1.x). In current versions only first schema is loaded and the second schema with same namespace is not loaded/available (ignored) for use in XSLT mapper. Thus the XSLT mapper shows errors in Event.createEvent() for Events using the schema that was not loaded.
 
eg:
Namespace for both schema files same even though different fields and schema structure: "http://www.tibco.com/schemas/SampleBECode/Schema.xsd"

User-added image 
User-added image

Issue/Introduction

Not able to access second schema in Event payload, when namespace for both schema same

Environment

All Operating Systems

Resolution

To be able to access and use both schemas with same namespace update “ BE_HOME/studio/eclipse/studio.ini” and add below property as a vmarg and restart Studio.
 
-Dschema.conflictingNS.ignore=true

User-added image

User-added image

Note:
At runtime below warning is reported on startup of the agent when duplicate namespaces defined in project.
<timestamp> <host> Warning [main] - [studio.core] xsd element "request" with target namespace "<namespace>" is already registered at location "file:///<xsdFileLocation>". The resource at location "<xsdFileLocation>" will be ignored.

We recommend avoiding the usage of duplicate namespaces for different schema.
 

Additional Information