XML files with missing namespace/schema [message #879460] |
Thu, 31 May 2012 05:14  |
Eclipse User |
|
|
|
Hi everyone,
I have a particular sapphire model that declares the following for the XML info:
@XmlNamespace( prefix = "", uri = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" )
@XmlSchema( namespace = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd", location = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" )
@XmlBinding( path = "portlet-app" )
If an existing XML file has all of these values set properly there is no problem. However, if there is a file that looks like this:
<portlet-app>
</portlet-app>
Sapphire is unable to open this model and the editor just shows edit part. The problem is that in my multi-page editor (masterdetails and source) the user can't even edit in the source or continue.
Debugging the code I see why it can't open the file as it doesn't know how to operate without the schema information. Is there a way to let sapphire model know that if the binding-path matches but the namespace and schema locations are null the defaults could be used in their absence?
Another question would be if there would be a way to let the model fail as it is now and it only disable the masterdetails page and not kill the whole editor in the case of a multi-page editor (SapphireEditorForXml).
Appreciate any thoughts on this matter.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04552 seconds