Re: Clever idea for func:script (was xmlns:exslt)

"Kurt Cagle" <[email protected]>
Newsgroups gmane.text.xml.xslt.extensions
Message-ID <[email protected]>
> I personally would be all for replacing the specification for
> func:script/@language to be an Internet media type, although I wonder
> whether it should then be renamed func:script/@type, with @language
> immediately deprecated.
>
> I also wonder how problematic this would be on deployed legacy.
>
> Thoughts, anyone?

The @language attribute has always struck me as being too ambiguous - it
could refer either to
the language designator "en-us", the language character encoding "UTF-16" or
the computer language
used in scripting, especially since @language (or @xml:lang) carries the
former connotation just
about everywhere EXCEPT with Microsoft. Moving to script/@type and a
mime-encoding makes more sense to me;
consider the stylesheet pi:
<?xml-stylesheet type="text/css" href="foo.xsl"?>
and the HTML style tag:
<style type="text/css">

The downside with mime is that it only deals with MIME types that have been
formally recognized by the IETF, so that
experimental types can prove problematic. Namespaces might solve this:

<js:script xmlns:js="http://www.ecma.org/javascript" src="myScript.js"/>

and would also simplify the resolution of specific scripting engines

<js:script xmlns:js="http://www.ecma.org/javascript/15" src="myScript.js"/>

but I suspect that the only ones who would want to adopt it would be us
advanced XML geeks.

-- Kurt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.