Microsoft XML 2.5 SDK
XSL Working Draft Conformance Notes
[This is preliminary documentation and subject to change.]
The Microsoft® Internet Explorer 5 XSL implementation is based on Section 2 (Tree Construction) of the Extensible Stylesheet Language (December 18th Working Draft), found at http://www.w3.org/TR/1998/WD-xsl-19981216.html. Unimplemented features and known conformance bugs are listed below.
Unimplemented Features
There are a number of features that are not implemented in this release. Partial workarounds are noted where they exist.
- <xsl:id> (section 2.4.2.1). Workaround: IDs must be declared in a DTD or XML Schema.
- Most white-space control features (section 2.4.8) including <xsl:strip-space>, <xsl:preserve-space>, and <xsl:text>, and the attribute values default-space="strip" and indent-result="no". The attribute values default-space="preserve" and indent-result="yes" are supported as the defaults; other values for these attributes are ignored. Workaround: xml:space is honored in both source and style sheet. Also see Controlling White Space.
- priority attribute (section 2.5.1). Workaround: Rely on the fallback to document order. See Authoring Match Patterns.
- Built-in templates (section 2.5.2). Workaround: Add these templates to each style sheet that relies on them. See Simulating Built-in Templates.
- Positional qualifiers (section 2.6) including first-of-type(), last-of-type(), first-of-any(), and last-of-any(). Workaround: Use the functions index(), end(), and subscripts—"*[0]". See XSL Patterns.
- ancestor-or-self() (section 2.6). Workaround: Instead of:
<xsl:value-of select="ancestor-or-self(*[@inherited])/@inherited"/>
use something like:
<xsl:choose>
<xsl:when test="@a">
<xsl:value-of select="@inherited"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="ancestor(*[@inherited])/@inherited"/>
</xsl:otherwise>
</xsl:choose>
- <xsl:element> does not accept an NCName (section 2.7.2.2). Workaround: Prefixed names are resolved according to namespace declarations in effect at that point in the style sheet.
- Quoted namespaces (section 2.7.2.1). Workaround: Use <xsl:element> instead.
- Named attribute sets (section 2.7.2.4). Workaround: Specify attributes in each template instead.
- Processing modes (section 2.7.8). Workaround: Use nested templates. See Scoping Templates.
- Numbering in either source or result trees (section 2.7.10). Workaround: Use script to generate the number. See Generating Item Numbers Using Script.
- name(), constant(), and arg() functions in <xsl:value-of> (section 2.7.12.1). Workaround: Use variables in script. See Calling Script During Transformation.
- Attribute value templates (curly braces in attribute values) (section 2.7.12.3). Workaround: Use <xsl:attribute>. See Accessing and Outputting Attributes.
- String constants (section 2.7.14). Workaround: Use script variables instead.
- Macros (section 2.7.15). Workaround: Duplicate the macro code in each template requiring it.
- Import/Include (section 2.8). Workaround: Include can be simulated with external entities.
Section 3 (Formatting Objects) is not supported in this release.
Known Conformance Bugs
A few areas were unable to be updated to the latest syntax in time for this release. This syntax should be considered obsolete and should not be relied on when authoring style sheets conformant to the Working Draft.
- <xsl:sort> syntax is not yet supported. Instead an order-by attribute provides similar functionality. The <xsl:sort> syntax should be updated in the next release. See Sorting XML.
Extensions
The Internet Explorer 5 XSL release also contains a number of extensions to enhance the capabilities of XSL. The XSL Working Group has not approved these and should not be relied on when authoring style sheets conformant to the Working Draft.
- <xsl:script>, <xsl:eval>, and the language and expr attributes provide a limited escape to script for purposes of text-level manipulation and limited influence over the transformation process. This area has not been resolved by the Working Group and is subject to change.
- Extensions to the XSL Pattern Language (2.6) as described in the XQL Proposal at http://www.w3.org/TandS/QL/QL98/pp/xql.html and described in the XSL Patterns.