Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Practique enforces strict rules on the CSV/XSLS imports without attempting to recover or auto-correct input provided by the users in order to provide clear and deterministic handling of the input which in turn allows reliable outputs, data communication and exports.

Background

Practique's internal format for the textual information is HTML. HTML is then used to as the core information displayed to the users on Practique Server, Practique for iPad iOS and Practique for Browser platforms as well as exported to PDF and MS Word. This poses challenges when input from the users in the form of the CSV/XLSX files contains special characters, HTML reserved characters or invalid HTML fragments.

...

Practique does not attempt to auto-correct, auto-transform or infer any changes to the imports. This is important as some operations may change input, which is not desirable as changes to the input must be the responsibility of the user so that the user retains maximum control over the imported input.

Rules

I. Input must be valid XML

The source file values must be valid XML fragment which Practique validates using XML validator. If the source file contains plain text only without any HTML formatting it is necessary to encode special characters - see Rule III. If HTML markup is used for formatting it must be valid, for example (<strong>This text is bold <em>this is italic as well</strong>) is an invalid markup.

If values in source file does not pass XML validation, the source file will be rejected.

II. Input must be UTF-16, UTF-8 encoded

The source file must be, in full, encoded in UTF-16 or UTF-8 character encoding.

Practique will check the source file encoding first, trying to validate it as UTF-8. If that fails, it will try UTF-16. If that fails, the source file will be rejected.

III. Input must have HTML reserved characters (<, >, &) encoded as HTML entities (&lt;, &gt;, &amp;)

IV. Special characters must be UTF-8, UTF-16 characters

V. Formatting must be expressed using allowed HTML markup

Practique supports following HTML markup: sub, sup, em, strong, del, table[tr,td], ol, ul, li, p, br, pre, code, MathML.

Any other markup will be rejected.

Impact

Any input imported into Practique must be XML adhering to the rules above. In practice users input data in two main forms, plain text and HTML.

...