/** * Converts all TTML input documents to corresponding iTT. * * @throws TransformerConfigurationException */ public void convertInputsToItt() throws TransformerConfigurationException { Transformer transformer = TtmlUtils.createTtmlTransformer(TTML_TO_ITT_TRANSFORMATION); convertedItts = ttmlTts.stream() .map((tt) -> TtmlUtils.transformTtmlDocument(tt, transformer)) .collect(Collectors.toCollection(ArrayList::new)); mergedItt = convertedItts.get(0); }
private TtEltype fixStyleRefs(TtEltype itt, String oldId, String newId) { Transformer transformer = TtmlUtils.createTtmlTransformer(REPLACE_STYLE_ID_TRANSFORMATION); transformer.setParameter(OLD_STYLE_ID_PARAMETER, oldId); transformer.setParameter(NEW_STYLE_ID_PARAMETER, newId); return TtmlUtils.transformTtmlDocument(itt, transformer); } }