Code Monkey home page Code Monkey logo

Comments (6)

dmj avatar dmj commented on July 17, 2024

My interpretation of the specs is that abstract pattern parameters are meant to be substituted in query language expressions only.

This is consistent with the following parts of the 2020 specification:

  • The definition of the param element defines the @value attribute to contain "a fragment of a query" (5.4.9).
  • A query language binding may optionally provide "a lexical convention such as a delimiter by which the parameters of abstract patterns inside query expressions shall be recognised" (6.4).
  • The informative section about the minimal syntax in the 2020 specification describes the process of instantiation as "replacing
    parameter references with actual parameter values in all enclosed attributes that contain queries" (6.2).

I would also argue that replacing abstract pattern parameters inside the natural language assertion message is at odds with diagnostics in general and localized messages in particular.

from schematron-enhancement-proposals.

rjelliffe avatar rjelliffe commented on July 17, 2024

from schematron-enhancement-proposals.

rjelliffe avatar rjelliffe commented on July 17, 2024

from schematron-enhancement-proposals.

dmj avatar dmj commented on July 17, 2024

I think there are two issues:

  1. Should abstract pattern parameters expand in queries of properties and diagnostics?
  2. Should abstract pattern parameters expand in texts (and non-query attributes)?

Re 1: @rjelliffe, you made a compelling argument to do so. We should clarify that. A good place to start would be the (informal) description of pattern instantiation.

Re 2: This would be an enhancement of the pattern templating mechanism.

from schematron-enhancement-proposals.

AndrewSales avatar AndrewSales commented on July 17, 2024

My interpretation of the specs is that abstract pattern parameters are meant to be substituted in query language expressions only. [...]
I would also argue that replacing abstract pattern parameters inside the natural language assertion message is at odds with diagnostics in general and localized messages in particular.

I agree with this view.

Should abstract pattern parameters expand in texts (and non-query attributes)? [...] This would be an enhancement of the pattern templating mechanism.

To keep things simple, clear and consistent, I would say the existing provision of value-of is enough.

A concise and effective change here might be to add a note to the definition of the term variable (3.23), e.g.

"Variables are represented in schemas by elements let and param."

The desired clarification then ripples through to value-of and also for property and diagnostic (by dint of the change made for #13).

This would also address #19.

from schematron-enhancement-proposals.

rjelliffe avatar rjelliffe commented on July 17, 2024

from schematron-enhancement-proposals.

Related Issues (20)

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.