Project

General

Profile

SQS and XML Technologies

Non-Deterministic Content Models of SQS Source File Format

SQS is heavily based on XML technologies.

First of all, the format of ".sqs" file is an instance of XML.
An instance of XML can have non-deterministic content models. That means you can define your additional elements and attributes with your own XML vocabulary in your XML namespaces and put them in existing XML content models to extend their semantics.

For example, you can put some XML fragments like this in your ".sqs" file:

  <example:newquestion example:xmlns="http://example.com/sqs" ... >
  .....
  </example:newquestion>

Override Built-In XSLT Files which are used in XSL-FO Pipeline

There is a pipeline translating a ".sqs" file into a PDF file, based on XSLT and XSL-FO technology. cf: http://dev.sqs2.net/attachments/download/59
The built-in ".xsl" files for this translation are embedded in sqs-translator-*.jar file.

There is an easy way to customize ".xsl" files by users, at runtime of SourceEditor.
SQS users can override these built-in ".xsl" files with their own ".xsl" files. Do as follows:

  • Step 1: mkdir c:\Users\username\.sqs\SQS_SourceEditor_2_0\xslt
  • Step 2: copy "sqs-translator/src/main/resources/xslt/*.xsl"
    files from SQS mercurial repository.
  • Step 3: put the ".xsl" files(of Step 2) into the folder(of Step 1).
  • Step 4: modify the ".xsl" files to support your new type of questions.

For example, you may want to create 2 or more columns of flow content in XSL-FO processing, then you should modify the "sqs-translator/src/main/resources/xslt/convert3.xsl" file to include "column-count" attributes in "fo:region-body" elements to override XML-FO outputs:

  <fo:region-body column-count="2" ... >
    ....
  </fo:region-body>

Modular Framework of SourceEditor

SourceEditor is designed to have some potencial to edit non-deterministic content models. SourceEditor is an extension of an original generic XML editor, which GUI is designed to edit internal DOM tree nodes. It has a modular framework to make additional types of GUI components to edit additional types of questions. cf. source code of Java classes in "sqs-editor" project: package net.sqs2.editor.sqs.modules and net.sqs2.editor.sqs.modules.panel.

Future Plan to Re-Implement Current SourceEditor2.0

Now I have a plan to re-implement the XML editor in SourceEditor, to release SourceEditor2.1. Current HEAD branch of "sqs-editor" source code in Mercurial repository will be fully rewritten.
The new SourceEditor2.1 will be able to edit not only ".sqs" files but also related ".xsl" files at the same time.