| Summary: | hyperlink navigation does not handle multiple schema bindings in one schemalocation attribute | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Amy Wu <for.work.things> | ||||||||
| Component: | wst.xml | Assignee: | Rakesh <rakes123> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | Nitin Dahyabhai <thatnitind> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | for.work.things, jesper, nsand.dev, rakes123 | ||||||||
| Version: | 0.7 | Keywords: | helpwanted | ||||||||
| Target Milestone: | 3.3 M5 | Flags: | nsand.dev:
review+
|
||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Amy Wu
Changed Version field given new release numbering. mass reassignment of my bugs to xml-inbox May already be corrected, need to retest with M5. Created attachment 130950 [details]
Screenshot showing correct behaviour - sortof
This appears to be fixed in WTP 3.1 M6, since all URIs inside schemaLocation (including the namespace names themselves) are now hyperlinkable, but there could be related bugs, since a total of three navigation suggestions appear two identical (1 and 2) and one obviously bogus (bottom link, underlined).
I'll check for dupes and comment here.
Turns out the fix is not complete / correct! I was too quick in my former assessment of the bug, since the last URI in the list includes the closing quote, in this case, the link detected is http://www.w3.org/1999/xhtml.xsd" It appears to be an off by one error of sorts. I can investigate if anyone' interested. Created attachment 131530 [details]
Screenshot showing problem with the last link of a xsi:schemaLocation element
Argh. Please disregard comments 4-6 and rest assured that this bug still exists, and should not be closed just yet. Just turn off the platform's URL detector and possibly Mylyn's Task URL detector and see how all the links in the shemaLocation are indeed highlighted. P.S: The problem with the closing quote is a problem in the heuristics in the URLHyperlinkDetector from platform. Not reproducible on I20100602-1502 build.Correct link is getting opened now. Still present in 3.2.0, e.g. Helios EPP build Eclipse Java EE Developer Tools from v201006240600. To reproduce, create an XML document, paste the contents below, open Preferences -> General -> Editors -> Text Editing -> Hyperlinks, and de-select the Link Kind 'URL', available in 'Textual Editors', and then (in the editor, Ctrl-click on http://www.w3.org/1999/xhtml, and WTP will open the stylesheet for XSLT 2.0. (In reply to comment #9) > Still present in 3.2.0, e.g. Helios EPP build Eclipse Java EE Developer Tools > from v201006240600. > > To reproduce, create an XML document, paste the contents below, open > Preferences -> General -> Editors -> Text Editing -> Hyperlinks, and de-select > the Link Kind 'URL', available in 'Textual Editors', and then (in the editor, > Ctrl-click on http://www.w3.org/1999/xhtml, and WTP will open the stylesheet > for XSLT 2.0. I am not sure if i missed something, but if i deselect 'URL' from Text Editors , i can't click on any link.I used wtp 3.2.3 from M20100909-0800. Created attachment 183114 [details] patch <stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/1999/XSL/Transform http://www.w3.org/1999/XSL/Transform.xsd http://www.w3.org/1999/xhtml http://www.w3.org/1999/xhtml.xsd"> Now it is able to recognize where we clicked in xsi:schemaLocation. But it is not resolved to anything. So it will now look for next attribute value that is resolvable.So instead it will open 'xmlns="http://www.w3.org/1999/XSL/Transform"'(line 1). It may look odd, but this is is functionality , so i did not remove it.Let me know if its removal is required. (In reply to comment #11) > Created an attachment (id=183114) [details] > patch > > <stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" > xmlns:html="http://www.w3.org/1999/xhtml" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.w3.org/1999/XSL/Transform > http://www.w3.org/1999/XSL/Transform.xsd > http://www.w3.org/1999/xhtml > http://www.w3.org/1999/xhtml.xsd"> > Now it is able to recognize where we clicked in xsi:schemaLocation. > But it is not resolved to anything. So it will now look for next attribute > value that is resolvable.So instead it will open > 'xmlns="http://www.w3.org/1999/XSL/Transform"'(line 1). It may look odd, but > this is is functionality , so i did not remove it.Let me know if its removal is > required. I think the problem that Jesper mentioned remains. It's that each of the url's in the list all direct you to the same schema (xslt-1.0.xsd), when really xhtml should be opening xhtml.xsd. (In reply to comment #12) > (In reply to comment #11) > > Created an attachment (id=183114) [details] [details] > > patch > > > > <stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" > > xmlns:html="http://www.w3.org/1999/xhtml" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:schemaLocation="http://www.w3.org/1999/XSL/Transform > > http://www.w3.org/1999/XSL/Transform.xsd > > http://www.w3.org/1999/xhtml > > http://www.w3.org/1999/xhtml.xsd"> > > Now it is able to recognize where we clicked in xsi:schemaLocation. > > But it is not resolved to anything. So it will now look for next attribute > > value that is resolvable.So instead it will open > > 'xmlns="http://www.w3.org/1999/XSL/Transform"'(line 1). It may look odd, but > > this is is functionality , so i did not remove it.Let me know if its removal is > > required. > > I think the problem that Jesper mentioned remains. It's that each of the url's > in the list all direct you to the same schema (xslt-1.0.xsd), when really xhtml > should be opening xhtml.xsd. Hi Nick, here is explanation for this behavior: Out of all the above links, only http://www.w3.org/1999/XSL/Transform and http://www.w3.org/1999/XSL/Transform.xsd are resolved to a file(xslt-1.0.xsd) by some plugin(not ours). So what happens is if we hover over 'http://www.w3.org/1999/xhtml' , it is resolved to 'http://www.w3.org/1999/xhtml.xsd' , but we ignore it since we want some file in local file system. Now our detector again tries to find a linkable attribute, in current element .Since only above 2 mentioned links are resolved(to xslt-1.0.xsd), this xsd is opened always. We can do either of following: 1)Try to open 'http://www.w3.org/1999/xhtml.xsd'. 2)If not 1,ignore links that are not resolved to local file system, since it could be confusing to users. What my patch does is it differentiate between 'http://www.w3.org/1999/xhtml','http://www.w3.org/1999/XSL/Transform' but it will be of no help since 'http://www.w3.org/1999/XSL/Transform' is not resolved to local file. If we create a Catalog using 'http://www.w3.org/1999/xhtml.xsd' as SystemId , you will notice difference. ping! I see what you mean, Rakesh. Patch looks ok to me. Thanks. |