Skip to main content



      Home
Home » Modeling » EMF » Problems with the FAQ about xsi:schemaLocation
Problems with the FAQ about xsi:schemaLocation [message #424368] Fri, 24 October 2008 18:47 Go to next message
Eclipse UserFriend
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 07:07 Go to previous messageGo to next message
Eclipse UserFriend
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
>
>
>
>
>
Re: Problems with the FAQ about xsi:schemaLocation [message #424434 is a reply to message #424370] Sun, 26 October 2008 00:33 Go to previous messageGo to next message
Eclipse UserFriend
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 07:42 Go to previous message
Eclipse UserFriend
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!
>
Previous Topic:The generic type associated with the 'EEList' classifier ...
Next Topic:Using EditingDomainActionBarContributor in a view
Goto Forum:
  


Current Time: Sat Jul 05 06:31:26 EDT 2025

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

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

Back to the top