Clone the SVGPlot document for transcoding.

This will usually be necessary for exporting the SVG document if it is
currently being displayed: otherwise, we break the Batik rendering trees.
(Discovered by Simon).

@return cloned document
191579
protected SVGDocument cloneDocument() {
    return (SVGDocument) new CloneInlineImages() {
      @Override
      public Node cloneNode(Document doc, Node eold) {
        // Skip elements with noexport attribute set
        if(eold instanceof Element) {
          Element eeold = (Element) eold;
          String vis = eeold.getAttribute(NO_EXPORT_ATTRIBUTE);
          if(vis != null && vis.length() > 0) {
            return null;
          }
        }
        return super.cloneNode(doc, eold);
      }
    }.cloneDocument(getDomImpl(), document);
  }
873642
public function copy()
	{
		$view = $this->getView();

		$view->downloadData = $this->toArray( $view->item, true );
		$view->downloadBody = '';

		foreach( $this->getSubClients() as $client ) {
			$view->downloadBody .= $client->copy();
		}

		return $this->render( $view );
	}
918866
def clone(self):
        
        clone = copy.copy(self)
        clone._unused = clone._unused.clone()
        return clone
963433
public Table cloneTable()
    {
        Table ret = null;
        try {
            ret = (Table) super.clone();
        } catch (final CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return ret;
    }
1217528
public function performReadonlyTransformation()
    {
        /** @var TreeMultiselectField_Readonly $copy */
        $copy = $this->castedCopy(TreeMultiselectField_Readonly::class);
        $copy->setKeyField($this->getKeyField());
        $copy->setLabelField($this->getLabelField());
        $copy->setSourceObject($this->getSourceObject());
        $copy->setTitleField($this->getTitleField());
        return $copy;
    }
166036
@SuppressWarnings({"WeakerAccess", "unused"})
   public RectF  getDocumentViewBox()
   {
      if (this.rootElement == null)
         throw new IllegalArgumentException("SVG document is empty");

      if (this.rootElement.viewBox == null)
         return null;

      return this.rootElement.viewBox.toRectF();       
   }
204929
public Node cloneNode(Document doc, Node eold) {
    return doc.importNode(eold, true);
  }
1020575
def SVGdocument():
	""

	import xml.dom.minidom
	implementation = xml.dom.minidom.getDOMImplementation()
	doctype = implementation.createDocumentType(
		"svg", "-//W3C//DTD SVG 1.1//EN",
		"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"
	)
	document= implementation.createDocument(None, "svg", doctype)
	document.documentElement.setAttribute(
		'xmlns', 'http://www.w3.org/2000/svg'
	)
	return document
403457
def copy(self):
		""""""
		return self.__class__(self.operations.copy(), self.collection, self.document)
831953
public DoubleHistogram copy() {
        final DoubleHistogram targetHistogram =
                new DoubleHistogram(configuredHighestToLowestValueRatio, getNumberOfSignificantValueDigits());
        targetHistogram.setTrackableValueRange(currentLowestValueInAutoRange, currentHighestValueLimitInAutoRange);
        integerValuesHistogram.copyInto(targetHistogram.integerValuesHistogram);
        return targetHistogram;
    }
598932
public function copy()
	{
		$view = $this->getView();

		$view->attributeData = $this->toArray( $view->item, true );
		$view->attributeBody = '';

		foreach( $this->getSubClients() as $client ) {
			$view->attributeBody .= $client->copy();
		}

		return $this->render( $view );
	}
604975
public UpdateOptions copy() {
        return new UpdateOptions()
            .bypassDocumentValidation(getBypassDocumentValidation())
            .collation(getCollation())
            .multi(isMulti())
            .upsert(isUpsert())
            .writeConcern(getWriteConcern());
    }
144278
public static function solidBorder()
    {
        if (!self::$solidBorder) {
            self::$solidBorder = new static();
            self::$solidBorder->headerCellFormat = ' %s ';
            self::$solidBorder->cellFormat = ' %s ';
            self::$solidBorder->borderStyle = BorderStyle::solid();
        }

        return clone self::$solidBorder;
    }
183815
function recreateDOMTree()
    {
        $aliasList = $this->aliasList();
        $doc = new DOMDocument( '1.0', 'utf-8' );
        $imageNode = $doc->createElement( "ezimage" );
        $doc->appendChild( $imageNode );

        $originalNode = $doc->createElement( "original" );
        $imageNode->appendChild( $originalNode );

        $imageManager = eZImageManager::factory();

        $aliasName = 'original';

        $originalData = $this->originalAttributeData();
        $this->createOriginalAttributeXMLData( $originalNode, $originalData );

        $imageNode->setAttribute( 'serial_number', $this->imageSerialNumber() );
        $imageNode->setAttribute( 'is_valid', $aliasList[$aliasName]['is_valid'] );
        $imageNode->setAttribute( 'filename', $aliasList[$aliasName]['filename'] );
        $imageNode->setAttribute( 'suffix', $aliasList[$aliasName]['suffix'] );
        $imageNode->setAttribute( 'basename', $aliasList[$aliasName]['basename'] );
        $imageNode->setAttribute( 'dirpath', $aliasList[$aliasName]['dirpath'] );
        $imageNode->setAttribute( 'url', $aliasList[$aliasName]['url'] );
        $imageNode->setAttribute( 'original_filename', $aliasList[$aliasName]['original_filename'] );
        $imageNode->setAttribute( 'mime_type', $aliasList[$aliasName]['mime_type'] );
        $imageNode->setAttribute( 'width', $aliasList[$aliasName]['width'] );
        $imageNode->setAttribute( 'height', $aliasList[$aliasName]['height'] );
        $imageNode->setAttribute( 'alternative_text', $aliasList[$aliasName]['alternative_text'] );
        $imageNode->setAttribute( 'alias_key', $imageManager->createImageAliasKey( $imageManager->alias( $aliasName ) ) );
        $imageNode->setAttribute( 'timestamp', $aliasList[$aliasName]['timestamp'] );

        $filename = $aliasList[$aliasName]['url'];
        if ( $filename )
        {
            $imageFile = eZClusterFileHandler::instance( $filename );

            $fetchedFilePath = $imageFile->fetchUnique();

            //(Cluster) Get mime data of real file, and fetch info by image analizer.
            $mimeDataTemp = eZMimeType::findByFileContents( $fetchedFilePath );
            $imageManager->analyzeImage( $mimeDataTemp );

            //(Cluster) Get mime data of a file which does not really exist on file system. We need this to build correct imageInformationNode.
            $mimeData = eZMimeType::findByURL( $filename );
            if ( isset( $mimeDataTemp['info'] ) )
                $mimeData['info'] = $mimeDataTemp['info'];

            $this->createImageInformationNode( $imageNode, $mimeData );
            $imageFile->fileDeleteLocal( $fetchedFilePath );
        }

        foreach ( $aliasList as $aliasName => $alias )
        {
            if ( $aliasName == 'original' )
                continue;
            $this->addImageAliasToXML( $doc, $alias );
        }

        $this->setDOMTree( $doc );
    }
443124
public function copy()
    {
        $list = [];
        foreach ($this->getIterator() as $key => $value) {
            $list[$key] = \is_object($value) ? clone $value : $value;
        }

        return $this->createFrom($list);
    }
1272735
public function copy()
	{
		$view = $this->getView();

		$view->variantData = $this->toArray( $view->item, true );
		$view->variantBody = '';

		foreach( $this->getSubClients() as $client ) {
			$view->variantBody .= $client->copy();
		}

		return $this->render( $view );
	}
718208
public Element cloneSvgElement(Element source) {
		if (source == null || source.getNodeName() == null) {
			return null;
		}
		if ("#text".equals(source.getNodeName())) {
			return Document.get().createTextNode(source.getNodeValue()).cast();
		}
		Element clone = createElementNS(Dom.NS_SVG, source.getNodeName(), Dom.createUniqueId());
		cloneAttributes(source, clone);
		for (int i = 0; i < source.getChildCount(); i++) {
			Element child = source.getChild(i).cast();
			clone.appendChild(cloneSvgElement(child));
		}

		return clone;
	}