views:

9

answers:

1

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 has 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

+3  A: 

I do the following in NetBeans 6.9...

  1. Select the 'DTDs and XML Schemas' item from the Tools menu.

    A dialog box will open.

  2. Scroll through the list on the left until the item 'User catalog [read-write] is visible.

    Select that item.

  3. 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.

vkraemer
This worked beautifully. I had seen that dialog but I missed the fact that there was a "User catalog [read-write]" element.
I82Much