XSLT compatibility changes

In Windows Internet Explorer 9, the processing of XML and Extensible Stylesheet Language Transformations (XSLT) files has been modified for improved standards compliance and interoperability with other browsers. In particular, certain non-standard behaviors relating to the processing of XSLT files have changed.

In Internet Explorer 9, the changes to the processing ofXML and XSLT files are as follows:

  • The legacy Extensible Stylesheet Language (XSL) namespace is no longer supported.
  • Processing instructions with the name xml:stylesheet (note the colon) no longer cause XSLT to be processed.
  • The xsl:output element can now be used to specify XML parsing for XSLT output

The legacy XSL namespace

The legacy XSL namespace is no longer supported for XSLT files. If this namespace is applied to elements in an XSLT file, those elements will not be interpreted as XSLT elements and the document will not process as expected:


<xsl:stylesheet
xmlns:xsl="http://www.w3.org/TR/WD-xsl">

To adapt to this change, migrate to the standardized XSLT namespace:


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

xml:stylesheet Processing Instructions

Processing instructions with the name xml:stylesheet (note the colon) no longer cause XSLT to be processed:


<?xml:stylesheet type="text/xsl" href="my.xslt"?>

To adapt to this change, use the standardized xml-stylesheet processing instruction for loading XSLT:


<?xml-stylesheet type="text/xsl" href="my.xslt"?>

The xsl:output element

The xsl:output element can now be used to specify XML parsing for XSLT output, meaning output will no longer always parse as HTML.


<xsl:output method="xml">

To adapt to this change, explicitly opt-in to HTML parsing for XSLT if your output depends on HTML parsing rules:


<xsl:output method="html">

Related Topics

XSLT

 

 

Show:
© 2014 Microsoft