This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 60317 - Incorrect syntax highlighting of DTD files if % is used
Summary: Incorrect syntax highlighting of DTD files if % is used
Status: CLOSED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
: 66511 68174 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-21 10:37 UTC by Jiri Kovalsky
Modified: 2006-03-24 12:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot of incorrect DTD syntax highlighting. (17.30 KB, image/png)
2005-06-21 10:38 UTC, Jiri Kovalsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Kovalsky 2005-06-21 10:37:45 UTC
FCS build #200505031930 of NetBeans 4.1
Windows XP, JDK 1.5.0_03 build #06

Description:
============
DTD syntax highlighting gets corrupted when reference entities are used in DTD
definition. Everything behind % gets blue color. Please see attached screenshot
to get what I mean.

Steps to reproduce:
===================
1. Create new sample web application and create new DTD file underneath.
2. Copy below attached DTD source and replace your DTD with it.
3. Everything behind % character will inherit blue color and tags are not
recognized.

DTD source code for step 2 above:
=================================
<?xml version="1.0" encoding="UTF-8"?>
<!-- Error: Missing " char. Should be: encoding="UTF-8" -->

<!ENTITY %days SYSTEM "sub/days.dtd">
<!-- DTD comment -->
<!ELEMENT root ANY>
<!ATTLIST root private CDATA #REQUIRED>
%days;
Comment 1 Jiri Kovalsky 2005-06-21 10:38:55 UTC
Created attachment 22819 [details]
Screenshot of incorrect DTD syntax highlighting.
Comment 2 Jiri Kovalsky 2005-10-12 06:35:49 UTC
*** Issue 66511 has been marked as a duplicate of this issue. ***
Comment 3 Jiri Kovalsky 2005-10-17 08:01:39 UTC
I know this one is tough but could you please take a look at it ? It looks ugly
and actually is regression.
Comment 4 Marek Fukala 2005-10-25 14:47:16 UTC
fixed.

Checking in javacc/DTDSyntax.jj;
/cvs/xml/text-edit/src/org/netbeans/modules/xml/text/syntax/javacc/DTDSyntax.jj,v
 <--  DTDSyntax.jj
new revision: 1.5; previous revision: 1.4
done
Checking in javacc/DTDSyntaxConstants.java;
/cvs/xml/text-edit/src/org/netbeans/modules/xml/text/syntax/javacc/DTDSyntaxConstants.java,v
 <--  DTDSyntaxConstants.java
new revision: 1.4; previous revision: 1.3
done
Checking in javacc/DTDSyntaxTokenManager.java;
/cvs/xml/text-edit/src/org/netbeans/modules/xml/text/syntax/javacc/DTDSyntaxTokenManager.java,v
 <--  DTDSyntaxTokenManager.java
new revision: 1.4; previous revision: 1.3
done
Comment 5 Jiri Kovalsky 2005-11-04 14:22:58 UTC
Works fine in development build #200511031900 of NetBeans 5.0.
Comment 6 Marek Fukala 2005-11-07 11:11:08 UTC
*** Issue 68174 has been marked as a duplicate of this issue. ***