Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Problems with the FAQ about xsi:schemaLocation
Problems with the FAQ about xsi:schemaLocation [message #424368] Fri, 24 October 2008 22:47 Go to next message
Ben is currently offline BenFriend
Messages: 46
Registered: July 2009
Member
Hi,

My schema location is not been serialized because ePackage.getNsURI() is
not different from ePackage.eResource().getURI(). So, I followed the
instructions in the FAQ, however, it still not been serialized.

Is there anything else that I now need to change in EMF 2.4? Thanks!

http://wiki.eclipse.org/index.php/EMF/FAQ#How_can_I_ensure_t hat_an_xsi:schemaLocation_is_serialized_for_my_packages.3F
Re: Problems with the FAQ about xsi:schemaLocation [message #424370 is a reply to message #424368] Sat, 25 October 2008 11:07 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Ben,

No, that should be sufficient, which leads me to conclude there's
something you've not done quite right. Set a breakpoint in
XMLSaveImpl.addNamespaceDeclarations and verify that things like
declareSchemaLocation are true and check later in that method that this
guard is being passed.

URI uri = resource.getURI();
if (javaImplementationLocation != null || (uri == null ?
nsURI != null : !uri.toString().equals(nsURI)))


Ben wrote:
> Hi,
>
> My schema location is not been serialized because ePackage.getNsURI()
> is not different from ePackage.eResource().getURI(). So, I followed
> the instructions in the FAQ, however, it still not been serialized.
> Is there anything else that I now need to change in EMF 2.4? Thanks!
>
> http://wiki.eclipse.org/index.php/EMF/FAQ#How_can_I_ensure_t hat_an_xsi:schemaLocation_is_serialized_for_my_packages.3F
>
>
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Problems with the FAQ about xsi:schemaLocation [message #424434 is a reply to message #424370] Sun, 26 October 2008 04:33 Go to previous messageGo to next message
AJ  is currently offline AJ Friend
Messages: 77
Registered: July 2009
Member
Hi Ed,

declareSchemaLocation is true, however, it does not reach the line below
because packages.length is 0.

if (javaImplementationLocation != null || (uri == null ? nsURI != null :
!uri.toString().equals(nsURI)))


So, how can I populate package?


Thanks!
Re: Problems with the FAQ about xsi:schemaLocation [message #424435 is a reply to message #424434] Sun, 26 October 2008 11:42 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Ben,

To me this implies that there are no xmlns declarations on your root XML
element. Is that right? I'm having a hard time imagining how you
could serialize an instance without having used at least one package. Is
a null namespace package involved? Even in that case, I imagine the
package should still be in the list...


Ben wrote:
> Hi Ed,
>
> declareSchemaLocation is true, however, it does not reach the line
> below because packages.length is 0.
>
> if (javaImplementationLocation != null || (uri == null ? nsURI != null
> : !uri.toString().equals(nsURI)))
>
>
> So, how can I populate package?
>
>
> Thanks!
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:The generic type associated with the 'EEList' classifier ...
Next Topic:Using EditingDomainActionBarContributor in a view
Goto Forum:
  


Current Time: Thu Apr 25 00:40:43 GMT 2024

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

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

Back to the top