[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] CSS does not use the XML syntax. Why not?
- From: Thomas Lord <lord@emf.net>
- To: Micah Dubinko <Micah.Dubinko@marklogic.com>
- Date: Mon, 23 Jun 2008 12:04:38 -0700
Micah Dubinko wrote:
> You could put a slight twist on the question and ask
>
> "Why don't any of the versions of CSS selectors use any of the versions of
> XPath?"
>
History, again. CSS precedes XPath by two years.
> (Not advocating any position, just interested in the discussion)
>
Does it need advocacy? A subset of XPath is surely isomorophic
to selectors. The parsimony of sharing syntaxes, semantics, and
implementations would likely work well. How could anyone
seriously object, were it practical to make that change? (The
impracticality is serious, though: we'll have browsers standardized
on the current syntax for quite a while to come I'm sure. Changes
that cause more browsers to implement CSS *correctly* are surely
a higher priority :-)
Were one to attempt an XML syntax for stylesheets (and XSLT transform
to ordinary CSS syntax) it would be interesting to see if the XML
version could use XPath. (Having XPath <-> XML transforms as
primitive operations or a standard library in XSLT and XQuery
would be handy for this and many purposes.)
An XML/XPath solution could (this is quite speculative) be a
very interesting tool. For example, given an XML database,
libraries of styles could be associated with various parts of some
of the schema present in the database. Then, pages could be
synthesized on the fly -- along with customized style sheets for
those pages. One can imagine systems that let users program
up new queries interactively, on the fly, and then then render
reports from those queries very smartly - composing various
XML-ized style sheet fragments into a complete stylesheet which,
as a final step, gets transformed to the syntax browsers like.
Micro-formats on steroids, so to speak.
-t
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]