All predicatesShow sourcerdf_file_type.pl -- Load RDF data from unknown file-type

Source rdf_guess_format_and_load(+Stream, +Options) is det
Guess the RDF format in Stream and load it. Stream must be a repositional stream. Options are passed to rdf_load/2. In addition, it processed the following options:
filename(filename)
Name of the uploaded file.
Source rdf_guess_data_format(+Stream, ?Format)
Guess the format of an RDF file from the actual content. Currently, this seeks for a valid XML document upto the rdf:RDF element before concluding that the file is RDF/XML. Otherwise it assumes that the document is Turtle.
To be done
- Recognise Turtle variations from content
Source xml_doctype(+Stream, -DocType) is semidet[private]
Parse a stream and get the name of the first XML element and demand that this element defines XML namespaces. Fails if the document is illegal XML before the first element.

Note that it is not possible to define valid RDF/XML without namespaces, while it is not possible to define a valid absolute Turtle URI (using <URI>) with a valid xmlns declaration.

Arguments:
Stream- denotes the input. If peek_string/3 is provided (SWI-Prolog version 7), it is not necessary that the stream can be repositioned. Older versions require a repositionable stream.