ietf-xml-mime
[Top] [All Lists]

Media types for XSL stylesheets

1999-10-11 18:25:41
XSL Transformations (XSLT) has become a proposed recommendation of W3C.  
The URL is:
        http://www.w3.org/TR/xslt

An example in 2.7 "Embedding Stylesheets" uses "text/xsl".

        <?xml-stylesheet type="text/xsl" href="#style1"?>
        <!DOCTYPE doc SYSTEM "doc.dtd">
        <doc>
        <head>
        <xsl:stylesheet id="style1"
                xmlns:xsl="http://www.w3.org/XSL/Transform/1.0";
                xmlns:fo="http://www.w3.org/XSL/Format/1.0";>
        <xsl:import href="doc.xsl"/>
        <xsl:template match="id('foo')">
          <fo:block font-weight="bold"><xsl:apply-templates/></fo:block>
        </xsl:template>
        <xsl:template match="xsl:stylesheet">
          <!-- ignore -->
        </xsl:template>
        </xsl:stylesheet>
        </head>
        <body>
        <para id="foo">
        ...
        </para>
        </body>
        </doc>


However, there is a note as below:

        NOTE: The text/xsl media type has not been registered. No decision 
        has been made on whether a media type other than text/xml or 
        application/xml will be used for XSLT and XSL.

Here is some background information about this issue.

1) At present, AFAIK, XSL is the only stylesheet in the XML syntax.  But this 
may change at any time.

2) An XSL stylesheet does not always begin with the XSL namespace.  If it 
is written in the simplified syntax shown in "2.3 Literal Result Element as 
Stylesheet" of XSLT, it can begin with any namespace.

3) An XSL stylesheet may be embedded as a part of XML document itself and 
is referenced by a fragment identifier from this XML document.  The above 
example demonstrates such an embedded XSL stylesheet.

4) The combination of 3) and 4) means that an embedded stylesheet may 
be in the simplified syntax, and can begin with any namespace. 

5) The example quoted above is controvertial.  If this document is delivered 
as "text/xml", what will be the media type for the referenced (embedded) 
XSL stylesheet?  text/xml or text/xsl?

Makoto
 
Fuji Xerox Information Systems
 
Tel: +81-44-812-7230   Fax: +81-44-812-7231
E-mail: murata(_dot_)makoto(_at_)fujixerox(_dot_)co(_dot_)jp