KB Version:

Page Navigation

Related Links

Learning Levels

Announcements RSS Feed of Announcements

Data Definition

Digest

data definition A Data Definition is a collection of XML data that has been authored manually or by use of the data definition builder (/common/data definition builder), and it describes how a certain set of data is structured.  Data definitions are used by Cascade Server to generate form-based input fields for the creation and editing of page content, as well as to generate XML data from the input provided by users in input fields.

Concept

Data Definitions provide structured authoring capabilities, which allow non-technical users to enter content in a series of form fields to create structured pages without the need for additional formatting.  These fields are automatically styled using an XSL stylesheet.

Cascade’s ability to provide full design control for custom pages, in addition to custom fields, including text, WYSIWYG, drop-down menus, check boxes, and radial buttons, contributes to a faster and more efficient content creation process.

An example of how a data definition may be used follows:

An article in an online magazine might be described as follows:

   

When applied to a page, a series of form input fields would be present: two text fields ('Headline' and 'Location'), a text field with a calendar chooser (‘Date’), a file chooser ('Image'), and a multi-line WYSIWYG text field ('Main Content').  When this form is completed, the CMS uses the data definition to make the data available as XML, like so:

     

Note that even though the <image-file> tag displayed above contains a <path> tag, the relationship between the current Page and the selected image is maintained using the id of the File asset representing the image.  This means that if a user renames the File or changes its parent Folder, this field will still link to the File; and the <path> tag will be updated with the File's new path. Deleting the File from Cascade Server will result in this field being empty (no File selected). After the File is deleted, creating a new File with path /plea-for-help-online/images/well.gif will not re-populate this field because the new File, even though it has the same path as the original, will have a different id. This concept applies to all types of asset choosers.

This XML data can then be transformed by an XSLT stylesheet for the purposes of presentation or multi-purposing of content.  Data definitions allow for definition of structure, which all data of a specific type should exhibit, and make automation of presentation and repurposing possible.

Technical

Data Definitions Overview

There are five basic conceptual steps in creating and implementing a Data Definition:

  • Use the Drag and Drop Data Definition builder, or write a Data Definition by hand in XML.

  • Assign the Data Definition to a page via the page system settings.

  • Edit the page, and fill in the form capture fields from the Data Definition.

  • View the XML as outputted from the Data Definition, and write a corresponding XSLT Format to transform it to the desired output.

  • Apply the format to the page’s DEFAULT region to transform the content (do not supply a block for the DEFAULT region, as the data definition XML is automatically placed there).

chartsdatadef

See below for step-by-step instruction in creating Data Definitions, attaching Data Definitions, and applying Formats to Data Definitions.


Creating a Data Definition


newdatadef

Structured authoring is a way to allow non-technical users to enter content into a series of fields without the need for additional formatting via the WYSIWYG.  Instead, pages using structured authoring allow users to type plain text into various fields or select various options. These structured fields are automatically styled using an XSL stylesheet.  The resulting page is automatically formatted to fit preset requirements.  In Cascade Server, structured authoring is accomplished using a Data Definition.

To create a Data Definition:

  1. In the Administration area, select ‘Data Definitions’ from the left navigation pane.
  2. Navigate to the container in which the new data definition will be stored, or create a new container.
  3. Click "New Data Definition"
  4. Complete the following fields in the "General" pane.
    1. Name – A descriptive name for your definition.
    2. Parent Container – This value will be set to the current container, but can be changed if desired by clicking on the chooser icon.
    3. If using the drag-and-drop Data Definition builder, on the "General" pane is where you can drag fields/tools into the Data Definition.
  5. If you'd like to enter your own XML, on the "XML" pane:
    1. XML – Enter XML content.
    2. When creating Data Definitions, users have the option to either use the drag and drop Data Definition builder, or to build them from scratch using XML. If entering XML to construct a Data Definition, the edit-area syntax highlighter will be on by default. If you wish to turn it off, simply uncheck the "Advanced Editor" checkbox. However, please note, doing so will only turn the advanced editor off for that single use of the editor. Upon creating a template or editing a template, the advanced editor will be on by default.Cascade Server Data Definition Sytnax Highlighter

    3. File Upload – As an alternative to entering content in the XML field, data definition XML content may be entered here.
  6. Click "Submit" to save the Data Definition.


Applying a Format to a Data Definition

  1. Click the Edit tab, and select the Configurations pane to display available configurations.

  2. The default configuration (HTML) will be shown. Click the browse icon located next to format in the DEFAULT region row.

  3. Select a Format, and click Confirm in the browse icon window.

  4. Click the Submit button to record the change.

The page will be visible, except the XML data from the data definition has been transformed into standard HTML and output in the default region. This will include formatting such as spacing, bold, and hyperlinks.

Attaching a Data Definition to a Page

To attach a Data Definition to a page:

  1. In the Home area, navigate to the desired page, and click on the ‘Edit’ tab.
  2. In the System pane, locate "Data Definition."
  3. Click on the chooser next to the Data Definition, and select the desired data definition.
  4. Click Submit to save the Data Definition on the page.  If necessary, click on the ‘Edit’ tab and enter content into the page using the Data Definition.

*Please note - with the availability of Content Types as of Cascade Server 5.5, it is recommended as a best practice that a Content Type is created using the appropriate Data Definition to then be applied to a page. Applying a Data Definition directly to a page is deprecated in favor of using Content Types.

Cross-Site Relationships

For information on Cross-Site relationships for Data Definitions, check out our Cross-Site relationship rules page.

Data Definition References

FAQs

  • Does Cascade Server offer Structured Authoring?

Related Links