Bug 16083 - Web Inspector: details sidebar should show namespace for selected node
Summary: Web Inspector: details sidebar should show namespace for selected node
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2007-11-21 02:32 PST by David Jones
Modified: 2018-07-31 10:18 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Jones 2007-11-21 02:32:29 PST
The old web inspector (on Safari 3.0.3 for example) would display the Namespace URI for a node.  The current web inspector appears not to show this information.  Not that I can see anyway.  If it does show it, then the bug is that it's too difficult to find.
Comment 1 Timothy Hatcher 2007-11-21 08:38:52 PST
Showing the namespace was not moved to the new inspector because we now show the whole DOM, not just "important" attributes. So the xmlns attribute is visible, just on some parent element. Thinking about it, I can see how knowing the namespace of a given node might be helpful. But in the old inspector, it almost always just reported the HTML NS, since most pages are HTML.

I am not sure where the best place to show this info would be. Another sidebar pane?
Comment 2 David Jones 2007-11-22 00:58:08 PST
(In reply to comment #1)
> Showing the namespace was not moved to the new inspector because we now show
> the whole DOM, not just "important" attributes. So the xmlns attribute is
> visible, just on some parent element. Thinking about it, I can see how knowing
> the namespace of a given node might be helpful. But in the old inspector, it
> almost always just reported the HTML NS, since most pages are HTML.

It's when we're creating XML documents with elements from multiple namespaces that showing the namespace is useful.  An SVG document in an XHTML document is likely to have 3 namespaces (XHTML, SVG, XLINK); it's not hard to image adding things like XSL and FO to that list.  A lot of the documents I'm dealing with at the moment have most of their elements created dynamically and in different namespaces.  A tool that helps me debug this is useful, and the old HUD Web Inspector was better in this regard.

Most pages might well be HTML, but that doesn't mean that most pages I look at in the Web Inspector are!


> 
> I am not sure where the best place to show this info would be. Another sidebar
> pane?

As I don't really do UI design I'm not sure either.  I still think it's a bug even if neither of us can think of a good way to show it.
Comment 3 Adam Roben (:aroben) 2008-01-29 11:04:37 PST
<rdar://problem/5712859>
Comment 4 BJ Burg 2014-01-12 14:41:19 PST
Migrating this to the new inspector component. It would be easy to add the selected node's namespace to the details sidebar.
Comment 5 Timothy Hatcher 2014-01-14 11:35:13 PST
We have also considered removing some of the redundant info in the Node details sidebar that you can see in the DOM tree. So maybe we don't want to do this.
Comment 6 Joseph Pecoraro 2018-07-31 10:18:59 PDT
If I was ever confused I'd just do:

    js> $0.namespaceURI
    "http://www.w3.org/1999/xhtml"

I also feel XML is less common on the web today then it was when this was filed.