code: private void fillInChainedPatternFields(Pattern pattern, String href)
     {
        // Locate the referenced object
        SVG.SvgObject  ref = pattern.document.resolveIRI(href);
        if (ref == null) {
           // Non-existent
           warn("Pattern reference '%s' not found", href);
           return;
        }
        if (!(ref instanceof Pattern)) {
           error("Pattern href attributes must point to other pattern elements");
           return;
        }
        if (ref == pattern) {
           error("Circular reference in pattern href attribute '%s'", href);
           return;
        }
  
        Pattern  pRef = (Pattern) ref;
  
        if (pattern.patternUnitsAreUser == null)
           pattern.patternUnitsAreUser = pRef.patternUnitsAreUser;
        if (pattern.patternContentUnitsAreUser == null)
           pattern.patternContentUnitsAreUser = pRef.patternContentUnitsAreUser;
        if (pattern.patternTransform == null)
           pattern.patternTransform = pRef.patternTransform;
        if (pattern.x == null)
           pattern.x = pRef.x;
        if (pattern.y == null)
           pattern.y = pRef.y;
        if (pattern.width == null)
           pattern.width = pRef.width;
        if (pattern.height == null)
           pattern.height = pRef.height;
        // attributes from superclasses
        if (pattern.children.isEmpty())
           pattern.children = pRef.children;
        if (pattern.viewBox == null)
           pattern.viewBox = pRef.viewBox;
        if (pattern.preserveAspectRatio == null) {
           pattern.preserveAspectRatio = pRef.preserveAspectRatio;
        }
  
        if (pRef.href != null)
           fillInChainedPatternFields(pattern, pRef.href);
     }
docs: /*
  Any unspecified fields in this pattern can be 'borrowed' from another
  pattern specified by the href attribute.