@wuiXslIframeButton(XML, XSL, [LABEL], [MIME_TYPE], [TITLE], [XSLTPROC_PARAMS], [BUTTONATTRS], [PAGE_TITLE])

Insert a single form button to apply a XSL style sheet to a XML document wrapped in an NST WUI <iframe>.

The following parameters are recognized:

XML

The full path to the XML file to process (on the server).

XSL

The full path to the XSL file to apply (on the server).

[LABEL]

The text the user clicks on. If omitted defaults to Process XML.

[MIME_TYPE]

The MIME type describing the results that will be returned. If omitted defaults to text/html.

[TITLE]

Optional title attribute to appear as a tooltip to the user when their mouse hovers over the button.

[XSLTPROC_PARAMS]

Optional set of additional parameters to pass to the xsltproc invocation (like: "-stringparam gpsFile ${GPSFILEPATH}").

[BUTTONATTRS]

Optional set of attributes to apply to input button entity.

[PAGE_TITLE]

Optional title for new page that will be opened (if omitted, we will use the LABEL as the title).

This macro is useful when you want to apply a XSL style sheet to a XML document and return the resulting output (typically nice looking HTML) back to the user.

Example of using the macro:

@wuiXslIframeButton("/var/log/nmap.xml","/usr/share/xsl/nmap.xsl","Format nmap XML",,,,"Nmap Report")

Assuming the com.ccg.macros.at.All class is within your CLASSPATH and the config/html.at macros file has been generated (Hint: run make atmacros in the wui directory), a developer should be able to run the above example by copy/pasting from below:

[root@probe root]# java com.ccg.macros.at.All <<EOF
@include("config/html.at",,"d")
@wuiXslIframeButton("/var/log/nmap.xml","/usr/share/xsl/nmap.xsl","Format nmap XML",,,,"Nmap Report")
EOF

This macro is defined as:

@javascriptButton("NstWui.openIframeXslPage({
  xml: '@param(0)',
  xsl: '@param(1)',
  mime: '@fnb("@param(3)","text/html")',
  params: '@param(5)',
  title: '@fnb("@param(7)","@param(2)")',
  win: '_blank'
})","@param(2)","@param(4)","@param(6)")