10
April
2020
Configuring opening files of XML files from Rosreestr with the XSL styles tables
11:42

Configuring opening files of XML files from Rosreestr with the XSL styles tables

10 April 2020 11:42

When opening files from the local disk of the table of styles from a remote server, they are not used. As a result, instead of a beautiful table, an error is displayed in the browser. For example, this situation takes place with XML extracts from Rosreestr.

Cors restriction (C.ross-origin resource sharING) prohibits the page to load resources outside this site. With on Cors страница с локального диска не может обращаться к ресурсам в Интернет (эти попытки пресекаются браузером). В случае открытия XML файла - не подгружаются таблицы стилей с сервера "Росреестра" и возникает ошибка:

"Ошибка загрузки таблицы стилей: Произошла неизвестная ошибка (805303f4)
https://portal.rosreestr.ru/xsl/EGRP/Reestr_Extract_Gkn/OKS/07/Common.xsl "

The solution to the problem of displaying XSL styles is quite simple: you need to use Mozilla Firefox с включенным расширением "CORS EverywherE ".

Step -by -step instruction:

    1. Install the extension in Mozilla Firefox расширение "CORS EverywherE " -https: //addons.mozilla.org/ru/firefox/addon/cors-everywhere/
  1. Enter in about:config и найдите параметр security.fileurl.strict_origin_policy и смените его значение с true на false .
    1. In about:addons In the Cors plugin settings, set the automatic extension start when the browser is launched: Setting up the expansion of Cors
  2. Make Mozilla FireFox программой для открытия XML файлов по умолчанию (Щелкните в Проводнике по файлу XML и выберите пункт "Открыть с помощью", нажмите на "Показать все приложения" и выберите Mozilla Firefox. Put a box "Open all files of this type").
  3. Restore the Firefox browser.
  4. On the plugin panel, turn on the expansion - click on the pink square icon and the icon will change its color to green.

    Turning on the expansion of Cors

Now XML files will be opened from a local disk using a table of styles from a remote server, that is, to appear in the form of a formatted HTML table.
Extract

Notes:

  • In some cases, it is necessary to additionally press the F5, after which the XML document will be displayed in the correct form.
  • The method is checked by me in Mozilla Firefox 75.0 под управлением ОС Windows 8.1 и Windows 10 и Linux Mint 19.2 Tina.


Related publications