Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NetBeans: How to provide offline XML schemas?

Tags:

xml

netbeans

xsd

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

like image 920
I82Much Avatar asked Aug 26 '10 20:08

I82Much


1 Answers

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.

like image 136
vkraemer Avatar answered Nov 15 '22 09:11

vkraemer