Client-side Preprocessing #21
AdamSobieski
started this conversation in
Ideas
Replies: 1 comment
-
N3 could also be of use as a preprocessor. Here is a markup example: <types>
<type name="Widget" uri="...">
<parameters>
<parameter name="T" uri="...">
<!-- describe type parameter here -->
</parameter>
</parameters>
<metadata preprocess="text/n3" type="application/trig">
<!-- preprocessor receives the type argument for parameter T and a knowledgebase -->
</metadata>
<definition preprocess="text/n3" type="application/trig">
<!-- preprocessor receives the type argument for parameter T and a knowledgebase -->
</definition>
</type>
</types> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Had an idea blending JS and PHP: client-side preprocessing.
In the above example, the embedded input content is of MIME type
text/php
and it is processed into output of MIME typetext/javascript
.In the above example, the MIME type provided for the preprocess attribute, e.g.,
text/gpp
, would indicate the MIME type of the input content, before preprocessing, and the MIME type specified for the type attribute, e.g.,application/ld+json
, would indicate the MIME type of the output content, after preprocessing.These techniques can be of use for implementing generics, templates, and parametric polymorphism, as shown in the following example:
See also
Beta Was this translation helpful? Give feedback.
All reactions