Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Setting xsiSchemaLocation
Setting xsiSchemaLocation [message #1442069] Fri, 10 October 2014 15:15 Go to next message
Peter Johnsen is currently offline Peter JohnsenFriend
Messages: 60
Registered: January 2012
Member
Hi,

Is there a way to programatically setting the schemaLocation of an XMI-file (including the path to the Ecore-file)?
Re: Setting xsiSchemaLocation [message #1442229 is a reply to message #1442069] Fri, 10 October 2014 20:36 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
http://wiki.eclipse.org/EMF/FAQ#How_can_I_ensure_that_an_xsi:schemaLocation_is_serialized_for_my_packages.3F

As of EMF 2.10, you can use an annotation on the EPakcage so that what's
described in the FAQ is generated from this lookup in GenPackageImpl:

public String getSchemaLocation()
{
String schemaLocation = EcoreUtil.getAnnotation(getEcorePackage(),
EcorePackage.eNS_URI, "schemaLocation");
return schemaLocation == null ? "eNS_URI" :
Literals.toStringLiteral(schemaLocation, getGenModel());
}

On 10/10/2014 5:16 PM, Peter Johnsen wrote:
> Hi,
>
> Is there a way to programatically setting the schemaLocation of an
> XMI-file (including the path to the Ecore-file)?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Setting xsiSchemaLocation [message #1444090 is a reply to message #1442229] Mon, 13 October 2014 16:11 Go to previous message
Peter Johnsen is currently offline Peter JohnsenFriend
Messages: 60
Registered: January 2012
Member
Thank you!
Previous Topic:[CDO] Consistency between XMIID and CDOId
Next Topic:Problems with namespaces when saving EMF model as xml file
Goto Forum:
  


Current Time: Thu Apr 25 21:51:38 GMT 2024

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

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

Back to the top