SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: deuse on June 30, 2015, 07:35:24 AM

Title: Loading a .xaml takes some minutes
Post by: deuse on June 30, 2015, 07:35:24 AM
If I'm loading a .xaml file (C#, .NET) for editing in slick, it takes some time. Maybe slick looks for something in the net, maybe the scheme, which slick cannot find or access. Since I only want to edit, validating is not necessary, I don't want this behaviour.

Does anyone know how to turn this off? I already tried to insert some url mapping in Options->Network & Internet Options->URL Mappings, but this didn't help.
Title: Re: Loading a .xaml takes some minutes
Post by: Clark on June 30, 2015, 11:30:31 PM
Check that you have auto validate off (Tools>Options>Xml/Text Languages>Xml>Formatting turn off "Auto validate on open").

If auto validate is off, it's probably referencing some web address in attempt to build a tag file.

If auto validate is off, please provide a sample an we can look into it.
Title: Re: Loading a .xaml takes some minutes
Post by: deuse on July 01, 2015, 09:26:58 AM
Hi Clark, thanks for your answer!

Auto validate is off by default.

The beginning of the .xaml reads:
<UserControl x:Class="XY.App.SomeClass"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             d:DesignHeight="400" d:DesignWidth="1900" xmlns:my="clr-namespace:XY.App.Controls">

Slick shows the following message:
DTD 'http:\\schemas.microsoft.com\expression\blend\2008' for file 'C:\SomePath\SomeFile.xaml' not found.
If you want to work off-line, use the URL Mappings dialog ("Tools","Options","URL Mappings...") to map a URL to a local path containing the files.

I tried to insert such a mapping, but only to my tmp directory, where no schema files are located. I don't have these files (a quick search at microsoft for these files didn't bring any success), and frankly, I don't want to care for them. I think, slick should be able to suppress the validation.
Title: Re: Loading a .xaml takes some minutes
Post by: Clark on July 01, 2015, 11:53:44 AM
It isn't validation. It's tag file related stuff (for auto completions and color coding). We will look into this. Thanks
Title: Re: Loading a .xaml takes some minutes
Post by: Clark on July 01, 2015, 04:02:19 PM
Something must be wrong with the mapping you set up. Sadly, you must use forward slashes (backslashes don't work). I added the following mapping:

http://schemas.microsoft.com/expression/blend/2008 --> c:\temp\not-found

Now my message doesn't show http:\\... for the DTD that was not found. Instead it shows DTD 'c:\temp\not-found' not found.

Looking into adding some sort of option to never attempt to access an http:// address when opening an XML file.
Title: Re: Loading a .xaml takes some minutes
Post by: Clark on July 01, 2015, 07:31:32 PM
There's already an option to disable the extra work for accessing the DTD for color coding and auto completions.

Set the macro variable "def_xml_no_schema_list "to ".xml" if you don't ever want this done for any DTD.
Title: Re: Loading a .xaml takes some minutes
Post by: deuse on July 02, 2015, 06:55:45 AM
That worked! Thank you, Clark! ;D