Closed Bug 92452 (entityrc) Opened 23 years ago Closed 7 years ago

DTD Level Style - attach external resources based on DOCTYPE

Categories

(Core :: XML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX
Future

People

(Reporter: xyzzy, Assigned: hjtoi-bugzilla)

References

()

Details

I am somewhat surprised that I haven't found anything relating to this in Bugzilla. Perhaps I am way off... In the continuing effort to separate content from style, stylesheets became available. At present, there are a handful of methods for linking style to a document, notably <?xml-stylesheet ?> and <link> in HTML. On a number of occasions, this has been a problem, because we are still not completely separating the style, because the list of styles is embedded within the document to be styled. The above URL seems to state that the current methods of linking are not exhaustive, and so I would like to an alternative. I propose Mozilla implement what I call "DTD Level Stylesheets". That is, for each DTD that Mozilla encounters, or expects to encounter, allow the use of a particular stylesheet or choice of stylesheets. These sheets could provide a fallback for XML documents where no author or user stylesheets are provided. They would also allow a consistent view (across different authors) of documents conforming to same DTD but with different specified stylesheets.
This could be done following what Synex ViewPort based systems did, and DocZilla might do/is doing. Basically adopt the SGML catalog approach to stylesheets and other attachments. Synex ViewPort technique is called entityrc. In the most simple system we would have a well-known file which maps public identifiers to stylesheets. If we open a file whose public id matches one in the mapping file, that stylesheet becomes automatically available to style the document.
Target Milestone: --- → Future
Summary: [RFE] DTD Level Style → DTD Level Style
QA Contact: petersen → rakeshmishra
Alias: entityrc
Summary: DTD Level Style → DTD Level Style - attach external resources based on DOCTYPE
smells like rdf to me. That way one could extend the set of mappings, with a 1:N mapping of identifiers to stylesheet attachements. Can we do this without modifying the original DOM? This needs to be a close friend to XML prettyprint, too.
I don't want to reinvent the wheel here. I'd much rather use/modify slightly something that exists, prefence being XML Catalog but it has been a while since I read the spec so I can't remember if it easily adapts to these requirements. The added benefit would be that we could use the same parser with just added/changed tokens.
Heikki, are you talking about http://www.oasis-open.org/committees/entity/specs/cs-entity-xml-catalogs-1.0.html#s.uri.ent ? From a half-drunken sailor, how would this handle xslt vs. css stylesheets? I see xslt handling diverging from css handling, with compiled stylesheets and all. Not really sure if we should just hit this off, check or sniff the mimetype and decide what to do with the data then. If we could register catalogs somehow, this could be kinda extensible, though. (So far without really reading that spec, which would be pretty useless right now)
Yes, marking dependency. Say we add a new type attribute (with our own namespace) to the XML Catalog public element, that would specificy the mime type of the URI.
Depends on: xmlcatalog
IMHO we should be linking resources (specifically, UA stylesheets) based on namespaces, not on document DOCTYPEs.
Doctype sniffing is confusing and hated enough on the text/html side. (See authoring newsgroups.) Let's not let it spread on the XML side. Metooing to what Hixie said.
QA Contact: rakeshmishra → ashishbhatt
QA Contact: ashshbhatt → xml
I think this should be WONTFIXed as a layering violation. IIRC, roc said even the doctype-based MathML UA style sheet hack isn't needed anymore.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.