XSLT functions

XSLT functions deal with XML files. These functions get information about XML documents, including the schema tree or the reference to an XML document, and prompt the user to specify the XML document associated with the current XSLT document.

MMXSLT.getXML()

Availability

Dreamweaver CS3.

Description

Gets an XML source string for an XML file.

Arguments

xmlSourceURI

  • A string representing a URI to an XML file. It can be absolute (http or https), site relative, or doc relative.

Returns

A string containing the contents of the XML file.

Example

 var xmlSource = MMXSLT.getXML(this.fileDataSetURL);

MMXSLT.getXMLSchema()

Availability

Dreamweaver 8.

Description

This function returns the schema tree for the specified XML file.

Arguments

schemaURI, {bRefresh}

  • The schemaURI argument, which is required, is a string that is a reference to a local or remote XML file.

  • The bRefresh argument, which is optional, is a Boolean value: true forces refreshing of the schema; false returns the copy of the schema from the XML schema cache. The default value is false.

Returns

A string that contains the XML schema tree.

Example

The following example gets the schema tree from the XML schema cache for menus.xml:

 var theSchema = MMXSLT.getXMLSchema("file:///c:/Program Files/Adobe/¬ 
    Adobe Dreamweaver CS5/Configuration/Menus/menus.xml"");

MMXSLT.getXMLSourceURI()

Availability

Dreamweaver 8.

Description

This function gets a reference to the XML source document associated with the current XSLT document.

Arguments

xsltfileURI, {bUseTempForRemote}

  • The xsltfileURI argument is a string that is the local file URI that points to the location of the XSL file.

  • The bUseTempForRemote argument, which is optional, is a Boolean value: true returns a reference to the temporary XML file (for example, file:///C:/Documents and Settings/username/Local Settings/Temporary Internet Files/Content.IE5/GTSLQ9KZ/rss[1].xml) that is downloaded when the original XML file is remote (for example, http://myHost/rssfeed.xml); false returns an absolute reference.

Returns

A string that contains the reference to the XML source document associated with the current XSLT document. If the XML source reference is a remote reference, the function returns the downloaded filepath to the temporary location.

Example

The following example gets the reference to the XML source document associated with c:\myxslt\myxsltdocument.xsl:

 var theXMLSource = MMXSLT.getXMLSourceURI("file:///c:/myxslt/myxsltdocument.xsl");

MMXSLT.launchXMLSourceDialog()

Availability

Dreamweaver 8.

Description

This function prompts the user to specify the XML source document that is associated with the current XSLT document. The user can choose either a local or remote reference to an XML document.

Arguments

{xsltfileURI}, {bUseTempForRemote}, {bAddSchemaReference}

  • The xsltfileURI argument is optional. It is a string that is the local file URI that points to the location of the XSL file. If this argument is omitted, it defaults to the current open document.

  • The bUseTempForRemote argument, which is optional, is a Boolean value: true returns a reference to the temporary XML file (for example, file:///C:/Documents and Settings/username/Local Settings/Temporary Internet Files/Content.IE5/GTSLQ9KZ/rss[1].xml) that is downloaded when the original XML file is remote (for example, http://myHost/rssfeed.xml); false returns an absolute reference.

  • The bAddSchemaReference argument is optional. It adds a reference in the current document that points to the XML source URI that is specified in the XML source dialog box. If this argument is omitted, it defaults to the current open document.

Returns

A string that contains the reference to the XML source document associated with the current XSLT document. If the XML source reference is a remote reference, the function returns the downloaded filepath to the temporary location.

Example

The following example launches the XML Source Document dialog box without specifying any values:

 MMXSLT.launchXMLSourceDialog()

 Adobe

Get help faster and easier

New user?

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online