Bug 129165 - XML Syntax migration to new Lexer
XML Syntax migration to new Lexer
Status: NEW
Product: xml
Classification: Unclassified
Component: Text-Edit
6.x
All All
: P3 (vote)
: 7.4
Assigned To: Svata Dedic
issues@xml
: PLAN
Depends on:
Blocks: 129027 129020
  Show dependency treegraph
 
Reported: 2008-03-04 16:22 UTC by Andrei Badea
Modified: 2012-11-06 13:12 UTC (History)
2 users (show)

See Also:
Issue Type: TASK
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Badea 2008-03-04 16:22:52 UTC
When XMLSyntaxSupport is used to create a DOM Element impl for the following markup

<element id="id" foo bar="value"/>

the Element doesn't contain the value of the bar attribute. This happens because the XML lexer returns an error token
starting at the bar attribute (although that attribute is valid -- the error is in the foo attribute). Moreover, the XML
lexer returns a text token for the test of the bar="value", which is visible in the syntax highlighting.

Although the lexer may be behaving as designed, I consider this a valid issue, because our competitors handle this case
better. E5e, for example, marks foo as an error.
Comment 1 Samaresh Panda 2008-03-24 23:00:52 UTC
I do not think I can get to this for 6.1.
Comment 2 nairsujit 2008-08-28 13:08:17 UTC
Samaresh : 
Are you planning to get it done for the 6.5 release? 'Coz one of issues in Spring # 129027 depends on it.
 
Comment 3 Samaresh Panda 2008-08-28 15:44:36 UTC
The underlying parser for this is not lexer and the (old) editor syntax APIs. I'll look into it and get back. To me,
this and issue 129027 are nice-to-have fixes.
Comment 4 nairsujit 2008-09-10 03:10:34 UTC
Samaresh :
Did you get a chance to look into this issue? Are you still planning to take it up for 6.5 release?

Regards,
Sujit
Comment 5 Samaresh Panda 2008-09-12 23:23:43 UTC
I'll look into it and get back.
Comment 6 nairsujit 2008-09-18 16:51:00 UTC
Hi Samaresh,

Did you get time to look into this issue? Can you please let me know your plans to solve this? I wanted to reprioritize
the dependent IZ#129027 accordingly.

Thanks,
Sujit 
Comment 7 Samaresh Panda 2008-09-19 18:03:58 UTC
I agree it is an issue but it should be addressed with Lexer migration.

The problem is that, this piece of code uses editor's syntax API which is old. All of this (at some point) should be
migrated to Lexer but I'm not sure when. This is really the core to XML parsing and potentially impacts a lot of code
that depend on it. The lack of unit tests in this area makes it even more difficult to fix. 6.5 being around the corner,
I suggest you re-prioritize and push for these changes in 7.0.
Comment 8 Martin Fousek 2011-09-27 07:45:19 UTC
Still valid issue in trunk (of nb71), changing the target milestone to Next (due to comment #7 which indicate much of work for fixing that), but please feel free and update the target milestone if you know when it could be probably really fixed. Thanks a lot.
Comment 9 Martin Fousek 2012-11-06 08:47:52 UTC
Issue is still valid in trunk (of nb73).
Comment 10 Svata Dedic 2012-11-06 13:06:57 UTC
This is because XML Syntax uses the old Lexer API/impl, which is semi-deprecated now. See the syntax highlighting, it already correctly reports attribute+value for the rest of the tag, and an error tag instead of whitespace. Highlighting is already based on new Lexer.

I don't want to rewrite the SyntaxSupport into 7.3 release. Planning for the next release.
Comment 11 Martin Fousek 2012-11-06 13:12:25 UTC
(In reply to comment #10)
> I don't want to rewrite the SyntaxSupport into 7.3 release. Planning for the
> next release.

Thanks, that's definitely good news.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo