Print PowerForm - Get input XML for XSLT transformation

20/03/2015 11:13

- Create IdentityTransform.xslt file first and set this file to OPTIONS/Printing/XSLT file url, save this settings.

- Go to your form and click Print button (use edit form for it to have also some values in a form)

New window is open and you can see output of xslt transformation - as it is identity transform, you will see original xml structure. This is the base for print form design later.


IdentityTransform.xslt

<?xml version="1.0" encoding="UTF-8"?>
  <xsl:stylesheet version="1.0" xmlns:xsl="https://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
  <xsl:template match="/">
    <xmp><xsl:copy-of select="*"/></xmp>
  </xsl:template>
</xsl:stylesheet>


Output (input XML):

  <ListItem Caption="">
    <Control ControlName="lbl_Title" ControlType="Label" Visible="True">Company Name</Control>
    <Control ControlName="c_Title" ControlType="TextBox" Visible="True">Alza SK</Control>
    <Control ControlName="lbl_FoundationDate" ControlType="Label" Visible="True">Foundation Date</Control>
    <Control ControlName="c_FoundationDate" ControlType="DatePicker" Visible="True">2015-03-09</Control>
    <Control ControlName="lbl_Product" ControlType="Label" Visible="True">Produkt</Control>
    <Control ControlName="c_Product" ControlType="ComboBox" Visible="True" />
    <Control ControlName="lbl_ProductEN" ControlType="Label" Visible="True">Product</Control>
    <Control ControlName="c_ProductEN" ControlType="ComboBox" Visible="True">Computers</Control>
    <Control ControlName="c_btn_Alert" ControlType="Button" Visible="True">Show information</Control>
    <Control ControlName="lbl_ID" ControlType="Label" Visible="False">ID</Control>
    <Control ControlName="c_ID" ControlType="TextBox" Visible="False">2</Control>
    <Control ControlName="lbl_FileRef" ControlType="Label" Visible="False">URL Path</Control>
    <Control ControlName="c_FileRef" ControlType="TextBox" Visible="False">/sites/powerforms7/Lists/CompaniesLocalization/2_.000</Control>
    <Control ControlName="lbl_FileLeafRef" ControlType="Label" Visible="False">Name</Control>
    <Control ControlName="c_FileLeafRef" ControlType="TextBox" Visible="False">2_.000</Control>
    <Control ControlName="c_hiddenProductSelection" ControlType="TextBox" Visible="False">Computers</Control>
    <Control ControlName="c_hiddenFormHeader0" ControlType="Label" Visible="False">Company information</Control>
  </ListItem>