www.fgks.org   »   [go: up one dir, main page]

Click to Rate and Give Feedback
Properties
 XSLDocument Property
XSLDocument Property

Retrieves a reference to the top-level node of the Extensible Stylesheet Language (XSL) document.

Syntax

[ oXSL = ] document.XSLDocument

Possible Values

oXSLObject that receives a reference to the root node of the style sheet document.

The property is read-only. The property has no default value.

Remarks

You can use the XSLDocument property to access the Document Object Model (DOM) for the XSL style sheet. For more information, refer to the XML DOM overview.

Example

This example uses the XSLDocument property to access the DOM for the XSL and change attributes representing sort keys.

function sort(key) {
  // Find the "order-by" attributes in the style sheet.
  var s = document.XSLDocument.selectNodes("*/xsl:template[@match='menu']
                                            //xsl:apply-templates/@order-by");
  
  // Replace the values with the new sort key.
  for (var i = s.nextNode(); i != null; i = s.nextNode())
  {
    i.value = key;
  }
  
  // Find the subset of the document we need to update.
  var d = document.XMLDocument.selectSingleNode("story/menu");
  
  // Apply the style sheet to the subset, and update the display.
  menu.innerHTML = d.transformNode(document.XSLDocument);
}

Standards Information

There is no public standard that applies to this property.

Applies To

document

See Also

XMLDocument
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker
DCSIMG