Closed
Bug 10292
Opened 25 years ago
Closed 24 years ago
[FEATURE] XML IDs need to be recognized for ID selectors
Categories
(Core :: XML, defect, P1)
Core
XML
Tracking
()
VERIFIED
FIXED
M18
People
(Reporter: dbaron, Assigned: nisheeth_mozilla)
References
()
Details
(Keywords: testcase, Whiteboard: [nsbeta2-] [nsbeta3+] [fixinhand] hit during nsbeta2 standards compliance testing)
XML IDs should be recognized by ID selectors in CSS, when defined as ID in the DTD. peterl said to file this against XML, because he didn't think expat handles IDs yet. Expected: above test ( http://www.fas.harvard.edu/~dbaron/css/test/xmlid ) should be displayed as described (with the lines three colors). Tested on: Apprunner, 1999-07-20-10-M9 (mozilla.org opt), Linux.
Comment 1•25 years ago
|
||
The style system already has all the logic to make ID selector work for anything. The XML content needs to reflect the ID value through the nsIStyledContent interface.
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•25 years ago
|
||
ccing James Clark. James, will it be possible to inform embedders of expat that a particular attribute name is of type ID without making expat XML-non-conformant? Please see the bug report for more context. We don't need to validate that the attribute obeys the semantics of ID, so maybe we can get away with doing this and still say that expat is a non-validating parser. Accepting bug.
Comment 3•25 years ago
|
||
Expat could report to applications which attribute, if any, was the ID attribute. This would be a good thing (it's needed for XSLT too). However, one problem is that there's no way to represent this in the XML DOM, as far as I know. If you can deal with this, I can certainly add it to expat. Given the Note at the end of the section 5.9 of the CSS Level 2 Rec I would give this a fairly low priority.
Assignee | ||
Comment 4•25 years ago
|
||
I had a conversation regarding this with Vidur. I'm adding him to the cc list...
Assignee | ||
Updated•25 years ago
|
Target Milestone: M11
Assignee | ||
Comment 5•25 years ago
|
||
Setting milestone to M11...
Assignee | ||
Updated•25 years ago
|
Target Milestone: M11 → M14
Assignee | ||
Comment 6•25 years ago
|
||
This isn't a beta blocker. Setting milestone to M14...
Assignee | ||
Comment 7•25 years ago
|
||
Bulk moving all M14 non-beta stopper bugs to M17...
Adding myself to the Cc list. The nsIStyledContent that peterl mentioned above is also the gateway for getting the support of "style", "id", and "class"... which are very much needed for MathML. As I mentioned in an email to nisheeth, vidur, and pierre, it is presently impossible to do things like, e.g., <mytag color="any-color">, because this requires the impossible task of enumerating all the colors in the .css file. Whereas if "style" was supported, one could just do <mytag style="color: any-color">... XUL folks have been enjoying this for a long time since nsIStyledContent is implemented by nsXULElement. It would be nice to enable this for all XML elements to enrich the support of XML+CSS within Mozilla.
I seem to remember that GetElementById was moved to the DOMDocument even in DOM 1, but can't see a mention of this at W3C now. However, GetElementById certainly is in DOMDocument in DOM 2 Candidate Rec, see: http://www.w3.org/TR/DOM-Level-2/core.html#i-Document So I think there is nothing in the DOM now that would be hindering this implementation. This will also help in implementing XLink/XPointer, and ID/IDREF(S) linking.
Adding "blocks" for bugs that also need to know about IDs.
Comment 11•24 years ago
|
||
There's at least one remaining problem with ID/IDREF links, expat doesn't tell the content sink which attribute is the ID/IDREF attribute...
Assignee | ||
Comment 14•24 years ago
|
||
Bringing in to M16... James, do you think it will be possible for you to provide us with a patch that to expat that supports notification of ID attributes?
Target Milestone: M17 → M16
Comment 15•24 years ago
|
||
Please mark nsbeta2+[5/16-]. We need this feature in so that XML documents can be formatted with CSS with specificity down to the unique-element level.
Keywords: nsbeta2
Summary: XML IDs need to be recognized for ID selectors → [FEATURE] XML IDs need to be recognized for ID selectors
Assignee | ||
Comment 16•24 years ago
|
||
Pasting an email update from James Clark... > Nisheeth Ranjan wrote: > If so, would it be possible for you to provide us with a patch to > expat that reports entity declarations to the embedding application. I know > that you've already implemented notification of ID/IDREF attributes. Do you > have any plans for implementing notification of whether an attribute is > "specified"? You can already tell whether an attribute is specified by using XML_GetSpecifiedAttributeCount. At http://www.thaiopensource.com/dist/expat/test/expat-20000512.zip you will find a test version of expat that adds support for notification of ID attributes (not IDREF attributes) using XML_GetIdAttributeIndex, and for notification of parsed general entity declarations via XML_SetExternalParsedEntityDeclHandler and XML_SetInternalParsedEntityDeclHandler.
Assignee | ||
Comment 17•24 years ago
|
||
Updating status whiteboard...
Whiteboard: Expected to land: 5/26/00
Comment 18•24 years ago
|
||
Putting on [nsbeta2-] radar. Not critical to beta2.
Whiteboard: Expected to land: 5/26/00 → [nsbeta2-]Expected to land: 5/26/00
Comment 19•24 years ago
|
||
In conjunction with this bug, it will be essential to be able to use document.getElementById on XML documents (DOM Level 2 extension). Hopefully once this bug is fixed, it will be simple to get getElementById working.
Assignee | ||
Comment 20•24 years ago
|
||
Marking nsbeta3...
Keywords: nsbeta3
Whiteboard: [nsbeta2-]Expected to land: 5/26/00 → [nsbeta2-]
Updated•24 years ago
|
Keywords: correctness,
testcase
Whiteboard: [nsbeta2-] → [nsbeta2-] hit during nsbeta2 standards compliance testing
Comment 22•24 years ago
|
||
nsbeta3+, lower priority
Priority: P3 → P4
Whiteboard: [nsbeta2-] hit during nsbeta2 standards compliance testing → [nsbeta2-] [nsbeta3+] hit during nsbeta2 standards compliance testing
Assignee | ||
Comment 23•24 years ago
|
||
Marking P1 because this is an important standards compliance issue
Priority: P4 → P1
Updated•24 years ago
|
QA Contact: chrisd → petersen
Assignee | ||
Comment 24•24 years ago
|
||
I have a fix in hand for this. Will check it in post review and more testing. The expat release pointed to by James Clark's comment in this bug report is integrated into my local build. ID attribute information is passed up from the parser to the content sink and into the node info objects associated with content objects. nsIXMLContent now inherits from nsIStyledContent which allows authors to use ID selectors to target elements in an XML document.
Whiteboard: [nsbeta2-] [nsbeta3+] hit during nsbeta2 standards compliance testing → [nsbeta2-] [nsbeta3+] [fixinhand] hit during nsbeta2 standards compliance testing
Assignee | ||
Comment 25•24 years ago
|
||
The fix for this is checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•