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

Legacy from 1.0: 3.5 Provide a mechanism for importing user-defined functions  #42

Closed
xml-project opened this issue Dec 31, 2016 · 5 comments

Comments

@xml-project
Copy link
Member

3.5 Provide a mechanism for importing user-defined functions 

This is an aggregation of the discussion on "3.5 Provide a mechanism for importing user-defined functions" (Issue 49 of the xproc/1.0-specification)

Opened by: ndw on 2014-08-22, 18:39h

ndw said on 2014-08-22, 18:39h:

Experience with user-defined functions in XQuery and XSLT reveals that they can be a powerful addition to the language. Providing some feature that allowed users to extend the vocabulary of functions available in, for example, the test expressions on p:when elements would greatly simplify some pipelines. 

Such a mechanism might take the form of the ability to load extension functions defined in, for example, XQuery, or it might include adding the ability to define functions in XProc. 

On 2014-08-22, 18:39h: ndw added requirement should labels.

On 2014-08-25, 22:28h: ndw added this to the XProc 2.0 LC milestone.

ndw said on 2015-03-19, 11:50h:

It would be useful to be able to add user-defined functions to XProc. XProc steps themselves don't immediately lend themselves to this task because there's not a completely obvious mapping between step signatures and function signatures. However, most XProc engines are going to have access to XSLT and/or XQuery engines and both of those languages have a built-in mechanism for creating functions. 

This proposal is for ap:import-functionselement that can import externally-defined functions from languages such as XQuery or XSLT. 

This element instruct the XProc processor to load external functions from the specified library. It is a static error if the processor cannot access the URI or if the URI points to a format that the implementation does not recognize. 

Thenamespaceattribute specifies the namespace in which the imported functions must reside. It is a static error if the specified URI does not define functions in that namespace. 

Thetypeattribute specifies the expected type of the content. Implementations should supportapplication/xslt+xmlandapplication/xqueryfor XSLT and XQuery implementations. Support for other formats is impelementation-defined. 

On 2015-06-11, 08:57h: ndw added the proposed-resolution label.

On 2015-10-07, 15:02h: ndw modified the milestone: XProc 2.0 Next PWD, XProc 2.0 LC.
@xml-project
Copy link
Member Author

xml-project commented Mar 26, 2017

See also #10

@xml-project
Copy link
Member Author

See issue #10

@xml-project xml-project reopened this Feb 6, 2018
@xml-project
Copy link
Member Author

At Prague 2018 we decided to have a new element like
<p:import-functions href="foo.xsl" type="application/xslt+xml" namespace="http://example.com/foo"/>.

See minutes, day 1

@xatapult
Copy link
Contributor

xatapult commented Jul 2, 2018

If I remember correctly we decided on:

There is however no mention of p:import-functions yet in the spec. So this remains to be done.

But am I correct that we have consensus on the three points mentioned above?

@xml-project
Copy link
Member Author

But am I correct that we have consensus on the three points mentioned above?

Yes,
Yes and
Yes

@gimsieke gimsieke closed this as completed Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants