Giter Site home page Giter Site logo

xslt-quality's People

Contributors

innovimax avatar jimetevenard avatar mricaud 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xslt-quality's Issues

Check namespace on fn:transform map

From @Arithmeticus on slack xml.com:

Lesson learned. If building a map for fn:transform() , as a habit put an xmlns="[target XSLT default XPath namespace]" in the appropriate xsl:map-entry, e.g.,
<xsl:map-entry key="'static-params'" xmlns="">
xsl:map
<xsl:map-entry key="xs:QName('diagnostics-on')" select="true()"/>
</xsl:map>
</xsl:map-entry>
(Heck, put it at the topmost xsl:map.) If you don't and if you're working in an XSLT file whose default namespace is bound to something else (e.g., HTML), that default NS will get attached to any unprefixed result of xs:QName() . Good chance your parameter bindings will be ignored. One more test worth adding to one's Schematron XSLT checker. (Note, the target default XPath namespace, /*/@xpath-default-namespace should not be confused with the target default namespace xmlns="...".)

Parameters to let users control arbitrary thresholds

Hi @mricaud I've done a pull, and I'm working on some improvements. I'm looking at the rule on granular templates, with a seemingly arbitrary value of 10. Who says that's too much or too little granularity?

With the new XSLT component for the Schematron, we let users decide themselves what threshold of granularity should be permitted. All that would be needed is to set up an XSLT file exclusively for user-controlled parameters. But where should it be put?

One could argue that it should be put at /src/main/sch/xsl/parameters/config.xsl. That would be consistent with the resources, but not very convenient for normal users, who usually dislike going so deeply into an arbitrary directory structure.

Another argument is to put it at simply parameters.xsl. That would allow users a way to quickly and easily change the configuration that is appropriate for their project without worrying about deep file structures. (In general, the higher up a file, and the fewer siblings, the better it is for a user to find and control what they should.) But it would mean that the main file at src/main/xsl/xslt-quality.xsl would need to have an element with several parent steps: <xsl:import href="../../../parameters.xsl">.

What do you think? Do you prefer one of these, or do you have a third suggestion?

Properly set localisation in schematron and SQF

Oxygen is complaining about errors with localisation messages.
We add support for french language in the documention, but not in the message or SQF title.

There must be ways to do that properly, and probably add external files for any localisation

Release 1.0.0-RC2

Main issue for Release 1.0.0-RC2

  • Issue #28 : localisation
  • add ignore-role="info/warning/error" in the conf
  • What about an "master files" attribute ?
  • Dependency to xut for include resolutions
    • make xut more configurable
  • Dependency to xslLib
    • publish xslLib to maven central
  • Rename ids, add xslq as prefix everywhere + a simple name for assert/report
    • restructure modules / ids, it's a bit to complex and fix this for a long time
  • Performance : improve (ex: xsl:output rule)

parsing the xsl as text

Writing:

That mean parsing the xsl as text here, something like:

<sch:let name="xslt.txt" select="unparse-text(base-uri(/))"/>

indent with spaces
No break line inside templates
Space around operators ( =, +, > etc)

Check for conventions

https://google.github.io/styleguide/xmlstyle.html
http://blog.xml.rocks/xslt-naming-conventions
http://blog.xml.rocks/structuring-xslt-code

Release 1.0.0-RC1

Main issue for Release 1.0.0-RC1

Prerequisite

  • Issue #21: add Xspec TU on schematron and XSLT
  • Issue #5: add schematron quick fix
  • Issue #27 : integrate @Arithmeticus evolutions
  • Issue #22: Parameters to let users control arbitrary thresholds
    • to be finished : add missing parameters
  • Issue #29 : make any XSLT components of xslt-quality valid
  • Issue #30 : new repo for xslq:conf

Delivery

  • Packaging zip, not jar to avoid confusion
  • Update README
  • Maven Central publication + add release zip to be download from github

Using template named "xsl:initial-template" results in warning

XLS-T 3.0 allows a transform to be run without an input document, when it contains a template named 'xsl:initial-template'.

This template gets called explicitly from outside of the stylesheet, via the processor's command line, therefore the warning, "[xslqual] Named template in unused the stylesheet", is redundant.

validation problem with XSLT3

Hello,

I have a problem of validation the XSLT3 files with your schematron.
In a XSLT3, I declare some variables and functions and I call them between { }. The infomations in { } are not recognized by the schematron.
The error message is as follows:
[xslqual] Stylesheet function is unused

Qian

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.