Skip to content

xproc api #19

Open
Open
@xquery

Description

@xquery

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions