[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

FW: Coordination of <script> between SVG, XSLT 1.1 and

Subject: FW: Coordination of <script> between SVG, XSLT 1.1 and HTML 4.01
From: Adam Van Den Hoven <Adam.Hoven@xxxxxxxxxxxx>
Date: Fri, 2 Mar 2001 15:17:12 -0800
svg between elements linked
I noticed this on the SVG and XML dev lists but it never made it to xsl so I
think that its worth posting for the rest of you.

-----Original Message-----
From: Arnold, Curt [mailto:Curt.Arnold@xxxxxxxxxxxxx]
Sent: Friday, March 02, 2001 2:52 PM
To: 'xml-dev@xxxxxxxxxxxxx'
Cc: 'xsl-editors@xxxxxx'; 'www-svg@xxxxxx'
Subject: Coordination of <script> between SVG, XSLT 1.1 and HTML 4.01


XSLT 1.1, SVG 1.0 and HTML 4.01 define a <script> element, however their
current forms are not coordinated.

XSLT 1.1 (http://www.w3.org/TR/xslt11/#define-extension-functions)

<!-- Category: top-level-element -->
<xsl:script
implements-prefix = ncname
language = "ecmascript" | "javascript" | "java" | qname-but-not-ncname
src = uri-reference
archive = uri-references>
<!-- Content: #PCDATA -->
</xsl:script>

HTML 4.01
http://www.w3.org/TR/1999/REC-html401-19991224/interact/scripts.html#h-18.2.
1

<!ELEMENT SCRIPT - - %Script;          -- script statements -->
<!ATTLIST SCRIPT
  charset     %Charset;      #IMPLIED  -- char encoding of linked resource
--
  type        %ContentType;  #REQUIRED -- content type of script language --
  src         %URI;          #IMPLIED  -- URI for an external script --
  defer       (defer)        #IMPLIED  -- UA may defer execution of script
--
  event       CDATA          #IMPLIED  -- reserved for possible future use
--
  for         %URI;          #IMPLIED  -- reserved for possible future use
--
  >

SVG 1.0 http://www.w3.org/TR/SVG/script.html

<!ELEMENT script (#PCDATA) >
<!ATTLIST script
  %stdAttrs;
  %xlinkRefAttrs;
  xlink:href %URI; #IMPLIED
  externalResourcesRequired %Boolean; #IMPLIED
  type %ContentType; #REQUIRED
>

--------------

Both HTML 4.01 and SVG 1.0 depend on a required type attribute containting a
MIME type that indicates the type of script ("text/ecmascript" for example).
XSLT 1.1 proposes a language attribute with a
qname/enumeration union type.  HTML 4.01 deprecates a "language" attribute
in preference to the "type" attribute.

Changing XSLT 1.1 to use a type attribute contain a MIME type would seem to
be the best approach.  I haven't found a MIME registry equivalent to the URI
schema registry at http://www.w3.org/Addressing
and if someone knows of one please let me know.  However, I assume that you
could use "text/java" or "text/cpp" for Java or C++ source and
"application/java" or something similar for Java bytecode or
JAR's.  It would seem that the "archive" attribute would be unnecessary if
there were distinct MIME types for a Java .jar or Win32 library.

Both HTML 4.01 and XSLT 1.1 use a src attribute if the script is contained
in an external resource, SVG uses xlink:href.  Either SVG should be changed
to use "src" or XSLT 1.1 should be changed to use
xlink:href.

XSLT 1.1 has the requirement that redundant implementations of the same
behavior can be specified so that one stylesheet could be executed as long
as one of the script types were supported.  This is
accomplished by only loading one script element that has a particular
implements-prefix value.

It would be useful if SVG could identify specific script elements as being
redundant implementations.  If you attempted to cover all your bases
providing <script> elements in ECMAScript, VBScript and
Java, a processor that implemented multiple scripting languages would run
them all.

The idea of associating a script element with a specific URI (ala XSLT) is
probably the right approach.  However, namespace prefixes are too fragile to
use to use in SVG.

Possibly, an implements attribute that has a URI value would work both for
XSLT and SVG.  In both SVG and XSLT, if there are multiple <script> elements
with the same value for implements, only one
would be loaded.  In SVG, the implements attribute would be optional and all
script elements without an implements attribute would be executed.

A <script type="application/java"> in SVG might be implemented by invoking a
constructor of the specific class that takes a SVGScriptElement as an
argument.  Any public properties or methods of the
class would be added to the environment.

------------------------------------------------------------------
The xml-dev list is sponsored by XML.org, an initiative of OASIS
<http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: xml-dev-request@xxxxxxxxxxxxx

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.