JET2 Transform not working [message #990345] |
Wed, 12 December 2012 04:54 |
Phillip Drew Messages: 77 Registered: October 2012 |
Member |
|
|
Basically I'm trying to run a JET2 Transform programmatically.
I've got a String representing XML input.
I've got a simple JET2 Transform:
main.jet
<%@taglib prefix="ws" id="org.eclipse.jet.workspaceTags" %>
<%-- Main entry point for com.themousewheel.sandbox.jet2 --%>
<%--
Let c:iterate tags set the XPath context object.
For 100% compatibility with JET 0.9.x or earlier, remove this statement
--%>
<c:setVariable var="org.eclipse.jet.taglib.control.iterateSetsContext" select="true()"/>
<%--
TODO: traverse input model, performing calculations and storing
the results as model annotations via c:set tag
--%>
<%--
TODO: traverse annotated model, performing text generation actions
such as ws:file, ws:folder and ws:project
--%>
<%-- For debug purposes, dump the annotated input model in
the root of the project containing the original input model.
Note that model formatting may not be identical, and that in
the case of non-XML input models, the dump may look quite different.
--%>
<c:if test="isVariableDefined('org.eclipse.jet.resource.project.name')">
<ws:file template="templates/dump.jet" path="{$org.eclipse.jet.resource.project.name}/dump.xml"/>
</c:if>
and dump.jet
<%@taglib prefix="ws" id="org.eclipse.jet.workspaceTags" %>
<ws:project name="TEST">
</ws:project>
Also some text in case dump.xml works
<ws:rebuildWorkspace/>
I figured after I couldn't find the dump.xml file that it might be easier to tell if the transform is working by creating a project in the workspace (in case I just had file paths a bit wonky).
I'm running the transform within an OSGi bundle activator using the following line
IStatus status = JET2Platform.runTransformOnString("com.themousewheel.sandbox.jet2", generator.getDomainXML(), new NullProgressMonitor());
System.out.println(status);
which prints "Status OK: org.eclipse.jet code=0 Successful Execution null" to standard out.
However despite the transform apparently running successfully dump.xml and the project TEST aren't created!
Does anyone have any ideas? This problem is currently a blocker for me and I don't know how to proceed because I'm not getting any meaningful output to help me diagnose what's wrong!
Thanks in advance!
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03162 seconds