OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: XML + default CSS

[ Lists Home | Date Index | Thread Index ]
  • From: "Jeff (as seen on TV)" <jeff@whackwhack.com>
  • To: lisarein@finetuning.com, Ian Graham <ian.graham@utoronto.ca>
  • Date: Thu, 02 Nov 2000 09:25:12 -0600

One thing to think about - opening up a whole nother can of worms - you can
use servlets to fire when certain file types are launched.  the standard
example is setting all .html files to launch a deBlink servlet that strips
out all <blink> tags from a file before serving that file.

In the case of an xml file, in theory you develop a servlet that, upon a
request for a .xml file it:

A) checks to see if a style sheet was specified and
B) inserts/executes/attaches one if none was specified.

Without getting into java talk here it would really be very simple solution
which would work across all servers that support servlet engines (all major
and many minor ones do).  In addition - since this all happens on the
server, no worries about browser compatibility...


-----Original Message-----
From: Lisa Rein [mailto:lisarein@finetuning.com]
Sent: Thursday, November 02, 2000 8:33 AM
To: Ian Graham
Cc: Ravi Kumar; xml-dev@lists.xml.org
Subject: Re: XML + default CSS

hello Ravi and gang:

Ravi Kumar wrote:

> Folks,
> An XML page with NO style sheet attached to it, is cobbled together as
> one long string in browsers with no XSLT support (such as Netscape6)
> Is it possible to present data any better with a default CSS?
> Any examples of more intelligent default CSS?


Ian Graham wrote:

> However, each different document type will need its own style sheet,
> tailored for the element types (names) specific to it. Thus there is no
> way of building a 'generic' style sheet that works for all XML documents.

True this won't work with CSS.  But "default" style sheets can be
provided using XSL like the "default" XSL style sheet that IE5 uses for
XML documents that aren't associated with their own style sheet.  (This
seems like the same kind of generic functionality that Ravi was asking

Since the "XSL" stylesheet in IE5 also uses some DHTML to provide its
collapsible tree view effect, it couldn't be implemented as-is by
another standards-compliant browser.  But I don't see why it matters
what is used within a particular application for its default rendering
of arbitrary XML.  However each browser/device decides to go about it,
it sure is useful.  Having some kind of default view seems like a
minimum requirement for any kind of "XML Browser."

I was sure surprised that Netscape 6 didn't provide its own
browser-specific default view of an XML document.  Seems like it would
give that nifty Gecko rendering engine something useful to do :-)



News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS