Lines Matching full:the

22    Licensed under the MIT license:
25 a copy of this software and associated documentation files (the
26 "Software"), to deal in the Software without restriction, including
27 without limitation the rights to use, copy, modify, merge, publish,
28 distribute, sublicense, and/or sell copies of the Software, and to permit
29 persons to whom the Software is furnished to do so, subject to the
32 The above copyright notice and this permission notice shall be included
33 in all copies or substantial portions of the Software.
35 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
38 NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
40 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
41 USE OR OTHER DEALINGS IN THE SOFTWARE.
64 /* The XML_Status enum gives the possible return values for several
65 API functions. The preprocessor #defines are included so this
74 Otherwise, the #define hackery is quite ugly and would have been
156 XML_CQUANT_NONE, and the other fields will be zero or NULL.
162 If type == XML_CTYPE_NAME, then the name points to the name, and
163 the numchildren field will be zero and children will be NULL. The
164 quant fields indicates any quantifiers placed on the name.
166 CHOICE and SEQ will have name NULL, the number of children in
170 The EMPTY, ANY, and MIXED types will only occur at top level.
184 description of the model argument. It's the user code's responsibility
186 There is no need to free the model from the handler, it can be kept
196 /* The Attlist declaration handler is called for *each* attribute. So
198 generate multiple calls to this handler. The "default" parameter
199 may be NULL in the case of the "#IMPLIED" or "#REQUIRED"
200 keyword. The "isrequired" parameter will be true and the default
201 value will be NULL in the case of "#REQUIRED". If "isrequired" is
211 /* The XML declaration handler is called for *both* XML declarations
212 and text declarations. The way to distinguish is that the version
213 parameter will be NULL for text declarations. The encoding
214 parameter may be NULL for XML declarations. The standalone
216 was no standalone parameter in the declaration, that it was given
233 /* Constructs a new parser; encoding is the encoding specified by the
243 namespace. The expanded name is the concatenation of the namespace
244 URI, the namespace separator character, and the local part of the
245 name. If the namespace separator is '\0' then the namespace URI
246 and the local part will be concatenated without any separator.
247 It is a programming error to use the separator '\0' with namespace
251 1, 2 or 3 original parts on application level in the element handler
257 the XML 1.0 namespaces specification) but it may start doing that
264 /* Constructs a new parser using the memory management suite referred to
265 by memsuite. If memsuite is NULL, then use the standard library memory
267 namespace processing as described above. The character pointed at
268 will serve as the namespace separator.
270 All further memory operations used for the created parser will come from
271 the given suite.
281 All handlers are cleared from the parser, except for the
282 unknownEncodingHandler. The parser's external state is re-initialized
283 except for the values of ns and ns_triplets.
315 /* This is called for any characters in the XML document for which
320 supplied. The characters are passed exactly as they were in the XML
323 character is not passed to the default handler. There are no
324 guarantees about how characters are divided between calls to the
331 /* This is called for the start of the DOCTYPE declaration, before
340 /* This is called for the end of the DOCTYPE declaration when the
346 /* This is called for entity declarations. The is_parameter_entity
347 argument will be non-zero if the entity is a parameter entity, zero
352 The value string is NOT null-terminated; the length is provided in
353 the value_length argument. Since it is legal to have zero-length
357 non-NULL. The publicId argument will be NULL unless a public
358 identifier was provided. The notationName argument will have a
374 This handler has been superseded by the EntityDeclHandler above.
378 The base argument is whatever was set by XML_SetBase. The
380 NULL. The other arguments may be.
387 /* This is called for a declaration of notation. The base argument is
388 whatever was set by XML_SetBase. The notationName will never be
389 NULL. The other arguments can be.
398 each namespace declaration. The call to the start and end element
399 handlers occur between the calls to the start and end namespace
410 /* This is called if the document is not standalone, that is, it has an
413 then processing will not continue, and the parser will return a
415 If parameter entity parsing is enabled, then in addition to the
416 conditions above this handler will only be called if the referenced
422 entity. The referenced entity is not automatically parsed. The
426 The parser argument is the parser parsing the entity containing the
427 reference; it can be passed as the parser argument to
428 XML_ExternalEntityParserCreate. The systemId argument is the
429 system identifier as specified in the entity declaration; it will
432 The base argument is the system identifier that should be used as
433 the base for resolving systemId if systemId was relative; this is
436 The publicId argument is the public identifier as specified in the
437 entity declaration, or NULL if none was specified; the whitespace
438 in the public identifier will have been normalized as required by
439 the XML spec.
441 The context argument specifies the parsing context in the format
442 expected by the context argument to XML_ExternalEntityParserCreate;
443 context is valid only until the handler returns, so if the
445 context is NULL only when the entity is a parameter entity.
447 The handler should return XML_STATUS_ERROR if processing should not
448 continue because of a fatal error in the handling of the external
449 entity. In this case the calling parser will return an
452 Note that unlike other handlers the first argument is the parser,
468 the event would be out of sync with the reporting of the
475 /* This structure is filled in by the XML_UnknownEncodingHandler to
476 provide information to the parser about encodings that are unknown
477 to the parser.
479 The map[b] member gives information about byte sequences whose
482 If map[b] is c where c is >= 0, then b by itself encodes the
485 If map[b] is -1, then the byte sequence is malformed.
487 If map[b] is -n, where n >= 2, then b is the first byte of an
490 The data member will be passed as the first argument to the convert
493 The convert function is used to convert multibyte sequences; s will
494 point to a n-byte sequence where map[(unsigned char)*s] == -n. The
495 convert function must return the Unicode scalar value represented
496 by this byte sequence or -1 if the byte sequence is malformed.
498 The convert function may be NULL if the encoding is a single-byte
501 When the parser is finished with the encoding, then if release is
502 not NULL, it will call release passing it the data member; once
503 release has been called, the convert function will not be called
506 Expat places certain restrictions on the encodings that are supported
510 other than the characters
514 must be represented by a single byte, and that byte must be the
522 apply to the built-in support for UTF-8 and UTF-16.
534 /* This is called for an encoding that is unknown to the parser.
536 The encodingHandlerData argument is that which was passed as the
539 The name argument gives the name of the encoding as specified in
540 the encoding declaration.
542 If the callback can provide information about the encoding, it must
543 fill in the XML_Encoding structure, and return XML_STATUS_OK.
546 If info does not describe a suitable encoding, then the parser will
586 /* This sets the default handler and also inhibits expansion of
587 internal entities. These entity references will be passed to the
588 default handler, or to the skipped entity handler, if one is set.
593 /* This sets the default handler but does not inhibit expansion of
594 internal entities. The entity reference will not be passed to the
640 passed as the first argument to the external entity ref handler
641 instead of the parser object.
656 element, processing instruction or character data. It causes the
657 corresponding markup to be passed to the default handler.
665 the separator character specified when the parser was created: URI
668 If do_nst is zero, then namespace information is returned in the
669 default manner (URI + sep + local_name) whether or not the name
679 /* This value is passed as the userData argument to callbacks. */
683 /* Returns the last value set by XML_SetUserData or NULL. */
695 /* If this function is called, then the parser will be passed as the
696 first argument to callbacks instead of userData. The userData will
702 /* If useDTD == XML_TRUE is passed to this function, then the parser
704 specified in the document. In such a case the parser will call the
705 externalEntityRefHandler with a value of NULL for the systemId
706 argument (the publicId and context arguments will be NULL as well).
707 Note: For the purpose of checking WFC: Entity Declared, passing
708 useDTD == XML_TRUE will make the parser behave as if the document
711 the first call to XML_Parse or XML_ParseBuffer, since it will
714 Note: If the document does not have a DOCTYPE declaration at all,
724 /* Sets the base to be used for resolving relative URIs in system
726 left to the application: this value will be passed through as the
727 base argument to the XML_ExternalEntityRefHandler,
728 XML_NotationDeclHandler and XML_UnparsedEntityDeclHandler. The base
738 /* Returns the number of the attribute/value pairs passed in last call
739 to the XML_StartElementHandler that were specified in the start-tag
741 this corresponds to an index into the atts array passed to the
747 /* Returns the index of the ID attribute passed in the last call to
750 corresponds to an index into the atts array passed to the
757 /* Source file byte offsets for the start and end of attribute names and values.
758 The value indices are exclusive of surrounding quotes; thus in a UTF-8 source
763 XML_Index nameStart; /* Offset to beginning of the attribute name. */
764 XML_Index nameEnd; /* Offset after the attribute name's last byte. */
765 XML_Index valueStart; /* Offset to beginning of the attribute value. */
766 XML_Index valueEnd; /* Offset after the attribute value's last byte. */
769 /* Returns an array of XML_AttrInfo structures for the attribute/value pairs
770 passed in last call to the XML_StartElementHandler that were specified
771 in the start-tag rather than defaulted. Each attribute/value pair counts
772 as 1; thus the number of entries in the array is
780 detected. The last call to XML_Parse must have isFinal true; len
783 Though the return values for these functions has always been
784 described as a Boolean value, the implementation, at least for the
785 1.95.x series, has always returned exactly one of the XML_Status
811 - XML_ERROR_FINISHED: when the parser has already finished.
820 This will be applied to the current parser instance only, that is, if
821 there is a parent parser then it will continue parsing when the
822 externalEntityRefHandler() returns. It is up to the implementation of
823 the externalEntityRefHandler() to call XML_StopParser() on the parent
837 This must be called on the most deeply nested child parser instance
838 first, and on its parent parser only after the child parser has finished,
839 to be applied recursively until the document entity's parser is restarted.
840 That is, the parent parser will not resume by itself and it is up to the
841 application to call XML_ResumeParser() on it at the appropriate moment.
854 finished, or suspended and processing the final buffer.
862 entity; context is a '\0'-terminated string specifying the parse
863 context; encoding is a '\0'-terminated string giving the name of
864 the externally specified encoding, or NULL if there is no
865 externally specified encoding. The context string consists of a
867 of a name specifies that the general entity of the name is open; a
868 token of the form prefix=uri specifies the namespace for a
869 particular prefix; a token of the form =uri specifies the default
870 namespace. This can be called at any point after the first call to
871 an ExternalEntityRefHandler so longer as the parser has not yet
872 been freed. The new parser is completely independent and may
873 safely be used in a separate thread. The handlers and userData are
874 initialized from the parser argument. Returns NULL if out of memory.
887 /* Controls parsing of parameter entities (including the external DTD
889 references to external parameter entities (including the external
890 DTD subset) will be passed to the handler set with
891 XML_SetExternalEntityRefHandler. The context passed will be 0.
894 only be parsed synchronously. If the external parameter entity is
895 to be parsed, it must be parsed during the call to the external
896 entity ref handler: the complete sequence of
899 XML_ExternalEntityParserCreate has been called to create the parser
900 for the external parameter entity (context must be 0 for this
901 call), it is illegal to make any calls on the old parser until
902 XML_ParserFree has been called on the newly created parser.
903 If the library has been compiled without support for parameter
909 Note: If parser == NULL, the function will do nothing and return 0.
915 /* Sets the hash salt to use for internal hash calculations.
919 Note: If parser == NULL, the function will do nothing and return 0.
925 XML_GetErrorCode returns information about the error.
930 /* These functions return information about the current parse
932 some parse event; in this case the location is the location of the
933 first of the sequence of characters that generated the event. When
934 called from callbacks generated by declarations in the document
935 prologue, the location identified isn't as neatly defined, but will
936 be within the relevant markup. When called outside of the callback
937 functions, the position indicated will be just past the last parse
941 or XML_ParseBuffer. If the return value is XML_STATUS_ERROR then
942 the location is the location of the character at which the error
943 was detected; otherwise the location is the location of the last
954 /* Return the number of bytes in the current event.
955 Returns 0 if the event is in an internal entity.
960 /* If XML_CONTEXT_BYTES is >=1, returns the input buffer, sets
961 the integer pointed to by offset to the offset within this buffer
962 of the current parse position, and sets the integer pointed to by size
963 to the size of this buffer (the number of input bytes). Otherwise
967 NOTE: The character pointer returned should not be used outside
968 the handler that makes the call.
978 /* Frees the content model passed to the element declaration handler */
982 /* Exposing the memory handling functions used in Expat */
995 /* Frees memory used by the parser. */
999 /* Returns a string describing the error. */
1003 /* Return a string containing the version number of this expat */
1037 /* Additional features must be added to the end of this enum. */
1067 /* Expat follows the semantic versioning convention.