Author Topic: Disable automatic DTD processing  (Read 6735 times)

Peter Steinberg

  • Community Member
  • Posts: 14
  • Hero Points: 2
Disable automatic DTD processing
« on: January 12, 2010, 05:17:40 PM »
If I open a ".csproj" file for editing (assigned to mode XML), SlickEdit 14.0.2.2 insists on trying to process the DTD to validate the schema.

I have disabled the "auto validate on open" option under the Formatting menu.

Is there something else I need to do to disable this validation?

jbhurst

  • Senior Community Member
  • Posts: 405
  • Hero Points: 33
Re: Disable automatic DTD processing
« Reply #1 on: January 12, 2010, 07:07:06 PM »
As well as using the DTD to validate the document, SlickEdit also reads it to provide completions while editing. You can disable this for selected extensions using the macro variable def_xml_no_schema_list. Enter the command:
Code: [Select]
set-var def_xml_no_schema_list
When prompted, enter ".csproj" for the value. See http://community.slickedit.com/index.php?topic=1441 for more details.

Hope this helps

John Hurst
Wellington, New Zealand

Peter Steinberg

  • Community Member
  • Posts: 14
  • Hero Points: 2
Re: Disable automatic DTD processing
« Reply #2 on: January 14, 2010, 10:15:01 PM »
I already had ".csproj" set in the list of extensions in "def_xml_no_schema_list".

Peter Steinberg

  • Community Member
  • Posts: 14
  • Hero Points: 2
Re: Disable automatic DTD processing
« Reply #3 on: March 01, 2010, 11:02:11 PM »
I found a fix, in case anyone else has the issue.

The first entry in the "def_xml_no_schema_list" variable was ".XML" in uppercase.  I changed it to lower-case and it stopped accessing the internet to validate the schema.

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Disable automatic DTD processing
« Reply #4 on: March 05, 2010, 04:31:03 PM »
It seems that the color coding engine is trying to use the DTD/schema to help render colors. This is not affected by the "Auto validate on open" setting. We definitely need to look into this and come up with some controls that make it easier to say, "I don't have a DTD/schema or I don't want you to check it, so just lay off."

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Disable automatic DTD processing
« Reply #5 on: March 05, 2010, 07:23:06 PM »
If the reason you are getting this error is because the DTD is unavailable, either because you're not on the network or the path to the DTD is different on your dev machine than in production, you can define a directory and place your DTDs there. Then, SlickEdit will look in that directory for the DTD if it can't find it in the usual place.

To set that, select Tools > Options > Network and Internet Options > URL Mappings. Enter the full path in "Default search directory" and click "Add".

This addresses the OP's issue in the linked thread that John posted.