[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xml-dev] Re: determining ID-ness in XML
This topic came up just this morning on the mozilla list
A real request for functionality from a real user:-)
Note the document _does_ reference the mathml dtd and the mathml dtd
does declare almost every element to have an id atribute of type ID
but the browser (for the reasons Roger gives below) doesn't read the dtd
so it doesn't really help.
Of course the functionality is there, re-declare in the internal subset,
but is this really the answer that we want to have to be telling users?
(Roger is the lead of the project to implement MathML in Mozilla.)
David
X-VirusChecked: Checked
To: mozilla-mathml@mozilla.org
From: "Roger B. Sidje" <rbs@maths.uq.edu.au>
Newsgroups: netscape.public.mozilla.mathml
Subject: Re: MathML and DOM
Date: Sat, 10 Nov 2001 10:25:51 +1000
Organization: Another Netscape Collabra Server User
X-Accept-Language: en
To: Lutz Lenzen <lenzen@iram.rwth-aachen.de>
Resent-From: mozilla-mathml@mozilla.org
X-Mailing-List: <mozilla-mathml@mozilla.org> archive/latest/2074
X-Loop: mozilla-mathml@mozilla.org
Precedence: list
Resent-Sender: mozilla-mathml-request@mozilla.org
Content-Type: text/plain; charset=us-ascii
Content-Length: 1482
Lutz Lenzen wrote:
>
> Example: I have 3x3-Matrix an want to change
> by a button-click one single entry of this matrix...(without the trick
> of just changing the hole matrix by taking a <div>-range.
It is a bit messy, but you need to try something like:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "mathml.dtd" [
<!ATTLIST mtd id ID #IMPLIED>
<!ATTLIST mi id ID #IMPLIED>
<!ATTLIST mrow id ID #IMPLIED>
]>
i.e., explictly specify that you want an attribute named 'id' of type ID
('id' could be named something else) on those XML/XHTML/MathML tags that
you want to access with getElementById(). And from there on, proceed with DOM
functions as usual. That's one of the strange things of XML.
(Normally, the official MathML DTD defines 'id' like that for all MathML tags,
but so are other things, and when trying to load the official "XHTML plus MathML"
DTD, my computer freezes for a short while... And bug 44458 makes this worse if this
huge DTD has to be parsed (and re-parsed) when browsing. So "mathml.dtd" is just a
trimmed 64 KB list of entities from the original 384 KB "XHTML plus MathML" DTD.)
---
RBS
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.