Closed Bug 300458 Opened 19 years ago Closed 19 years ago

Fragment navigation doesn't work on text/xml documents

Categories

(Firefox :: File Handling, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: petr.pisar, Unassigned)

Details

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b3) Gecko/20050710 Firefox/1.0+
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b3) Gecko/20050710 Firefox/1.0+

Lets have a XML document with MIME type text/xml, which is styled by CSS, and
the document contents element with attribute xml:id and/or id. If user open URL
ending with this fragment id (eg. "document.xml#fragment"), then the page will
not be scrolled to the visual position of the element.

Reproducible: Always

Steps to Reproduce:



Expected Results:  
The page should scoll to the requested element.
Attached file XML testcase (obsolete) —
Added XML file test case. For full experience use it whith added CSS file.
Attached file CSS file for user experience (obsolete) —
Added CSS part of test case
xml:id is not supported - bug 275196

And id doesn't work for arbitrary XML, you need a DTD defining an appropriate type for the id attribute:
  <!DOCTYPE rootelementname [
    <!ATTLIST elementname id ID #IMPLIED>
  ]>

Working testcase coming up.
Attached file testcase
Attachment #189038 - Attachment is obsolete: true
Attachment #189039 - Attachment is obsolete: true
So, invalid or a dupe of bug 275196.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Please reopen!

Your test case includes a CSS stylesheet which hides the problem. If you remove the stylesheet reference, I think you will see what the reporter of this bug meant. 

The XMLPrettyPrint.xsl stylesheet used by default does not propagate id attributes so the "pretty" XML document it produces is not navigable.

I am working on a fix for this.
Er, no. That's a different bug, the original testcase included the stylesheet too.

IMO pretty-printed documents are not supposed to be navigable (in the sense of working xlink), although it would be nice if the page scrolled to the specified element when the URL inludes a fragment identifier. But again, that's a different bug: comment 0 states pretty clearly that the document is "styled by CSS".
Sorry ... you are quite right. Bug is invalid.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: