Class XMLIncludeTransformer


  • public class XMLIncludeTransformer
    extends java.lang.Object
    • Method Detail

      • applyIncludes

        public void applyIncludes​(org.w3c.dom.Node source)
      • applyIncludes

        private void applyIncludes​(org.w3c.dom.Node source,
                                   java.util.Properties variablesContext,
                                   boolean included)
        Recursively apply includes through all SQL fragments.
        Parameters:
        source - Include node in DOM tree
        variablesContext - Current context for static variables with values
      • findSqlFragment

        private org.w3c.dom.Node findSqlFragment​(java.lang.String refid,
                                                 java.util.Properties variables)
      • getStringAttribute

        private java.lang.String getStringAttribute​(org.w3c.dom.Node node,
                                                    java.lang.String name)
      • getVariablesContext

        private java.util.Properties getVariablesContext​(org.w3c.dom.Node node,
                                                         java.util.Properties inheritedVariablesContext)
        Read placeholders and their values from include node definition.
        Parameters:
        node - Include node instance
        inheritedVariablesContext - Current context used for replace variables in new variables values
        Returns:
        variables context from include instance (no inherited values)