Publish Control Files

The PCF is an XML data file which contains specific instructions concerning the manner in which OmniUpdate will process XML data upon publishing. In addition, the PCF specifies how the data is editable and displayed within OmniUpdate itself. Note that the PCF has the .pcf extension.

pcf-stylesheet Declarations

Note the second and third lines of the PCF example. These two pcf-stylesheet declarations each specify the XSL file that OmniUpdate is to use in order to transform the XML data into a desired output. There must be at least one such declaration in every PCF, but there is no limit to the number of such declarations that can be defined. Each declaration represents a desired output file that OmniUpdate will generate from the PCF.

pcf-stylesheet declarations have three attributes, two of which are required. The path attribute specifies the location of the XSL file to be used to generate the output, which will have the file extension defined in the extension attribute. Any output file always shares the file name of the PCF file with only the file extensions differing accordingly. Finally, the alternate attribute specifies that the declaration defines additional output that should be generated when the PCF file is published. In the example, this allows for the creation of an HTML document, as well as additional output of a CSV, comma separated values file. If alternate is left undefined, OmniUpdate will assume that alternate="no". The primary declaration (that with alternate set to "no" or undefined) will be the declaration used if previewed within OmniUpdate. As a side note, if OmniUpdate does not find a pcf-stylesheet declaration, the PCF file will be opened using the source editor. This is also true for generic XML files with xml extensions.

Tagging in PCF Files

Notice the OmniUpdate editable region tagging (See lines 16, 17, and 19). This method of defining editable regions is exactly the same as used in standard page tagging used within OmniUpdate. Please refer to the OmniUpdate help on page tagging for additional information on page tagging. As a general rule when using OmniUpdate tagging within a PCF, there should be absolutely no child nodes within the region defined by the page tagging except for any XHTML output generated by the WYSIWYG editor, or otherwise valid XHTML. This is due to the nature of XML.

Additional qualities of XML leave a large range of character entity references undefined. In order for character entities like   or © to function correctly within a PCF, they must first be defined in the PCF's Document Type Declaration (DOCTYPE) either in-line (See lines 4-8) or by referencing an external Document Type Definition, or DTD. The DOCTYPE must be declared at the beginning of the PCF following any pcf-stylesheet declarations. Additional information on character entities can be found on Wikipedia. This additional Wikipedia article further details DTD's.

 PCF Example - faculty-directory.pcf

Download Source

 Step By Step Explanation of Example

The faculty-directory.pcf example contains fictitious faculty directory-type data stored in XML format. The first pcf-stylesheet declaration instructs OmniUpdate via the extension attribute to output a file named faculty-directory.html using the XSL file defined by the path attribute. The second pcf-stylesheet declaration directs OmniUpdate to output at publish time, an additional CSV file, formatted by the respective XSL file (because the alternate attribute is set to "yes").

When a user edits faculty-directory.pcf within the OmniUpdate environment, they will be presented with data in the PCF file rendered according to the XSL file defined in the pcf-stylesheet declaration where the alternate attribute is not defined or defined as "no". An edit button will appear wherever the XSL file renders the document/title node because OmniUpdate tagging resides within this node.