/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 *
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "MPL"); you may not use this file except in
 * compliance with the MPL.  You may obtain a copy of the MPL at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the MPL is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the MPL
 * for the specific language governing rights and limitations under the
 * MPL.
 *
 * The Initial Developer of this code under the MPL is Netscape
 * Communications Corporation.  Portions created by Netscape are
 * Copyright (C) 1999 Netscape Communications Corporation.  All Rights
 * Reserved.
 *
 * Contributor(s): 
 *   Chris Waterson <waterson@netscape.com>
 */

#include "nsISupports.idl"
#include "nsIRDFDataSource.idl"
#include "nsIStreamListener.idl"
#include "nsIURI.idl"

[uuid(1831dd2e-1dd2-11b2-bdb3-86b7b50b70b5)]
interface nsIRDFXMLParser : nsISupports
{
    /**
     * Create a stream listener that can be used to asynchronously
     * parse RDF/XML.
     * @param aSink the RDF datasource the will receive the data
     * @param aBaseURI the base URI used to resolve relative
     *   references in the RDF/XML
     * @return an nsIStreamListener object to handle the data
     */
    nsIStreamListener parseAsync(in nsIRDFDataSource aSink, in nsIURI aBaseURI);

    /**
     * Parse a string of RDF/XML
     * @parram aSink the RDF datasource that will receive the data
     * @param aBaseURI the base URI used to resolve relative
     *   references in the RDF/XML
     */
    void parseString(in nsIRDFDataSource aSink, in nsIURI aBaseURI, in DOMString aSource);
};
