If you do no have specific
format requirements, or would like to see examples of how to develop
using XSLT 1.0, you can use our "Presets" feature. To use a Preset,
click on the button in the Action Bar.
Using
the Presets feature will overwrite the existing definition. If you
overwrite your definition with a preset, please discard changes and
reopen the editor to avoid overwriting your work.
When creating a Preset, you are presented with the following options:
Build With Form Hierarchy
When this option is enabled, the tabs will be nested based on the hierarchy of the form.
When this option is disabled, the tabs will be all be placed at the same nested level.
Exclude Nodes With Blank Data
When
this option is enabled, the generated preset will include conditional
tags that will not include an elements tag if the value is blank.
Otherwise, all element nodes will always be included.
When using software to read the export, it may prefer to always have all blank nodes. If a human is going to be reading
Node Name
This option will determine how each node will be named. The naming options are:
- Element Id: This option will name nodes using the Element ID, with an "e" appended to the ID.
- Element with Id Attribute: This option will name all nodes "element", but will add an attribute that contains the Element ID.
- Description:
This option will clean the element description and use that description
as the name. This option can produce unwieldy node names and should be
used with caution.
Group Records By
This option will add code to the preset that will automatically group records by the persons Location, Grade, or Role.
Editing the Definition
Developing the export definition uses XSLT 1.0 as a processor to generate the text out.
As
you are developing, we encourage you to frequently preview the result
to understand how your code is working. The source of the preview data
is displayed in the "Data Source" panel, as described in Step 6. This
data source is populated with the most recent updated 25 records that
you also have access to.
We
have included a custom function that you can use to help with data
formatting. Certain formats such as CSV and JSON require some characters
to be handled differently. This can include quotes and commas. The
function is called str:sanitize(), and an example of using it is:
<xsl:value-of select="str:sanitize('e123456789')"/>
Additional Resources