Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Is it possible to manually specify schema to use for XML for wst xml editor?
Is it possible to manually specify schema to use for XML for wst xml editor? [message #659838] Tue, 15 March 2011 18:35 Go to next message
Max Mising name is currently offline Max Mising name
Messages: 54
Registered: September 2010
Member
Basically I have an application that allows for editing of xml files. These xml files are generated using jaxb. We have a schema file that was generated from the jaxb context that we can use for content assistance but the only way I can get it to work is to manually add an attribute in the root element that specifies the location of the xsd to use. So our xml when generated looks like this:

<rootTag>
       <someObject xsi:type="objectTypeA" attributA="something">
                <someOtherElemet attributeB="anything"/>
       </someObject>
 </rootTag>


By default edting this xml file, I get no content assistance, but if I change it to this in the editor, I get content assistance.

<rootTag xsi:noNamespaceSchemaLocation="/some/path/to/schema.xsd">
       <someObject xsi:type="objectTypeA" attributA="something">
                <someOtherElemet attributeB="anything"/>
       </someObject>
 </rootTag>
 


Does anyone know of any settings where I can specify the default noNamespaceSchemaLocation to use?

Thanks

Max
Re: Is it possible to manually specify schema to use for XML for wst xml editor? [message #659853 is a reply to message #659838] Tue, 15 March 2011 19:16 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26088
Registered: July 2009
Senior Member
Max,

I think WTP has some type of registry in which you can specify which
namespaces map to which schema location. If you can't find it in the
preferences, please ask about in on the WTP newsgroup/forum.


Max wrote:
> Basically I have an application that allows for editing of xml files.
> These xml files are generated using jaxb. We have a schema file that
> was generated from the jaxb context that we can use for content
> assistance but the only way I can get it to work is to manually add an
> attribute in the root element that specifies the location of the xsd
> to use. So our xml when generated looks like this:
>
>
> <rootTag>
> <someObject xsi:type="objectTypeA" attributA="something">
> <someOtherElemet attributeB="anything"/>
> </someObject>
> </rootTag>
>
>
> By default edting this xml file, I get no content assistance, but if I
> change it to this in the editor, I get content assistance.
>
>
> <rootTag xsi:noNamespaceSchemaLocation="/some/path/to/schema.xsd">
> <someObject xsi:type="objectTypeA" attributA="something">
> <someOtherElemet attributeB="anything"/>
> </someObject>
> </rootTag>
>
>
> Does anyone know of any settings where I can specify the default
> noNamespaceSchemaLocation to use?
>
> Thanks
>
> Max
>
Previous Topic:XSD Graphic editor
Next Topic:Can we use list of user data structure as an element
Goto Forum:
  


Current Time: Wed Oct 01 10:21:49 GMT 2014

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

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