Coder Social home page Coder Social logo

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

Watchers

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

focheck's Issues

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'.

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…

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.

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!

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

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'."

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" >

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.

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.

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

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.

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?

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.

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>

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.

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"

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: 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.

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.

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.

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.

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

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?

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.