<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://community.activestate.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>ActiveState Community Site - HTML, UDL and code intelligence - Comments</title>
 <link>http://community.activestate.com/forum-topic/html-udl-and-code-intelligence</link>
 <description>Comments for &quot;HTML, UDL and code intelligence&quot;</description>
 <language>en</language>
<item>
 <title>One step further</title>
 <link>http://community.activestate.com/forum-topic/html-udl-and-code-intelligence#comment-4189</link>
 <description>&lt;p&gt;The OpenSocial example seems to use strict separation between HTML and XML, which WebTML does not - it&#039;s not valid XML. I looked at this XML Catalog thing, but thats too heavy stuff for me at the moment ;)&lt;/p&gt;
&lt;p&gt;However, I found a simple solution to get rid of the HTML-Tidy error messages: &lt;a href=&quot;http://www.w3.org/People/Raggett/tidy/&quot;&gt;Teaching Tidy about new tags!&lt;/a&gt; is the key - no auto completion, but auto tag-closing at least! :)&lt;/p&gt;
&lt;p&gt;For now, this solution works for me, the rest can be done by toolbox snippets.&lt;/p&gt;
&lt;p&gt;Finally something for the wishlist:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Different coloring for different tags (wished my tml-tags look different than the other html-code)&lt;/li&gt;
&lt;li&gt;Has nothing to do with custom languages, but: Why, for example, does Javascript code inside HTML-script-tag has different color coding than Javascript code in separate .js-files? Javascript coloring should be the same, no matter where the code is placed.&lt;/li&gt;
&lt;/ul&gt;
</description>
 <pubDate>Wed, 13 Feb 2008 15:11:14 -0800</pubDate>
 <dc:creator>gravism</dc:creator>
 <guid isPermaLink="false">comment 4189 at http://community.activestate.com</guid>
</item>
<item>
 <title>An example</title>
 <link>http://community.activestate.com/forum-topic/html-udl-and-code-intelligence#comment-4162</link>
 <description>&lt;p&gt;The &lt;a href=&quot;http://community.activestate.com/komodo-extension/opensocial&quot;&gt;Komodo OpenSocial extension&lt;/a&gt; is one example that may be similar to what you are doing.&lt;/p&gt;
&lt;p&gt;An OpenSocial xml document contains specific Google gadget xml tags, then inside of the content tag, it contains one large CDATA section containing normal html tags. To get the xml completions to work correctly between the two different sections, Shane had to do some specific hacking in the &quot;pylib/lang_opensocial.py&quot; file.&lt;/p&gt;
&lt;p&gt;I&#039;d imagine you&#039;d need something similar to enable the &quot;&amp;lt;tml:&quot; completions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; these specific xml_tree_handler changes in the OpenSocial &quot;pylib/lang_opensocial.py&quot; file need the latest Komodo 4.3.0 alpha/beta builds to work correctly. The difference for this particular extension is that for Komodo 4.2.1, when inside the cdata html section, only the gadget xml completions would get shown.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br /&gt;
Todd&lt;/p&gt;
</description>
 <pubDate>Tue, 12 Feb 2008 17:41:00 -0800</pubDate>
 <dc:creator>ToddW</dc:creator>
 <guid isPermaLink="false">comment 4162 at http://community.activestate.com</guid>
</item>
<item>
 <title>corrected my previous</title>
 <link>http://community.activestate.com/forum-topic/html-udl-and-code-intelligence#comment-4161</link>
 <description>&lt;p&gt;corrected my previous comment that resulted in half of it now showing&lt;/p&gt;
</description>
 <pubDate>Tue, 12 Feb 2008 17:19:05 -0800</pubDate>
 <dc:creator>trentm</dc:creator>
 <guid isPermaLink="false">comment 4161 at http://community.activestate.com</guid>
</item>
<item>
 <title>Sorry, I don&#039;t get it. How</title>
 <link>http://community.activestate.com/forum-topic/html-udl-and-code-intelligence#comment-4160</link>
 <description>&lt;p&gt;Sorry, I don&#039;t get it. How do I make use of those autocomplete and calltips features? Are there any examples?&lt;/p&gt;
</description>
 <pubDate>Tue, 12 Feb 2008 16:56:25 -0800</pubDate>
 <dc:creator>gravism</dc:creator>
 <guid isPermaLink="false">comment 4160 at http://community.activestate.com</guid>
</item>
<item>
 <title>autocomplete/calltips notes</title>
 <link>http://community.activestate.com/forum-topic/html-udl-and-code-intelligence#comment-4158</link>
 <description>&lt;p&gt;&amp;gt; What is the difference between code intelligence and&lt;br /&gt;
&amp;gt; autocompletion/calltips?&lt;/p&gt;
&lt;p&gt;Autocomplete and calltips are the features. &quot;Code intelligence&quot; (or codeintel for short) is the name of the Komodo sub-system that provides autocomplete and calltips for number of languages (as well as some other features like &quot;Go To Definition&quot; and the Code Browser).&lt;/p&gt;
&lt;p&gt;Those &quot;&amp;lt;tml:foo&quot; things (I&#039;m guessing here because I don&#039;t have a like to a WebTML spec :) are being checked by the XML/HTML syntax checker. And the HTML syntax checker doesn&#039;t like it them. For proper XML syntax checking you&#039;d need to add an XML namespace declaration that defined the &quot;tml&quot; namespace.&lt;/p&gt;
&lt;p&gt;Then for Komodo XML autocomplete you&#039;d be able to add a schema (in DTD or XML Scheme or Relax NG format) in Komodo&#039;s &quot;XML Catalogs&quot; prefs panel.&lt;/p&gt;
</description>
 <pubDate>Tue, 12 Feb 2008 15:46:00 -0800</pubDate>
 <dc:creator>trentm</dc:creator>
 <guid isPermaLink="false">comment 4158 at http://community.activestate.com</guid>
</item>
<item>
 <title>Problems with syntax checking, auto completion</title>
 <link>http://community.activestate.com/forum-topic/html-udl-and-code-intelligence#comment-4157</link>
 <description>&lt;p&gt;Ok, I moved a small step forward: The tml-tags are separated from the html-code, with this few lines of UDL:&lt;/p&gt;
&lt;pre class=&quot;geshifilter&quot;&gt;state IN_M_DEFAULT: # HTML to WebTML
&#039;&amp;lt;tml:&#039; : paint(upto, M_DEFAULT), paint(include, TPL_OPERATOR), spush_check(IN_M_DEFAULT), =&amp;gt; IN_TPL_DEFAULT
state IN_TPL_DEFAULT:
/&amp;gt;/ : paint(upto, TPL_DEFAULT), paint(include, TPL_OPERATOR), spop_check, =&amp;gt; IN_M_DEFAULT&lt;/pre&gt;&lt;p&gt;Quite simple and not even smart.&lt;/p&gt;
&lt;p&gt;But following things do not work (as I expected):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Each tml-tag has a green curly underline with an error that says &amp;lt;tml:whatever&amp;gt; is not recognized&lt;/li&gt;
&lt;li&gt;Code intel and auto completion like in HTML: How do I get this to work&lt;br /&gt;
in WebTML? Where do I define a set of valid tags and attributes?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What is the difference between code intelligence and autocompletion/calltips?&lt;/p&gt;
</description>
 <pubDate>Tue, 12 Feb 2008 15:29:26 -0800</pubDate>
 <dc:creator>gravism</dc:creator>
 <guid isPermaLink="false">comment 4157 at http://community.activestate.com</guid>
</item>
<item>
 <title>Colorizing will work, syntax-checking probably will.</title>
 <link>http://community.activestate.com/forum-topic/html-udl-and-code-intelligence#comment-4101</link>
 <description>&lt;p&gt;You can easily write a code-colorizer that knows how to jump from&lt;br /&gt;
HTML-mode to WTML-mode on a string like &quot;&quot;.  It won&#039;t even have problems figuring&lt;br /&gt;
out which quotes belong where.  That&#039;s easy.&lt;/p&gt;
&lt;p&gt;It also looks like the HTML syntax checker we use, htmltidy,&lt;br /&gt;
has no problem with &quot;&amp;lt;&quot; and &quot;&amp;gt;&quot; characters inside attribute&lt;br /&gt;
strings.  This is not valid XML, though.&lt;/p&gt;
</description>
 <pubDate>Thu, 07 Feb 2008 16:12:45 -0800</pubDate>
 <dc:creator>ericp</dc:creator>
 <guid isPermaLink="false">comment 4101 at http://community.activestate.com</guid>
</item>
<item>
 <title>Eric&#039;s the (UDL-)expert on</title>
 <link>http://community.activestate.com/forum-topic/html-udl-and-code-intelligence#comment-4099</link>
 <description>&lt;p&gt;Eric&#039;s the (UDL-)expert on whether Komodo&#039;s syntax coloring will be able to handle that.&lt;/p&gt;
</description>
 <pubDate>Thu, 07 Feb 2008 14:53:28 -0800</pubDate>
 <dc:creator>trentm</dc:creator>
 <guid isPermaLink="false">comment 4099 at http://community.activestate.com</guid>
</item>
<item>
 <title>Thanks a lot, it works</title>
 <link>http://community.activestate.com/forum-topic/html-udl-and-code-intelligence#comment-4097</link>
 <description>&lt;p&gt;Thanks a lot, it works :)&lt;/p&gt;
&lt;p&gt;Now I will try to include some custom WebTML-syntax, hope this will work too. The challenge for Komodo will be that markup of HTML and WebTML can be nested inside single tags, such like this:&lt;/p&gt;
&lt;pre class=&quot;geshifilter&quot;&gt;&amp;lt;div class=&quot;&amp;lt;tml:item name=&quot;myclass&quot; /&amp;gt;&quot;&amp;gt;...&amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;p&gt;
So the HTML syntax checker and the code coloring must be able to ignore the tml-tag (and the quotes inside). All IDE&#039;s I tried before failed with this, code coloring was broken etc.&lt;/p&gt;
&lt;p&gt;If Komodo does the job, it will be the IDE of my choice! :)&lt;/p&gt;
</description>
 <pubDate>Thu, 07 Feb 2008 14:39:54 -0800</pubDate>
 <dc:creator>gravism</dc:creator>
 <guid isPermaLink="false">comment 4097 at http://community.activestate.com</guid>
</item>
<item>
 <title>need to &quot;koext startcodeintel WebTML&quot; and do some edits</title>
 <link>http://community.activestate.com/forum-topic/html-udl-and-code-intelligence#comment-4094</link>
 <description>&lt;p&gt;gravism: This isn&#039;t actually a bug in the codeintel system. Instead (and I admit this isn&#039;t super easy stuff) you need to explicitly define codeintel-support for new languages via a &quot;pylib/lang_webtml.py&quot; file.&lt;/p&gt;
&lt;p&gt;&quot;koext startcodeintel LANG&quot; will generate a starter stub for this. However, there is a chunk of work required on the stub to get it going for your case. Mostly you want a lang_webtml.py that is the same as the lang_html.py that is part of Komodo.&lt;/p&gt;
&lt;p&gt;I&#039;ve put together a starter lang_webtml.py that gets autocomplete working in HTML, JS and CSS content. See the second attachment to: &lt;a href=&quot;http://bugs.activestate.com/show_bug.cgi?id=74719&quot; title=&quot;http://bugs.activestate.com/show_bug.cgi?id=74719&quot;&gt;http://bugs.activestate.com/show_bug.cgi?id=74719&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br /&gt;
Trent&lt;/p&gt;
</description>
 <pubDate>Thu, 07 Feb 2008 13:55:32 -0800</pubDate>
 <dc:creator>trentm</dc:creator>
 <guid isPermaLink="false">comment 4094 at http://community.activestate.com</guid>
</item>
<item>
 <title>looks like a bug in codeintel</title>
 <link>http://community.activestate.com/forum-topic/html-udl-and-code-intelligence#comment-4093</link>
 <description>&lt;p&gt;gravism: Yes, this looks like a bug in the codeintel system picking up on your new extension. I can reproduce the problem. I&#039;ve started a bug for this:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://bugs.activestate.com/show_bug.cgi?id=74719&quot; title=&quot;http://bugs.activestate.com/show_bug.cgi?id=74719&quot;&gt;http://bugs.activestate.com/show_bug.cgi?id=74719&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and hope to look at it soon.&lt;/p&gt;
</description>
 <pubDate>Thu, 07 Feb 2008 10:17:00 -0800</pubDate>
 <dc:creator>trentm</dc:creator>
 <guid isPermaLink="false">comment 4093 at http://community.activestate.com</guid>
</item>
<item>
 <title>HTML, UDL and code intelligence</title>
 <link>http://community.activestate.com/forum-topic/html-udl-and-code-intelligence</link>
 <description>&lt;p&gt;After nearly two days of UDL research, I compiled my first working extension for a new language. Its a template language with additional server side script language, similar to Cold Fusion or JSP. First step was simply to create a working multi-language extension with HTML, JS and CSS, based on the existing UDL files for each language.&lt;br /&gt;
Code coloring works fine, but code intelligence for HTML does not. :(&lt;br /&gt;
My settings are very similar to the RHTML extension which has working code intel.&lt;/p&gt;
&lt;p&gt;How can I get code intelligence to work with HTML, JS and CSS in my language?&lt;/p&gt;
&lt;p&gt;The language ist named &quot;WebTML&quot;, here are settings:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;koWebTML_UDL_Language.py&lt;/strong&gt;:&lt;/p&gt;
&lt;pre class=&quot;geshifilter&quot;&gt;# Komodo WebTML language service.

import logging
from koXMLLanguageBase import koHTMLLanguageBase

log = logging.getLogger(&quot;koWebTMLLanguage&quot;)
#log.setLevel(logging.DEBUG)

def registerLanguage(registry):
    log.debug(&quot;Registering language WebTML&quot;)
    registry.registerLanguage(KoWebTMLLanguage())

class KoWebTMLLanguage(koHTMLLanguageBase):
    name = &quot;WebTML&quot;
    lexresLangName = &quot;WebTML&quot;
    _reg_desc_ = &quot;%s Language&quot; % name
    _reg_contractid_ = &quot;@activestate.com/koLanguage?language=%s;1&quot; % name
    _reg_clsid_ = &quot;e98f0b3c-d13c-4066-9c5d-5c38084a980d&quot;
    defaultExtension = &#039;.tml&#039;
    
    lang_from_udl_family = {&#039;CSL&#039;: &#039;JavaScript&#039;, &#039;M&#039;: &#039;HTML&#039;, &#039;CSS&#039;: &#039;CSS&#039;,
                            &#039;SSL&#039;: &#039;WebTML&#039;}&lt;/pre&gt;&lt;p&gt;
&lt;strong&gt;webtml-mainlex.udl&lt;/strong&gt;:&lt;/p&gt;
&lt;pre class=&quot;geshifilter&quot;&gt;language WebTML

include &quot;html2js.udl&quot;

include &quot;html2css.udl&quot;

include &quot;css2html.udl&quot;

include &quot;js2html.udl&quot;

include &quot;html.udl&quot;
include &quot;csslex.udl&quot;
include &quot;jslex.udl&quot;&lt;/pre&gt;&lt;p&gt;
The included UDL&#039;s are original from the sdk-folder.&lt;br /&gt;
I use Komodo IDE 4.2.1 with the &quot;ludditelib&quot;-bugfix 72556.&lt;/p&gt;
&lt;p&gt;Would be great to get some advice!&lt;br /&gt;
Thx&lt;/p&gt;
</description>
 <comments>http://community.activestate.com/forum-topic/html-udl-and-code-intelligence#comments</comments>
 <category domain="http://community.activestate.com/forums/komodo-extensions-0">Komodo Macros and Extensions</category>
 <category domain="http://community.activestate.com/os/windows-vista">Windows Vista</category>
 <pubDate>Wed, 06 Feb 2008 13:38:44 -0800</pubDate>
 <dc:creator>gravism</dc:creator>
 <guid isPermaLink="false">1897 at http://community.activestate.com</guid>
</item>
</channel>
</rss>
