Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » New XML file wizard and schemaLocation
New XML file wizard and schemaLocation [message #895327] Thu, 12 July 2012 09:05 Go to next message
Eclipse UserFriend
Hi all,

Our developers are using the WTP new XML file wizard to create their XML files. In the wizard, they select XSDs from the XML catalog to get validation and content assistance. These XSDs are declared in eclipse plugins we provide (extension point).

The file generated by the wizard is like that:
<abc:configuration
   xmlns:abc="http://www.mycompany.com/configuration"
   xmlns:xsi="..."
   xsi:schemaLocation="http://www.mycompany.com/configuration jar:file:/c:/eclipse/plugins/com.mycompany.configuration_1.0.0.201207121023.jar!/model/configuration.xsd"
>...


The problem is that the schema location expressed this way is no portable at all
- it includes the complete jar file name with version and qualifier.
- it includes the eclipse installation path

Because of that, validation and content assist doesn't work anymore if we update the plugins or change the eclipse installation path. The workaround is to remove the schemaLocation entry or replace the jar URI by a platform URI manually, but we don't find this very user friendly since developers create dozens of xml files per day.

Is there any way to impact the way the XML file is generated?

Thanks for any help you could provide,
Maxime
Re: New XML file wizard and schemaLocation [message #895448 is a reply to message #895327] Thu, 12 July 2012 21:17 Go to previous messageGo to next message
Eclipse UserFriend
Can you append the content of your plugin.xml?
Re: New XML file wizard and schemaLocation [message #895494 is a reply to message #895448] Fri, 13 July 2012 05:24 Go to previous messageGo to next message
Eclipse UserFriend
Here is an example:

   <extension
         point="org.eclipse.wst.xml.core.catalogContributions">
      <catalogContribution>
         <public
               publicId="http://www.mycompany.com/configuration"
               uri="platform:/plugin/com.mycompany.configuration/model/configuration.xsd">
         </public>
      </catalogContribution>
   </extension>

Re: New XML file wizard and schemaLocation [message #895790 is a reply to message #895494] Mon, 16 July 2012 00:42 Go to previous messageGo to next message
Eclipse UserFriend
I admit I'm not very familiar with this part of our code base. It seems to work as you want when I select a catalog entry we ship in the org.eclipse.jst.standard.schemas plug-in; perhaps studying its plugin.xml will be of help.
Re: New XML file wizard and schemaLocation [message #895847 is a reply to message #895790] Mon, 16 July 2012 05:53 Go to previous message
Eclipse UserFriend
using "uri" extension element instead of "public" extension element solves my problem. Thanks for the tip.
Previous Topic:JSDT "Open Declaration" NOT WORKING for JsDoc "hints". OK if type is inferred. A
Next Topic:Unabel test Web Service with Web Service Explorer
Goto Forum:
  


Current Time: Mon Jul 07 15:04:34 EDT 2025

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

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

Back to the top