* @param byteStream
* The {@link OutputStream} to write to.
*/
public void write(String path, OutputStream byteStream) {
Element element = null;
Configuration configuration = graph.getConfiguration();
FileFormat format = configuration.getFileFormat();
List<Transformation> transformations = format
.getExportTransformations();
try {
for (Transformation transformation : transformations) {
if (transformation.isXslt()) {
if (element == null) {
// writes graph
element = writeGraph();
}
XsltTransformer transformer = new XsltTransformer(
configuration.getContributorId(),
transformation.getFileName());
transformer.setParameter("path", path);
element = transformer.transformDomToDom(element);
} else {
transformation.getInstance().transform(graph, byteStream);