Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xproc api #19

Open
xquery opened this issue Feb 12, 2016 · 2 comments
Open

xproc api #19

xquery opened this issue Feb 12, 2016 · 2 comments

Comments

@xquery
Copy link

xquery commented Feb 12, 2016

cnp'ed from email from @htInEdin


I understood someone (who?) to say something along the lines of: "I'd
like an API I could use to get a pipeline built".

That happens to fit pretty well with the way I've been trying to address
the 'abstract semantics' problem. And at lunch today, where I ended up
with Mohamed, Romain, Florent and John Snelson, we had a useful
discussion about possible language architectures, i.e. how many
languages do we have, and what's their relationship.

We came up with at least the following possibilities:

  1. The XML syntax defines the language, there is a read-only textual
    version;

  2. The XML syntax defines the language, there is an executable textual
    syntax, but it's not normative nor is support required for
    conformance (this was asserted to be the RNG/RNC story);

  3. The compact syntax is normative, it maps to an XML language which
    defines the semantics but is not optimised for human-readability
    (this could be sort of Vnext as we had been working towards it,
    perhaps w/o (much) defaulting);

  4. The compact syntax is normative, it maps to a set of logical
    assertions/object creation calls which defines the semantics, and
    which in turn has an XML syntax (what I think I heard from the
    floor).

Wrt the very preliminary way I've been going about this, here's what (4)
would look like for a trivial example:

s1 == StepImpl(p:load,uri="somedoc.xml")
s2 == StepImpl(p:data,type="application/xml",data="")
s3 == StepImpl(p:set-attributes,match="//*[@colour='red']")
s4 == StepImpl(p:serialize)
p1 == Pipe(s1.result,s3.source)
p2 == Pipe(s2.result,s3.attributes)
p3 == Pipe(s3.result,s4.source)

The XML for this is left as an exercise for the reader.

@ndw
Copy link
Collaborator

ndw commented Feb 12, 2016

[I think we need to define a model for what is represented by the pipeline language and processing model for what it means to "run" a pipeline. I'm not convinced it has to map onto a single, explicit programming language API. I think the text syntax should be the normative representation of the model. I think we should provide a complete XML syntax that's suitable for manipulating with an XML toolchain.

I think that syntax should be more like XProc 1.0 (perhaps with a different story for connections and less defaulting) and less like XQueryX, but I could be wrong about that.

@mgaerber
Copy link

I would find it most usable to also have an API that is pure XQuery 3.x. Either as an intermediate representation or the new syntax itself.

I am sure that there will be several more implementations of the standard as soon as XQuery engines could provide it as a module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants