- From: Bert Bos <bert@w3.org>
- Date: Wed, 22 Oct 2003 14:06:58 +0200
- To: "W3C CSS" <www-style@w3.org>
Jens Meiert writes: > Special situation: I now integrated an external document (using an own > stylesheet) by embedding its structure in a layer, whose ID here is 'foo'; its > stylesheet is again referenced externally and I only added the ID selector to it > to get a contextual selector in combination with each element. I think this is not the best approach to include one document in another (although it might be necessary for now to get the exact effect you want). If you put two things in the same file, you indicate that they share some context: same URL, same style, same scripts, same metadata... If you want the two things to keep an individual identity, they should remain in two files. You can then "transclude" one in the other, e.g., with OBJECT in HTML. That also allows you to combine things of different nature, such as HTML with PNG, SVG with MathML, SMIL with Ogg, etc. Of course, that then leads to the opposite question: sometimes you want to transclude something, such as a quotation or a graph, but still want it to blend in with its new context somewhat, by at least partially inheriting a style sheet. E.g, if you include an SVG diagram in HTML, you might want the colors and fonts of the diagram to match those of the surrounding text. That's part of a general question about the DOM of compound documents (inheriting style sheets, passing focus or mouse clicks, etc.) and the security questions that brings with it. There is some belief that this is an issue that merits a separate working group, rather than something that CSS, DOM, XLink, etc., should solve on their own. But so far little has been done. So, in summary, I'd prefer not to work on how to treat parts of one file as separate documents, but rather on how to treat separate files as one, compound document. Bert -- Bert Bos ( W 3 C ) http://www.w3.org/ http://www.w3.org/people/bos/ W3C/ERCIM bert@w3.org 2004 Rt des Lucioles / BP 93 +33 (0)4 92 38 76 92 06902 Sophia Antipolis Cedex, France
Received on Wednesday, 22 October 2003 08:09:03 UTC