1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/parser/htmlparser/public/nsIExtendedExpatSink.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,72 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsIExpatSink.idl" 1.10 + 1.11 +/** 1.12 + * This interface provides notification of syntax-level events. 1.13 + */ 1.14 +[scriptable, uuid(146E194B-333D-4283-8CF6-4BC3EE9B5DFF)] 1.15 +interface nsIExtendedExpatSink : nsIExpatSink 1.16 +{ 1.17 + /** 1.18 + * Called at the beginning of the DTD, before any entity or notation 1.19 + * events. 1.20 + * @param aDoctypeName The document type name. 1.21 + * @param aSysid The declared system identifier for the external DTD subset, 1.22 + * or null if none was declared. 1.23 + * @param aPubid The declared public identifier for the external DTD subset, 1.24 + * or null if none was declared. 1.25 + */ 1.26 + void handleStartDTD(in wstring aDoctypeName, 1.27 + in wstring aSysid, 1.28 + in wstring aPubid); 1.29 + 1.30 + /** 1.31 + * Called when a prefix mapping starts to be in-scope, before any 1.32 + * startElement events. 1.33 + * @param aPrefix The Namespace prefix being declared. An empty string 1.34 + * is used for the default element namespace, which has 1.35 + * no prefix. 1.36 + * @param aUri The Namespace URI the prefix is mapped to. 1.37 + */ 1.38 + void handleStartNamespaceDecl(in wstring aPrefix, 1.39 + in wstring aUri); 1.40 + 1.41 + /** 1.42 + * Called when a prefix mapping is no longer in-scope, after any 1.43 + * endElement events. 1.44 + * @param aPrefix The prefix that was being mapped. This is the empty string 1.45 + * when a default mapping scope ends. 1.46 + */ 1.47 + void handleEndNamespaceDecl(in wstring aPrefix); 1.48 + 1.49 + /** 1.50 + * This is called for a declaration of notation. The base argument is 1.51 + * whatever was set by XML_SetBase. aNotationName will never be 1.52 + * null. The other arguments can be. 1.53 + * @param aNotationName The notation name. 1.54 + * @param aSysId The notation's system identifier, or null if none was given. 1.55 + * @param aPubId The notation's pubilc identifier, or null if none was given. 1.56 + */ 1.57 + void handleNotationDecl(in wstring aNotationName, 1.58 + in wstring aSysid, 1.59 + in wstring aPubid); 1.60 + 1.61 + /** 1.62 + * This is called for a declaration of an unparsed (NDATA) entity. 1.63 + * aName, aSysid and aNotationName arguments will never be 1.64 + * null. The other arguments may be. 1.65 + * @param aName The unparsed entity's name. 1.66 + * @param aSysId The notation's system identifier. 1.67 + * @param aPubId The notation's pubilc identifier, or null if none was given. 1.68 + * @param aNotationName The name of the associated notation. 1.69 + */ 1.70 + void handleUnparsedEntityDecl(in wstring aName, 1.71 + in wstring aSysid, 1.72 + in wstring aPubid, 1.73 + in wstring aNotationName); 1.74 + 1.75 +};