Skip to Main Content Skip to Search
Product Documentation

xslt - Transform XML document using XSLT engine

Syntax

result = xslt(source, style, dest)
[result,style] = xslt(...)
xslt(...,'-web')

Description

result = xslt(source, style, dest) transforms an XML document using a stylesheet and returns the resulting document's URL. The function uses these inputs, the first of which is required:

[result,style] = xslt(...) returns a processed stylesheet appropriate for passing to subsequent XSLT calls as style. This prevents costly repeated processing of the stylesheet.

xslt(...,'-web') displays the resulting document in the Help Browser.

Tips

MATLAB uses the Saxon XSLT processor, version 6.5.5, which supports XSLT 1.0 expressions. For more information, see http://saxon.sourceforge.net/saxon6.5.5/

For additional information on writing XSL stylesheets, see the World Wide Web Consortium (W3C®) web site, http://www.w3.org/Style/XSL/.

Examples

This example converts the file info.xml using the stylesheet info.xsl, writing the output to the file info.html. It launches the resulting HTML file in the Help Browser. MATLAB has several info.xml files that are used by the Start menu.

xslt info.xml info.xsl info.html -web

See Also

xmlread | xmlwrite

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS