Migrating to PSML
An alternative to converting the existing PS Standard documents is to export them as Universal Format and upload them to a new PSML group. This may be more work than straight conversion and will not preserve the edit history or comments. However, it may be useful if the document or group structures are to be redesigned at the same time.
- Become familiar with PSML by reading the following:
- Universal format
- "PSML Quick Reference" and "PS Standard versus PSML" can be downloaded from Documents
- PSML element reference
- PSML Samples
Choose a project to convert to PSML. It will need to be done one project at a time.
Convert the existing PS Standard configuration files by clicking Convert configuration to PSML on the Dev > Document config page for the project (in developer perspective). Note: This will not convert schematron, CSS or Ant publish script files.
Create a test group under the project and ensure that all the document types can be created and edited:
Creation via the New Document page should be tested for all document types.
Existing PS standard documents in the project can also be exported as Universal Format and uploaded to the test group.
Convert the existing schematron, CSS and Ant publish scripts so they work with PSML documents and check them in the test group. See the following documentation:
If the PS project configuration is in a code repository (e.g. Mercurial) then the converted configuration files should be copied to the repository. For example click Export in the Project Files page in PageSeeder and the Publish Engine, unzip the files and copy the PSML configurations to Eclipse, then Commit/Push to Mercurial.
PS Label Values
<section ... format="pslabelvalues"/> will be converted to
PS XRef List
<section ... format="psxreflist"/> or containing
<xref type="replace|include" /> will be converted to
<section ...><title level="table"> will be converted to
Converted Section tables to a single
<section ... format="pslabelvalues"/> before conversion (by downloading, transforming, uploading).
For consistency, the PS standard conversion to PSML has been changed so that all values generated by the label values editor
type=checkbox appear in the
@value attribute and multiple values will be comma separated e.g.:
<property name="language" value="English"/> <property name="language" value="English,Spanish"/>
Previously these would have been converted as:
<property name="language" value="English"/> <property name="language"> <value>English</value> <value>Spanish</value> </property
Projects that use
EditorConfig.json may need to be modified to handle a
@value attribute with comma separated content.
Alternatively, all content may be modified after conversion to PSML (by downloading, transforming, uploading or editing individually in dev perspective) to have multiple
count="n" on the
<property> element. The
document-template.psml would also need to be updated.
After conversion, the
@datatype attribute on
<property> element will only be set if the property is not empty e.g.
<property name="related" value=""/> ... <property name="related" datatype="xref" count="n"><xref ... /></property>
@datatype attribute is important in the project, all content may be modified after conversion to PSML (by downloading, transforming, uploading or editing individually in dev perspective) to have the correct
@count attributes. The
document-template.psml would also need to be updated.
Before converting, ensure there is a recent PageSeeder database and filesystem backup.
After conversion, PS Standard XML documents will not be able to be uploaded or created in the group.
The following will need to be done for each group in the project.
- Go to the Group Manage page located under the Admin tab and click on Convert. Administrators can use the PSML migration page located under the Dev tab to convert whole projects at once.
- If the number of archived documents is large, they may be cleaned up by deleting some as they can take a long time to convert. To enable the delete function, add adminEnable=delete-documents in the template.properties.
- Alternatively, the archive folder can be moved to another group and converted later. For this, a backup group under the project containing a folder with the name of the group could be used.
- Leave Validate Only ticked and click on Start
- If there are validation warnings/errors, click on Show Logs then click on the View next to each document with errors and fix it as described below. It can be useful to click 'Show Warnings and Errors only' or to view the logs in a larger window go to the Admin > Console or Admin > Group Console and view the Process logs.
- Warnings (in orange) can usually be ignored. Validation errors on the original PS Standard XML appear as warnings. If these can not be corrected by the conversion they will also appear as errors (in red), similar messages may appear twice.
- The warning Conversion will change XRef type to 'none' due to other content in body is because of a "replace/include" XRef in a
<body>element that also has some other content. If the XRef is not required to be transcluded, for example, if only publishing to a website which doesn't require it, then this message can be ignored. Otherwise, the other content (including
) can be removed or the XRef can be replaced with an XRef type
- The warning Invalid Doc ID "[x]" will be removed during conversion means that the Doc ID x is not valid and will be removed. If it is not to be removed then it needs to be changed to something valid via the Properties tab.
- If the document is no longer required it can be deleted.
- Fix validation errors by editing the document. It may be useful to look at the document XML by clicking <f> in the developer tools block and do a find for the start of the element (e.g. <list ).
- If there are no XRefs to the document fix validation errors by creating a new document, copy/pasting the old content, deleting the original and then renaming the new document.
- Fix validation errors by downloading the document, editing manually and uploading it again.
- The error Unable to backup PS standard document:... usually means that document is missing on the file system. To fix this either delete the document or find the missing file and copy it to the server file system.
- The error URI already exists for:... means that it is trying to convert a file [name].xml to [name].psml but [name].psml already exists. To fix this either archive, delete or rename [name].psml
- The error PSML different to PS Standard content at text character [n] the last character of "[content]" means that during the conversion the text at the end of [content] would be changed. This is may be because of non XRef content under a
<section format="psxreflist">. If so it can be fixed by removing the non XRef content (including
) or removing
- The error The value "[x]" of attribute
@docidis wrong: expecting a "document-id" means there is an XRef or reverse XRef pointing to a document with an invalid Doc ID. This can usually be ignored as the conversion should remove the invalid Doc ID. If running the conversion a second time doesn't fix it , click on the XRef or reverse XRef to go to the document and then modify or delete the invalid Doc ID via the Properties tab.
- The error Exception parsing PS standard file usually means there is an encoding problem on the file. The document will need to be deleted or if there are no XRefs to the document, fix encoding errors by creating a new document, copy/pasting the old content, deleting the original and then renaming the new document.
- Some errors may say See document: followed by a file path. If there is a View link, the original PS standard document may be viewed in PageSeeder. However, to view the actual document file it must be accessed on the server file system under the
pageseeder/documents/[group]/.backupfolder. If using FTP , choose the option "show hidden files" to see them (e.g. In FileZilla select Server > Force Showing Hidden Files).
- Repeat steps 3 and 4 until there are no validation errors.
- Untick Validate Only and click on Start. This will do the final conversion of all the PS standard XML documents to PSML.
Created on , last edited on