docx4j's XmlUtils contains:
Using java Syntax Highlighting
public static void transform
(org.
w3c.
dom.
Document doc,
javax.
xml.
transform.
Templates template,
Map
<String, Object
> transformParameters,
javax.
xml.
transform.
Result result
) throws Docx4JException
public static void transform
(javax.
xml.
transform.
Source source,
javax.
xml.
transform.
Templates template,
Map
<String, Object
> transformParameters,
javax.
xml.
transform.
Result result
) throws Docx4JException
public static Templates getTransformerTemplate
(
javax.
xml.
transform.
Source xsltSource
) throws TransformerConfigurationException
Parsed in 0.015 seconds, using
GeSHi 1.0.8.4
You can study how docx4j uses these for its XHTML and XSL FO output.
But basically, you make a Templates object out of OMML2MML.XSL
And you'd marshall your OMML to org.w3c.dom.Document or create javax.xml.transform.Source from it.
Then invoke transform. javax.xml.transform is standard java stuff, so questions about that are best asked on StackOverflow etc.