Publish Control Files (PCF)
The publish control file (PCF) is an XML data file which contains specific instructions concerning the manner in which OU Campus processes XML data upon publishing. The TMPL and the TCF process to define the PCF. In addition, the PCF specifies how the data is editable and displayed within the system itself. The PCF has the .pcf extension and the listing of PCF files are visible to content contributors from the Content > Pages view.
The examples on this page make use of a sample .pcf. The source code for the example PCF file is provided in a zip file. The file can be downloaded and unzipped to make use of the examples: faculty-directory-2.zip
The OU Campus templates typically include a stylesheet declaration in the processing instructions in the prolog. The second line of the PCF example (faculty-directory.pcf) includes the stylesheet declaration:
<?pcf-stylesheet path="faculty-directory.xsl" extension="html"?>
<?pcf-stylesheet path="faculty-directory-csv.xsl" extension="csv" alternate="yes"?>
This specifies the XSL file that the system uses 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 OU Campus generates from the PCF.
The example pcf-stylesheet declarations have three attributes, two of which are required. The three attributes are the path, extension and alternate.
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, the CMS assumes that alternate="no". The primary declaration (that with alternate set to "no" or undefined) will be the declaration used if previewed within OU Campus. 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.
Lines 16, 17, and 19 of the example, show the tagging for an Editable Region.
<!-- com.omniupdate.div label="title" group="Everyone" button="464" -->
<!-- com.omniupdate.editor wysiwyg="yes" -->
<!-- /com.omniupdate.div -->
This method of defining editable regions is the same as used in standard 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. These include entity references such as those for a non-breaking space: or for a copyright mark: © In order to function correctly within a PCF, they must first be defined in the Document Type Declaration (DTD).
DTDs can be declared either in-line or by referencing an external DTD. The DOCTYPE must be declared at the beginning of the PCF following any pcf-stylesheet declarations.
Take, for example, lines 4–8:
<!DOCTYPE document [
<!ENTITY nbsp " ">
<!ENTITY copy "©">
<!ENTITY trade "™">
This makes use of an in-line definition for non-breaking spaces, copyright symbol, and trademark symbol.
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.