# -*- coding: utf-8 -*- """ Extracting possible embedded RDF/XML content from the file and parse it separately into the Graph. This is used, for example by U{SVG 1.2 Tiny}. @author: U{Ivan Herman} @license: This software is available for use under the U{W3C® SOFTWARE NOTICE AND LICENSE} @contact: Ivan Herman, ivan@w3.org @version: $Id: embeddedRDF.py,v 1.15 2012/11/16 17:51:53 ivan Exp $ """ from io import StringIO from .host import accept_embedded_rdf_xml, accept_embedded_turtle from .utils import return_XML import sys def handle_embeddedRDF(node, graph, state): """ Handles embedded RDF. There are two possibilities: - the file is one of the XML dialects that allows for an embedded RDF/XML portion. See the L{host.accept_embedded_rdf_xml} for those (a typical example is SVG). - the file is HTML and there is a turtle portion in the C{