Author Topic: XML Files: no DTD auto-complete for elements with underscore  (Read 3630 times)

Shelku

  • Community Member
  • Posts: 45
  • Hero Points: 0
XML Files: no DTD auto-complete for elements with underscore
« on: April 01, 2011, 03:58:47 pm »
As an example, I have a DTD file that defines 2 elements:
Code: [Select]
<!ELEMENT test (foo?, foo_bar?)>

<!ELEMENT foo (true? | false?)*>
<!ATTLIST foo
foo1 CDATA #IMPLIED
foo2 CDATA #REQUIRED
>

<!ELEMENT foo_bar (true? | false?)*>
<!ATTLIST foo_bar
bar1 CDATA #IMPLIED
bar2 CDATA #REQUIRED
>

now if I create an XML file to use this DTD file:
Code: [Select]
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE test SYSTEM "test.dtd">
<test>
<foo foo1="1" foo2="2"/>
<foo_bar bar1="1" bar2="2"/>
</test>

I find that the auto-complete (ALT-. and ALT-) lists the foo definition instead of foo_bar. Is this a configuration issue with my setup? Or is it something else? Note that the document still validates correctly.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6468
  • Hero Points: 504
Re: XML Files: no DTD auto-complete for elements with underscore
« Reply #1 on: April 01, 2011, 05:11:24 pm »
There's a bug in the color coding lexer for Xml.  "ID start characters:" are set to "a-zA-Z?" but need to be set to "a-zA-Z?_". Go to Languages>XML>Color Coding to find this setting and append "_".

Shelku

  • Community Member
  • Posts: 45
  • Hero Points: 0
Re: XML Files: no DTD auto-complete for elements with underscore
« Reply #2 on: April 01, 2011, 05:17:56 pm »
Works great! And thanks for the quick response!