I would like to have the code completion and XML validation that comes from NetBeans having access to the schemas referenced in XML documents. Unfortunately I need to use NetBeans in an offline (completely disconnected from the Internet) location, meaning NetBeans fails in downloading the referenced .xsd files. However, I have all of the xsd files saved locally.
How can I make NetBeans know that something like xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
should really map to C:/Schemas/beans/spring-beans-2.5.xsd
?
Edit: NetBeans 6.5 ha开发者_Python百科s some means of having an XML catalog of schemas, but it's unclear how this works. I know one of the options is for OASIS format... perhaps this is the key
I do the following in NetBeans 6.9...
Select the 'DTDs and XML Schemas' item from the Tools menu.
A dialog box will open.
Scroll through the list on the left until the item 'User catalog [read-write] is visible.
Select that item.
Press the button titled 'Add Local DTD or Schema...'
Another dialog opens to define a connection between a URL with a reference to a local file.
精彩评论