Class Srx1Transformer

  • All Implemented Interfaces:
    SrxTransformer

    public class Srx1Transformer
    extends Object
    implements SrxTransformer
    Represents SRX document transformer between SRX 1.0 and newest supported version. Responsible for validating input as SRX 1.0 and doing the transformation using XSLT stylesheet.
    Author:
    loomchild
    • Field Detail

      • MAP_RULE_NAME

        public static final String MAP_RULE_NAME
        Transformation parameter. Used to select map rule in SRX 1.0 document.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Srx1Transformer

        public Srx1Transformer()
    • Method Detail

      • transform

        public void transform​(Reader reader,
                              Writer writer,
                              Map<String,​Object> parameterMap)
        Transform given SRX 1.0 document to newest supported version and write it to given writer. Because in current SRX version only one map rule is allowed it must be selected from SRX 1.0 document. If parameter map contains parameter MAP_RULE_NAME then only map rule with name given by this parameter value is preserved. Otherwise first map rule from source document is preserved. If source document does not contain appropriate map rule to select, resulting document will not contain language maps and will be unusable.
        Specified by:
        transform in interface SrxTransformer
        Parameters:
        reader - reader containing SRX 1.0 document
        writer - writer to write transformed SRX document
        parameterMap - map containing transformation parameters