Giter Site home page Giter Site logo

focheck's Introduction


focheck – Validate XSL-FO and Antenna House extensions in oXygen or standalone

focheck bundles a Relax NG schema and a Schematron grammar in an oXygen framework for detailed validation of XSL-FO – including FOs and properties added in XSL 1.1 – within oXygen XML Editor. focheck also validates the extension FOs and properties that Antenna House Formatter provides for improved formatted output. You can enable additional Schematron checks of some of the requirements of PDF/UA.

You can, of course, also use the focheck Relax NG (or equivalent W3C XSD) and Schematron outside of oXygen, either together or separately.

The Relax NG handles structural validation and the Schematron handles the additional constraints that cannot be expressed in Relax NG. The Schematron parses property value expressions using an XSLT-based parser generated by the REx parser generator plus an XSLT library for reducing the parse tree to XSL-FO datatypes.

focheck version numbers correspond to the Antenna House Formatter version current at the time of the release.

Disclaimer

focheck is a work in progress. It does not (yet) handle every XSL-FO property or every requirement in the XSL-FO spec, nor does it evaluate either functions or relative lengths.

Pull requests and new issues are welcome.

Installing

  • If you want to keep up-to-date with focheck releases, then you can install focheck as an add-on oXygen framework.
  • Versions of focheck have been bundled with oXygen since Oxygen 17.1.
  • If you want to use the current focheck version with an older oXygen version, then you can install focheck as an add-on oXygen framework.
  • Alternatively, you can download a static copy of the oXygen framework from GitHub.
  • If you want to easily keep up-to-date with changes, then you can clone this repository and 'pull' the latest version whenever you want.
  • If you want to hack on focheck or submit pull requests, then you can fork this repository and clone that onto your local machine.

Installing as add-on oXygen framework

Follow the instructions in the oXygen manual at https://www.oxygenxml.com/doc/ug-editor/topics/installing-and-updating-add-ons.html

The focheck update site URL is https://raw.githubusercontent.com/AntennaHouse/focheck/master/add-on.xml

Note that oXygen will require you to restart the editor after installing the add-on framework.

Installing a ZIP archive to oXygen frameworks directory

  1. Download the ZIP archive from the latest release on the 'Releases' page.
  2. Extract the folder in the ZIP archive to the oXygen frameworks directory.
  • On Windows, this is C:\Program Files\Oxygen XML Editor 24.1\frameworks, or something similar.
  • If you don't have permission to copy the folder to the frameworks directory, then you can use an alternative location as described below.
  1. Restart oXygen.

Installing a ZIP archive to an alternative frameworks location

If you don't have permission to modify the oXygen installation – for example, if oXygen is installed on Windows under C:\Program Files\ and you are not an Administrator – you can set oXygen to also use an alternative frameworks location.

  1. Click on the "Download ZIP" button on this project's main page to download the files.
  2. Extract the folder in the ZIP archive to a folder where you can create the new folder.
  3. In your oXygen preferences, add the focheck folder as an alternative frameworks location.
  1. Restart oXygen.

Installing a repository clone

  1. Clone the repository into either the oXygen frameworks directory or another directory.
  • focheck incorporates stf as a submodule. There are two ways to also check out stf:
    • Pass --recursive to git clone when you check out focheck
    • If you've already checked out focheck, you can run git submodule init git submodule update
  1. If necessary, add the focheck folder as an alternative frameworks location.
  2. Restart oXygen.

Using focheck

oXygen XML Editor

When you open an XSL-FO document – where the document element is root in the XSL-FO namespace – oXygen will automatically validate the document against both the Relax NG schema and the Schematron grammar.

PDF/UA checks

Enable the 'PDF/UA Accessibility' validation scenario to enable additional Schematron checks of some of the requirements of PDF/UA.

'PDF/UA Accessibility' enabled in 'Configure Validation Scenarios' dialog box

Schematron severity levels

oXygen uses the Schematron role attribute to determine the severity level of a failed assert or report. See https://www.oxygenxml.com/doc/ug-editor/topics/validate-xml-with-sch.html

focheck maps the RFC 2119 keywords that are used in the XSL 1.1 Recommendation to oXygen severity levels as follows:

RFC 2119 Keyword oXygen severity level
MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT Error
SHOULD, SHOULD NOT, RECOMMENDED, MAY, OPTIONAL Warning

Transformation scenarios

As well as providing validation, focheck defines two validation scenarios for processing your FO file with Antenna House Formatter. See https://github.com/AntennaHouse/focheck/wiki/focheck

Ant

Use the build-focheck.xml Ant build file and the validate.single target to validate a file using both Relax NG and Schematron. Alternatively, use the schematron.single or schematron.dir target to run Schematron on one or multiple files.

Emacs mode

focheck.el associates the RELAX NG schema with .fo files. The fo-format command runs Antenna House Formatter (or any command-line formatter) on the current file.

Add this to our .emacs file.

(setq load-path
      (append
       (list
	"/path/to/focheck/emacs"
	)
       load-path))

;; XSL-FO mode
(autoload 'fo-mode "focheck" "Major mode for editing XSL-FO." t)
(setq auto-mode-alist
      (append
       (list
	'("\\.fo$" . fo-mode))
       auto-mode-alist))

Standalone

You can use the Relax NG schema in the schema folder and the Schematron files in the schematron folder outside of oXygen and Ant. However:

  • The Relax NG schema works with Jing and with Emacs nxml-mode but not with xmllint.
  • The Schematron requires an XSLT 2.0 binding and a Schematron implementation that will both match on attributes as contexts as well as import and use external XSLT 2.0 stylesheets.
  • Use focheck.sch for XSL-FO and Antenna House Formatter checks, and use pdf-ua.sch for checking some of the requirements of PDF/UA.

Standalone checking requires Saxon 9 and Jing. You can get Jing from https://github.com/relaxng/jing-trang/releases.

Building

oXygen XML Editor

  1. Open build.xml in oXygen.
  2. Run the default "ANT" transformation scenario.

Standalone

  1. If the properties in build.properties are not correct for your system, then copy build.properties to build.local.properties in the same directory and set the correct values there.
  • You can delete or comment out any properties in build.local.properties that you don't need to change.
  1. Run Ant.

Other Ant targets

run.parser

Runs the parser on ${input}.

framework.zip

Makes a Zip archive of just the oXygen framework.

License

Copyright 2015-2024 Antenna House, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Additional components:

The HTML MathML entity set is bundled with the focheck oXygen framework but is not included in the focheck schema. The entity set was downloaded from http://www.w3.org/TR/xml-entity-names/

 Copyright 1998 - 2011 W3C.

 Use and distribution of this code are permitted under the terms of
 either of the following two licences:

 1) W3C Software Notice and License.
    http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231.html

 2) The license used for the WHATWG HTML specification,
    which states, in full:
        You are granted a license to use, reproduce and create derivative
        works of this document.

The schema for MathML3 is included in the Relax NG and Relax NG compact syntax versions of focheck. The MathML3 schema was downloaded from http://www.w3.org/Math/RelaxNG/

#     This is the Mathematical Markup Language (MathML) 3.0, an XML
#     application for describing mathematical notation and capturing
#     both its structure and content.
#
#     Copyright 1998-2010 W3C (MIT, ERCIM, Keio)
# 
#     Use and distribution of this code are permitted under the terms
#     W3C Software Notice and License
#     http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231

The schema for SVG 1.1 is included in the Relax NG and Relax NG compact syntax versions of focheck. The SVG 1.1 DTD was downloaded from http://www.w3.org/TR/SVG/svgdtd.html

     The Scalable Vector Graphics (SVG)
     Copyright 2001, 2002, 2011 World Wide Web Consortium
        (Massachusetts Institute of Technology, Institut National de
         Recherche en Informatique et en Automatique, Keio University).
         All Rights Reserved.

     Permission to use, copy, modify and distribute the SVG DTD and its
     accompanying documentation for any purpose and without fee is hereby
     granted in perpetuity, provided that the above copyright notice and
     this paragraph appear in all copies.  The copyright holders make no
     representation about the suitability of the DTD for any purpose.

     It is provided "as is" without expressed or implied warranty.

focheck – oXygenまたはスタンドアロンで XSL-FO とアンテナハウスの拡張を検証します。

focheck には、( XSL 1.1で追加された FO とプロパティを含めた) XSL-FO の詳細な検証のための Relax NG スキーマと Schematron グラマーが oXygen XML Editor の oXygen フレームワーク内にバンドルされます。 focheck は、より良い組版出力のため、Antenna House Formatter が提供する拡張とプロパティも検証します。もちろん、focheck Relax NG (または、W3C XSD と等しい)と oXygen 以外の Schematron を一緒に、または別々に使用することもできます。

Relax NG は、構造的な検証を扱い、Schematron は Relax NG では表現できない追加の制約を扱います。Schematron は、 REx パーサジェネレータによって生成された XSLT ベースのパーサと、 パースツリーを削減するための XSLT ライブラリを使用して、プロパティ値の式を XSL-FO のデータタイプにパースします。

focheck 版の番号は、リリース時の Antenna House Formatter 版に対応しています。

免責事項

focheck の開発は進行中です。まだ全ての XSL-FO プロパティ又は XSL-FO 仕様の全ての必要条件を扱わない、また、関数や相対的な長さを評価しません。

Pullリクエストや問題がありましたらお知らせください。

インストール

*最新の focheck リリースに追従したい場合、oXygen のアドオンフレームワークとして focheck をインストールすることができます。

  • focheck 0.3.1 は ( 2015 年から) oXgen 17.1 から 19.1 までにバンドルされています。 ** oXygen の古い版での focheck を使用する場合、oXygen のアドオンフレームワークとして focheck をインストールすることができます。 *代わりに、ここから oXygen フレームワークの静的なコピーをダウンロードすることができます。 *最新の変更に追従したい場合、このリポジトリをクローンして、いつでも好きな時に最新版を pull することができます。
  • focheck をハックしたり pull リクエストをサブミットしたり場合は、このリポジトリをフォークして、ローカルマシンにクローンすることができます。

アドオン oXygen フレームワークとしてのインストール

https://www.oxygenxml.com/doc/ug-editor/topics/installing-and-updating-add-ons.html の oXygen のマニュアルの指示に従ってください。

focheck の最新サイトの URL は https://raw.githubusercontent.com/AntennaHouse/focheck/master/add-on-ja.xml

oXygen はアドオンフレームワークをインストールした後、エディタの再起動が必要になります。

oXygen frameworks ディレクトリに ZIP アーカイブをインストールする

  1. Releases ページにある最新リリースから ZIP アーカイブをダウンロードして下さい。
  2. oXygen frameworks ディレクトリに ZIP アーカイブにあるフォルダを解凍します。
  • Windows では、これは C:\Program Files\Oxygen XML Editor 24.1\frameworks か同様のものです。
  • frameworks ディレクトリにフォルダをコピーする許可がない場合は、以下に説明するように、別の場所を使用することができます。
  1. oXygen を再起動します。

代替 フレームワークの場所に ZIP アーカイブをインストールする

インストールを変更する許可がない場合は、例えば、 Windows で C:\Program Files\ 下に oXygen が インストールされていて、あなたが管理者でない場合、代替フレームワークの場所を使用するように oXygen を設定することができます。

  1. ファイルをダウンロードするには、このプロジェクトのメインページの Download ZIP をクリックします。
  2. 新しいフォルダを作成することができるフォルダに ZIP アーカイブ内のフォルダを解凍します。
  3. oXygen の環境設定で、代替フレームワークの場所として解凍した focheck フォルダを追加します。
  1. oXygen を再起動します。

リポジトリクローンをインストールする

  1. oXygen frameworks ディレクトリ又は別のディレクトリのどちらかにリポジトリをクローンします。
  • focheck はサブモジュールとして stf を組み込まれています。stf を確認するのは、二つの方法があります。
    • focheck を確認すると、git clone--recursive を飛び出します。
    • focheck を既に確認していた場合、次下を実行できます。 git submodule init git submodule update
  1. 必要ならば、別のフレームワークの場所として focheck フォルダを追加します。 .
  2. oXygen を再起動します。

focheck の使用

oXygen XML エディタ

XSL-FO 名前空間の root が文書要素がである XSL-FO 文書を開くと、oXygen は Relax NG スキーマと Schematron グラマーの両方に対して文書を自動的に検証します。

変換のシナリオ

同様に有効を用意するとして、focheck は、Antenna House Formatter を使用して FO ファイルを処理するための二つの有効なシナリオを定義します。https://github.com/AntennaHouse/focheck/wiki/focheck を参照して下さい。

Ant

Relax NG と Schematron の両方を使用してファイルを検証するため、Ant のビルドファイル build-focheck.xmlvalidate.single のターゲットを使用します。代わりに、一つまたは複数のファイルでの Schematron を実行するには、schematron.single 又は schematron.dir ターゲットを使用します。

Emacs モード

focheck.el は RELAX NG スキーマを .fo ファイルに関連付けます。

スタンドアロン

oXygen と Ant を使用せずに、schema-ja のフォルダに Relax NG のスキーマと schematron-ja のフォルダに Schematron ファイルを使用することができます。しかし:

  • Relax NG は、xmllint ではなく、Jing と Emacs nxml-mode で動作します。
  • Schematron は XSLT 2.0 バインディングと、次の Schematron 実装を必要とします。それは、外部 XSLT 2.0 スタイルシートを読み込み使用するのと同様のコンテキストで属性に合致するものです。

Standalone での確認は Saxon 9 と Jing が必要です。Jing は https://github.com/relaxng/jing-trang/releases からダウンロードできます。

構築

oXygen XML エディタ

  1. oXygen で build.xml を開きます。
  2. デフォルトの Ant 変換のシナリオを実行します。

スタンドアロン

  1. build.properties の プロパティが使用するシステムに合わない場合は、同じディレクトリで build.propertiesbuild.local.properties に コピーして、そこに正しい値を設定します。
  • build.local.properties にあるいずれのプロパティも変更する必要はない場合、削除するか、コメントアウトできます。
  1. Antを実行します。

その他の Ant ターゲット

run.parser

${input} でパーサを実行します。

framework.zip

oXygen フレームワークの Zip アーカイブを生成します。

ライセンス

Copyright 2015-2024 Antenna House, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Additional components

The HTML MathML entity set is bundled with the focheck oXygen framework but is not included in the focheck schema. The entity set was downloaded from http://www.w3.org/TR/xml-entity-names/

 Copyright 1998 - 2011 W3C.

 Use and distribution of this code are permitted under the terms of
 either of the following two licences:

 1) W3C Software Notice and License.
    http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231.html

 2) The license used for the WHATWG HTML specification,
    which states, in full:
        You are granted a license to use, reproduce and create derivative
        works of this document.

The schema for MathML3 is included in the Relax NG and Relax NG compact syntax versions of focheck. The MathML3 schema was downloaded from http://www.w3.org/Math/RelaxNG/

#     This is the Mathematical Markup Language (MathML) 3.0, an XML
#     application for describing mathematical notation and capturing
#     both its structure and content.
#
#     Copyright 1998-2010 W3C (MIT, ERCIM, Keio)
# 
#     Use and distribution of this code are permitted under the terms
#     W3C Software Notice and License
#     http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231

The schema for SVG 1.1 is included in the Relax NG and Relax NG compact syntax versions of focheck. The SVG 1.1 DTD was downloaded from http://www.w3.org/TR/SVG/svgdtd.html

     The Scalable Vector Graphics (SVG)
     Copyright 2001, 2002, 2011 World Wide Web Consortium
        (Massachusetts Institute of Technology, Institut National de
         Recherche en Informatique et en Automatique, Keio University).
         All Rights Reserved.

     Permission to use, copy, modify and distribute the SVG DTD and its
     accompanying documentation for any purpose and without fee is hereby
     granted in perpetuity, provided that the above copyright notice and
     this paragraph appear in all copies.  The copyright holders make no
     representation about the suitability of the DTD for any purpose.

     It is provided "as is" without expressed or implied warranty.

focheck's People

Contributors

hidaruma avatar raducoravu avatar tgraham-antenna avatar tkg avatar toshihikomakita avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

focheck's Issues

background-image properties missing

It seems to me, that on

http://www.antennahouse.com/product/ahf60/docs/ahf-ext.html#IDAAOLV

the specification might be unclear. Are those properties to be used with or without "axf:" prefix? We seem to be using them with axf: prefix, but not currently.
In any case I find those properties missing for fo:simple-page-master. The quoted page says:

Applies to: fo:simple-page-master, fo:page-sequence, all formatting objects

What does "all formatting objects" mean here?

float uses some axf:float* attributes

…which are currently missing. I did not have to use them after some experimentation, but there are

axf:float
axf:float-reference
axf:float-x
axf:float-y

Jing: »first occurrence of ID "some"« is reported for all non-first instances

For each duplicate attribute id an error »ID "some" has already been defined« is reported. I think this is sufficient, maybe the text could be a little bit similar to what AHF itself reports for duplicate IDs.

The additional error »first occurrence of ID "some"« is misleading as it is raised for all but the first occurrence of the duplicate attribute and therefore just fills the error view.

My suggestion:

  • create an INFO entry for the real first occurrence of this id value (unless this is too time-consuming)
  • or remove that error

Thanks!

Jing: value of attribute "axf:float" is invalid…

value of attribute "axf:float" is invalid; must be equal to "after", "auto", "auto-move", "auto-next", "before", "bottom", "center", "column", "end", "inside", "keep", "keep-float", "left", "multicol", "next", "none", "normal", "outside", "page", "right", "skip", "start", "top" or "wrap"

It seems to me the RNG does not take into account that you can have many of these tokens in axf:float.

In may testcase the attribute reads: axf:float="top right page"

RNG file "axf.rng" is invalid

Validating it in Oxygen I get about 4 validation errors reported related to ID type attributes like:

an "element" pattern containing an "attribute" pattern with a non-null ID-type must have a name class that contains only "choice" and "name" elements
conflicting ID-types for attribute "id" from namespace "http://www.w3.org/XML/1998/namespace" of element "flow" from namespace "http://www.w3.org/1999/XSL/Format"

As a suggested fix in fo.rng when "anything" is defined, we can exclude elements in the FO namespace:

  <define name="anything">
   <zeroOrMore>
  <choice>
    <element>
      <anyName>
        <except>
          <nsName ns="http://www.w3.org/1999/XSL/Format"/>
        </except>
      </anyName>

and in axf.rng in the "define name="non-xsl"" maybe remove those optional attributes:

   <optional>
        <attribute name="id">
          <data type="ID"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="ref-id">
          <data type="IDREF"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="internal-destination">
          <data type="IDREF"/>
        </attribute>
      </optional>

Add documentation for each extension AH element and attribute

In a Relax NG schema you can add documentation for each element and attribute, for example:

  OXYGEN_INSTALL_DIR\samples\relaxng\personal.rng

Oxygen picks up the documentation and shows it in the content completion window when editing the XSL-FO file.

Update license information to also specify other separate licensed resources

Our legal was looking in the framework and they had some feedback about the fact that the framework incorporates other resources which are licensed in some other way (example: the HTML MathML entity set), I quote:

The owner of the project could implement an addition to the Apache 2.0 license and list there the licenses for the other components which appear in the framework.

I'm attaching the suggested changes:
licenseAddition.txt

max-/min-width/-height are missing for or fo:external-graphic

It seems the four properties max-height, max-width, min-height, min-width are not listed in the spec as being valid for fo:external-graphic.

In the spec in the section about fo:external-graphic, "max-height" is mentioned in a note, but not listed under the properties applicable.

Maybe one need a better grip at understanding the spec?

We are also using those properties with fo:block, but I am not sure whether this should be working.

axf:hyphenation-zone is not checked according to documentation

In the documentation it is said:

axf:hyphenation-zone may have values "none | "

and

It is invalid when 0 or less value is specified.

None of this is currently checked.

The description in the documentation could also be made a little bit clearer. Suggestion:

»The given value defines a distance from the end of the current block. If a word starts within that region, it will not be hyphenated.«

From my POV this seems to be a way of specifying the minimal text length instead of character count before a hyphenation may happen. Do you agree?

Expression parser as Saxon extension function.

REx can also generate a parser as a Saxon extension function.

It should be possible, and it should be faster, to use the expression parser as a Saxon extension function and fallback to the XSLT expression parser when the Saxon extension function is not available.

hyphenation-character="-" reported as syntax error

Usage

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" hyphenation-character="-">

It looks like the Schematron parser doesn't analyze "Literal" correctly, but I have to dive into that magic at another time…

axf:column-fill is missing

From what I read from the documents, it applies to "multi-column elements", which I assume are those that allow column-count="n", which in turn are fo:region-body, fo:block-container.

Omit warning for 2-letter language code?

If a language is specified as 2-letter language code the text from the spec is issued as a warning. I thin this is just a editorial notice and should not be a warning, i.e. using a 2-letter language code should not pollute the validation results.

I propose that 2-letter language codes and all other strings ('none', 'mul', 'und') which are handled correctly in any way, should not raise a warning.

5.4.6 Language Property
A value being a 2-letter code in conformance with [ISO639] is converted to the corresponding 3-letter [ISO639-2] terminology code, a 3-letter code in conformance with [ISO639-2] bibliographic code is converted to the corresponding 3-letter terminology code, a value of 'none' or 'mul' is converted to 'und'.

catalog.xml should explicitly list provided entity files

Current XML catalog focheck/schema/catalog.xml redirects all URI starting with http://www.w3.org/2003/entities/2007/. However not all entity files living at that location are provided as a part of focheck. This can lead to errors when other resource is referenced, e.g. http://www.w3.org/2003/entities/2007/w3centities-f.ent but local copy of file is not present.

Solution is either to copy all .ent files into focheck or explicitly list only entity files that are part of focheck in catalog.xml.

Invalid attribute field-readonly in axf:form-field

We received this feedback:
https://www.oxygenxml.com/forum/viewtopic.php?f=7&t=24267
about an XSL-FO file like this being considered invalid as it uses the "field-readonly" attribute in an axf:form-field :

    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
        xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
        xml:lang="en">
        <fo:layout-master-set>
            <fo:simple-page-master master-name="spm">
                <fo:region-body/>
            </fo:simple-page-master>
        </fo:layout-master-set>
        <fo:page-sequence master-reference="spm">
            <fo:flow flow-name="xsl-region-body">
                <fo:block>Hello, wo<axf:form-field
    field-type="text"
    field-name="dontwritehere"
    field-readonly="true"
    field-flags="Hidden"
    field-default-text="You can't write here!"/>rld.</fo:block>
            </fo:flow>
        </fo:page-sequence>
    </fo:root>

Schematron test for internal-destination is wrong

Current error is:

internal-destination="d13e15" token should be 'empty' or 'string'. Enumeration token is 'd13e15'.

It is not "empty or string" but "empty string or idref"

Can we check if referenced id is specified somewhere in the current document?

Spec says:

7.23.8 "internal-destination"
XSL Definition:
Value: empty string |
Initial: empty string
Inherited: no
Percentages: N/A
Media: interactive

Specifies the destination flow object within the formatting object tree. This property allows the destination flow object node to be explicitly specified.

Purpose of mathml entity mapping in catalog.xml

The focheck comes with a mapping like:

  <systemSuffix systemIdSuffix="htmlmathml-f.ent" uri="htmlmathml-f.ent"/>

Is there a purpose for the mapping? Could it possibly be re-written to be more specific?
One of our clients used in his DTD something like:

<!ENTITY % bla-f 
     PUBLIC "-//BLA//ENTITIES HTML MathML Set//EN//XML"
         "bla_htmlmathml-f.ent"
    >

and they expected the "bla_htmlmathml-f.ent" to be resolved to their local DTD but because Oxygen also loads the focheck catalog, the entity was mapped to the "htmlmathml-f.ent" located in the focheck framework.

Better message for image URI without 'url()'

AH Formatter (as with probably all formatters) accepts, e.g., fo:external-graphic/@src values without the url(...) that makes it a <uri-specification>.

The current Schematron error message is:

background-image="cloud.png" enumeration token is 'cloud.png'. Token should be 'none' or 'inherit'.

focheck should accept, but maybe warn about, the 'bare' URIs that every formatter accepts.

Complete the axf:line-number-* properties

From Antenna House USA support issue:

fo-check for oXygen is giving me some errors with the following situations:
...
3) <fo:block-container column-gap="9.75mm"
axf:line-number-width="4.75mm" axf:line-number-font-family="Arial"
axf:line-number-font-weight="normal" axf:line-number-reset="force" >

axf:outline-* are missing at fo:block

The documentation in section "Bookmark and Link in PDF Output" states this as an example for a PDF bookmark:

<fo:block axf:outline-level="1"
      axf:outline-expand="false"
      axf:outline-title="Table of Contents">
Attribute Value
axf:outline-expand true
axf:outline-group
axf:outline-level
axf:outline-title
axf:outline-color
axf:outline-font-style normal
axf:outline-font-weight normal

Schematron: Empty attribute values should not be reported as "Syntax error"

I am unsure, and cannot find anything in the spec that explains how empty attributes should be dealt with (like initial-page-number=""), but AHF must have a way how it deals with them. Are they ignored, or are they treated as if the default value would be present?

The Schematron check should give a useful message:

'initial-page-number' should be auto | auto-odd | auto-even | <number> | inherit. '' is an empty String.

Errors handling for 'background-image' and 'src' attributes.

One of our clients reported that having a background image with a value like this:

            background-image="../xml_tools/common/line_arrowR.tif"

reports a "Syntax error" in one of the Schematron schemas.
But using an 'src' attribute with a similar value on a fo:external-graphic does not although the XSL-FO specs says that both attributes are uri-reference types.
Also the error is not very clear, as an end user just by looking at the error message I do not know what to do to fix it.

Schematron: detecting languages?

I receive the following Schematron error for the fo:root attributes xml:lang="en" or language="en", but the description does not tell the attribute.

Description: Enumeration token is: 'en'. Token should be 'none' or 'inherit'.

It seems a list of allowed language codes or at least a formal regular expression should be present.

"A value being a 2-letter code in conformance with [ISO639] is converted to the corresponding 3-letter [ISO639-2] terminology code, a 3-letter code in conformance with [ISO639-2] bibliographic code is converted to the corresponding 3-letter terminology code, a value of 'none' or 'mul' is converted to 'und'."

Schematron: top="0" should be allowed

In http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-length I find:

After the '0' length, the unit identifier is optional.

I see Errors like this: 'top' should be Length, Percent, or EnumerationToken. '0' is a Number.

Please add '0' to the allowed values whenever is required. At least for those properties which are inherited from CSS, as the FO spec unfortunately says:

A signed length value where a 'length' is a real number plus a unit qualification.

If AHF treats all lengths like CSS specifies it, we can make our lives easier.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.