Xsl template namespaces and community edition

Hi, I'm just downloaded the new 10 version of this great ide and now in any of xsl templates i'm editing all of the html tags inside xsl:template elements are marked red as unresolved symbols.
There is however a default namespace specified:

<xsl:stylesheet version="2.0"
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs = "http://www.w3.org/2001/XMLSchema"
>

There were no such warnings in previous versions of the IDE so what's changed?
Any thoughts on this would be appreciated.

1 comment
Comment actions Permalink

Nevermind I found the solution.
The problem occurs when you use xml schema (see xmlns in my previous post) and some custom entity dtd simultaneously (Tested in Pycharm and Idea 10 Community, although Idea 10 Ultimate unaffected ).
Example:

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE xsl:stylesheet SYSTEM "entities.dtd">
<xsl:stylesheet version="2.0"
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs = "http://www.w3.org/2001/XMLSchema"
>

In this case the idea code validation mechanism somehow prefer dtd as a default validation source and marks all xhtml tags as unresolved (red color).
A trick to avoid this behavior is to import your custom entities inside another inline entity.
Example:

<?xml version="1.0" encoding="utf-8" ?>

<!DOCTYPE xsl:stylesheet [

    
<!ENTITY % some_other_entities SYSTEM "entities.dtd">

    
%some_other_entities;

]>

<xsl:stylesheet version="2.0"
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs = "http://www.w3.org/2001/XMLSchema"
>

0

Please sign in to leave a comment.