PyCharm 4.0.4 Help

Schemas and DTDs

File | Settings | Languages and Frameworks | Schemas and DTDs


The settings on this page define how your XML, HTML and XHTML files are validated.

External Schemas and DTDs

Local XML schema (XSD) and DTD files that are used to validate your XML files are listed in this section.

Each entry is a mapping of a URI that may be referenced in your XML file onto an appropriate local schema or DTD file. Use add, delete and edit1 to create, remove and edit the mappings. See also, Referencing XML Schemas and DTDs.

Item Description
URI A URL of an XML schema (XSD) or DTD file (e.g. http://www.example.org/xsds/example.xsd) or a namespace URI (e.g. http://www.example.org, urn:jboss:domain:1.0). Readonly.

If an XML file references the specified URI, it's validated according to a local file whose path is shown in the Location columns.

Location Path to corresponding local XSD or DTD file (readonly).
Project If a check box is not selected, a mapping is available in all of your projects.

Select the mappings that you want to be available only in the current project.

The selected mappings are stored in .idea/misc.xml or the project .ipr file. These files are normally shared between development team members through version control.

add (Alt+Insert) Use this icon or shortcut to open the Map External Resource dialog to define a new mapping between a URI and a local file.
delete (Alt+Delete) Use this icon or shortcut to remove the selected mappings from the list.
edit1 (Enter) Use this icon or shortcut to edit the selected mapping. (The Map External Resource dialog dialog will open.)

Ignored Schemas and DTDs

URIs for ignored schemas and DTDs are listed in this section. (If an XML file references a URI listed in this section, PyCharm ignores that URI and doesn't mark it as an error in the editor.) Use add, delete and edit1 to add, remove and edit the URIs. See also, Referencing XML Schemas and DTDs.

Item Description
add (Alt+Insert) Use this icon or shortcut to add a new URI to the list.
edit1 (Enter) Use this icon or shortcut to edit the selected URI.
delete (Alt+Delete) Use this icon or shortcut to remove the selected URIs from the list.

The corresponding URIs become available for mapping to local XSD or DTD files.

Default HTML language level

There may be HTML and XHTML files without the <!DOCTYPE> declaration. Specify how such files should be validated:

  • HTML 4 or HTML 5. Select one of these options for the files to be treated as HTML 4 or 5.
  • Other doctype. Select this option and specify the URL of the DTD or schema that should be used.

    When the cursor is in the field, press Ctrl+Space to see a list of suggested URLs.

    defaultHtmlLangLevel

See Also

Last modified: 3 February 2015
comments powered by Disqus