ReactOS 0.4.16-dev-240-gdb5fa3b
|
#include <libxml/xmlversion.h>
#include <libxml/parser.h>
#include <libxml/HTMLparser.h>
#include <libxml/chvalid.h>
Go to the source code of this file.
Variables | |
XMLPUBVAR unsigned int | xmlParserMaxDepth |
XMLPUBVAR const xmlChar | xmlStringText [] |
XMLPUBVAR const xmlChar | xmlStringTextNoenc [] |
XMLPUBVAR const xmlChar | xmlStringComment [] |
#define INPUT_CHUNK 250 |
INPUT_CHUNK:
The parser tries to always have that amount of input ready. One of the point is providing context when reporting errors.
Definition at line 89 of file parserInternals.h.
IS_ASCII_DIGIT: : an xmlChar value
Macro to check [0-9]
Definition at line 260 of file parserInternals.h.
IS_ASCII_LETTER: : an xmlChar value
Macro to check [a-zA-Z]
Definition at line 250 of file parserInternals.h.
#define IS_BASECHAR | ( | c | ) | xmlIsBaseCharQ(c) |
IS_BASECHAR: : an UNICODE value (int)
Macro to check the following production in the XML spec:
[85] BaseChar ::= ... long list see REC ...
Definition at line 153 of file parserInternals.h.
#define IS_BLANK | ( | c | ) | xmlIsBlankQ(c) |
IS_BLANK: : an UNICODE value (int)
Macro to check the following production in the XML spec:
[3] S ::= (#x20 | #x9 | #xD | #xA)+
Definition at line 135 of file parserInternals.h.
#define IS_BLANK_CH | ( | c | ) | xmlIsBlank_ch(c) |
IS_BLANK_CH: : an xmlChar value (normally unsigned char)
Behaviour same as IS_BLANK
Definition at line 143 of file parserInternals.h.
#define IS_BYTE_CHAR | ( | c | ) | xmlIsChar_ch(c) |
IS_BYTE_CHAR: : an byte value (int)
Macro to check the following production in the XML spec:
[2] Char ::= #x9 | #xA | #xD | [#x20...] any byte character in the accepted range
Definition at line 105 of file parserInternals.h.
#define IS_CHAR | ( | c | ) | xmlIsCharQ(c) |
IS_CHAR: : an UNICODE value (int)
Macro to check the following production in the XML spec:
[2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
Definition at line 117 of file parserInternals.h.
#define IS_CHAR_CH | ( | c | ) | xmlIsChar_ch(c) |
IS_CHAR_CH: : an xmlChar (usually an unsigned char)
Behaves like IS_CHAR on single-byte value
Definition at line 125 of file parserInternals.h.
#define IS_COMBINING | ( | c | ) | xmlIsCombiningQ(c) |
IS_COMBINING: : an UNICODE value (int)
Macro to check the following production in the XML spec:
[87] CombiningChar ::= ... long list see REC ...
Definition at line 181 of file parserInternals.h.
IS_COMBINING_CH: : an xmlChar (usually an unsigned char)
Always false (all combining chars > 0xff)
Definition at line 189 of file parserInternals.h.
#define IS_DIGIT | ( | c | ) | xmlIsDigitQ(c) |
IS_DIGIT: : an UNICODE value (int)
Macro to check the following production in the XML spec:
[88] Digit ::= ... long list see REC ...
Definition at line 163 of file parserInternals.h.
#define IS_DIGIT_CH | ( | c | ) | xmlIsDigit_ch(c) |
IS_DIGIT_CH: : an xmlChar value (usually an unsigned char)
Behaves like IS_DIGIT but with a single byte argument
Definition at line 171 of file parserInternals.h.
#define IS_EXTENDER | ( | c | ) | xmlIsExtenderQ(c) |
IS_EXTENDER: : an UNICODE value (int)
Macro to check the following production in the XML spec:
[89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE]
Definition at line 202 of file parserInternals.h.
#define IS_EXTENDER_CH | ( | c | ) | xmlIsExtender_ch(c) |
IS_EXTENDER_CH: : an xmlChar value (usually an unsigned char)
Behaves like IS_EXTENDER but with a single-byte argument
Definition at line 210 of file parserInternals.h.
#define IS_IDEOGRAPHIC | ( | c | ) | xmlIsIdeographicQ(c) |
IS_IDEOGRAPHIC: : an UNICODE value (int)
Macro to check the following production in the XML spec:
[86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
Definition at line 221 of file parserInternals.h.
#define IS_LETTER | ( | c | ) | (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c)) |
IS_LETTER: : an UNICODE value (int)
Macro to check the following production in the XML spec:
[84] Letter ::= BaseChar | Ideographic
Definition at line 232 of file parserInternals.h.
#define IS_LETTER_CH | ( | c | ) | xmlIsBaseChar_ch(c) |
IS_LETTER_CH: : an xmlChar value (normally unsigned char)
Macro behaves like IS_LETTER, but only check base chars
Definition at line 241 of file parserInternals.h.
#define IS_PUBIDCHAR | ( | c | ) | xmlIsPubidCharQ(c) |
IS_PUBIDCHAR: : an UNICODE value (int)
Macro to check the following production in the XML spec:
[13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#$_%]
Definition at line 271 of file parserInternals.h.
#define IS_PUBIDCHAR_CH | ( | c | ) | xmlIsPubidChar_ch(c) |
IS_PUBIDCHAR_CH: : an xmlChar value (normally unsigned char)
Same as IS_PUBIDCHAR but for single-byte value
Definition at line 279 of file parserInternals.h.
MOVETO_ENDTAG: : and UTF8 string pointer
Skips to the next '>' char.
Definition at line 297 of file parserInternals.h.
MOVETO_STARTTAG: : and UTF8 string pointer
Skips to the next '<' char.
Definition at line 306 of file parserInternals.h.
#define XML_MAX_DICTIONARY_LIMIT 10000000 |
XML_MAX_DICTIONARY_LIMIT:
Maximum size allowed by the parser for a dictionary by default This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Introduced in 2.9.0
Definition at line 63 of file parserInternals.h.
#define XML_MAX_LOOKUP_LIMIT 10000000 |
XML_MAX_LOOKUP_LIMIT:
Maximum size allowed by the parser for ahead lookup This is an upper boundary enforced by the parser to avoid bad behaviour on "unfriendly' content Introduced in 2.9.0
Definition at line 73 of file parserInternals.h.
#define XML_MAX_NAME_LENGTH 50000 |
XML_MAX_NAME_LENGTH:
Maximum size allowed for a markup identifier. This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Note that with the use of parsing dictionaries overriding the limit may result in more runtime memory usage in face of "unfriendly' content Introduced in 2.9.0
Definition at line 53 of file parserInternals.h.
#define XML_MAX_NAMELEN 100 |
XML_MAX_NAMELEN:
Identifiers can be longer, but this will be more costly at runtime.
Definition at line 81 of file parserInternals.h.
#define XML_MAX_TEXT_LENGTH 10000000 |
XML_MAX_TEXT_LENGTH:
Maximum size allowed for a single text node when building a tree. This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Introduced in 2.9.0
Definition at line 41 of file parserInternals.h.
#define XML_SUBSTITUTE_BOTH 3 |
XML_SUBSTITUTE_BOTH:
Both general and parameter entities need to be substituted.
Definition at line 520 of file parserInternals.h.
#define XML_SUBSTITUTE_NONE 0 |
XML_SUBSTITUTE_NONE:
If no entities need to be substituted.
Definition at line 502 of file parserInternals.h.
#define XML_SUBSTITUTE_PEREF 2 |
XML_SUBSTITUTE_PEREF:
Whether parameter entities need to be substituted.
Definition at line 514 of file parserInternals.h.
#define XML_SUBSTITUTE_REF 1 |
XML_SUBSTITUTE_REF:
Whether general entities need to be substituted.
Definition at line 508 of file parserInternals.h.
XMLPUBFUN xmlParserInputPtr XMLCALL inputPop | ( | xmlParserCtxtPtr | ctxt | ) |
inputPop: @ctxt: an XML parser context
Pops the top parser input from the input stack
Returns the input just removed
Definition at line 1774 of file parser.c.
Referenced by xmlCtxtReset(), xmlFreeParserCtxt(), xmlHaltParser(), xmlInitParserCtxt(), xmlPopInput(), and xmlPushInput().
XMLPUBFUN int XMLCALL inputPush | ( | xmlParserCtxtPtr | ctxt, |
xmlParserInputPtr | value | ||
) |
inputPush: @ctxt: an XML parser context @value: the parser input
Pushes a new parser input on top of the input stack
Returns -1 in case of error, the index in the stack otherwise
Definition at line 1745 of file parser.c.
Referenced by testSAX(), xmlCreateEntityParserCtxtInternal(), xmlCreateIOParserCtxt(), xmlCreateMemoryParserCtxt(), xmlCreateURLParserCtxt(), xmlCtxtReadFd(), xmlCtxtReadFile(), xmlCtxtReadIO(), xmlCtxtReadMemory(), xmlCtxtResetPush(), xmlPushInput(), xmlReadFd(), xmlReadIO(), and xsltDocDefaultLoaderFunc().
XMLPUBFUN const xmlChar *XMLCALL namePop | ( | xmlParserCtxtPtr | ctxt | ) |
namePop: @ctxt: an XML parser context
Pops the top element name from the name stack
Returns the name just removed
Definition at line 1981 of file parser.c.
Referenced by xmlParseElementEnd(), and xmlParseElementStart().
namePush: @ctxt: an XML parser context @value: the element name
Pushes a new element name on top of the name stack
Returns -1 in case of error, the index in the stack otherwise
XMLPUBFUN xmlNodePtr XMLCALL nodePop | ( | xmlParserCtxtPtr | ctxt | ) |
nodePop: @ctxt: an XML parser context
Pops the top element node from the node stack
Returns the node just removed
Definition at line 1839 of file parser.c.
Referenced by xmlParseElementStart(), and xmlSAX2EndElementNs().
XMLPUBFUN int XMLCALL nodePush | ( | xmlParserCtxtPtr | ctxt, |
xmlNodePtr | value | ||
) |
nodePush: @ctxt: an XML parser context @value: the element node
Pushes a new element node on top of the node stack
Returns -1 in case of error, the index in the stack otherwise
Definition at line 1801 of file parser.c.
Referenced by xmlParseBalancedChunkMemoryInternal(), xmlParseExternalEntityPrivate(), xmlParseInNodeContext(), and xmlSAX2StartElementNs().
xmlCheckLanguageID: @lang: pointer to the string value
Checks that the value conforms to the LanguageID production:
NOTE: this is somewhat deprecated, those productions were removed from the XML Second edition.
[33] LanguageID ::= Langcode ('-' Subcode)* [34] Langcode ::= ISO639Code | IanaCode | UserCode [35] ISO639Code ::= ([a-z] | [A-Z]) ([a-z] | [A-Z]) [36] IanaCode ::= ('i' | 'I') '-' ([a-z] | [A-Z])+ [37] UserCode ::= ('x' | 'X') '-' ([a-z] | [A-Z])+ [38] Subcode ::= ([a-z] | [A-Z])+
The current REC reference the successors of RFC 1766, currently 5646
http://www.rfc-editor.org/rfc/rfc5646.txt langtag = language ["-" script] ["-" region] *("-" variant) *("-" extension) ["-" privateuse] language = 2*3ALPHA ; shortest ISO 639 code ["-" extlang] ; sometimes followed by ; extended language subtags / 4ALPHA ; or reserved for future use / 5*8ALPHA ; or registered language subtag
extlang = 3ALPHA ; selected ISO 639 codes *2("-" 3ALPHA) ; permanently reserved
script = 4ALPHA ; ISO 15924 code
region = 2ALPHA ; ISO 3166-1 code / 3DIGIT ; UN M.49 code
variant = 5*8alphanum ; registered variants / (DIGIT 3alphanum)
extension = singleton 1*("-" (2*8alphanum))
; Single alphanumerics ; "x" reserved for private use
singleton = DIGIT ; 0 - 9 / x41-57 ; A - W / x59-5A ; Y - Z / x61-77 ; a - w / x79-7A ; y - z
it sounds right to still allow Irregular i-xxx IANA and user codes too The parser below doesn't try to cope with extension or privateuse that could be added but that's not interoperable anyway
Returns 1 if correct 0 otherwise
Definition at line 1474 of file parser.c.
Referenced by xmlParseAttribute2().
xmlCopyChar: @len: Ignored, compatibility @out: pointer to an array of xmlChar @val: the char value
append the char value in the array
Returns the number of xmlChar written
Definition at line 852 of file parserInternals.c.
Referenced by xmlParseAttValueComplex().
xmlCopyCharMultiByte: @out: pointer to an array of xmlChar @val: the char value
append the char value in the array
Returns the number of xmlChar written
Definition at line 809 of file parserInternals.c.
Referenced by xmlCopyChar(), and xsltNumberFormatDecimal().
XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlCreateEntityParserCtxt | ( | const xmlChar * | URL, |
const xmlChar * | ID, | ||
const xmlChar * | base | ||
) |
xmlCreateEntityParserCtxt: @URL: the entity URL @ID: the entity PUBLIC ID @base: a possible base for the target URI
Create a parser context for an external entity Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.
Returns the new parser context or NULL
Definition at line 14027 of file parser.c.
XMLPUBFUN xmlParserCtxtPtr XMLCALL xmlCreateFileParserCtxt | ( | const char * | filename | ) |
Parser context.
xmlCreateFileParserCtxt: @filename: the filename
Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.
Returns the new parser context or NULL
Definition at line 14093 of file parser.c.
xmlCreateMemoryParserCtxt: @buffer: a pointer to a char array @size: the size of the array
Create a parser context for an XML in-memory document.
Returns the new parser context or NULL
Definition at line 14339 of file parser.c.
Referenced by xmlCreateDocParserCtxt(), xmlParseBalancedChunkMemoryInternal(), xmlParseInNodeContext(), and xmlReadMemory().
xmlCreateURLParserCtxt: @filename: the filename or URL @options: a combination of xmlParserOption
Create a parser context for a file or URL content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time and for file accesses
Returns the new parser context or NULL
Definition at line 14051 of file parser.c.
Referenced by xmlCreateFileParserCtxt(), and xmlReadFile().
XMLPUBFUN int XMLCALL xmlCurrentChar | ( | xmlParserCtxtPtr | ctxt, |
int * | len | ||
) |
xmlCurrentChar: @ctxt: the XML parser context @len: pointer to the length of the char read
The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer. Implement the end of line normalization: 2.11 End-of-Line Handling Wherever an external parsed entity or the literal entity value of an internal parsed entity contains either the literal two-character sequence "#xD#xA" or a standalone literal #xD, an XML processor must pass to the application the single character #xA. This behavior can conveniently be produced by normalizing all line breaks to #xA on input, before parsing.)
Returns the current char value and its length
Definition at line 542 of file parserInternals.c.
XMLPUBFUN void XMLCALL xmlFreeInputStream | ( | xmlParserInputPtr | input | ) |
xmlFreeInputStream: @input: an xmlParserInputPtr
Free up an input stream.
Definition at line 1192 of file parserInternals.c.
Referenced by xmlCtxtReset(), xmlFreeParserCtxt(), xmlHaltParser(), xmlInitParserCtxt(), xmlLoadEntityContent(), xmlParsePEReference(), xmlPopInput(), xmlPushInput(), and xmlSAX2ExternalSubset().
xmlIsLetter: : an unicode character (int)
Check whether the character is allowed by the production [84] Letter ::= BaseChar | Ideographic
Returns 0 if not, non-zero otherwise
Definition at line 213 of file parserInternals.c.
XMLPUBFUN xmlParserInputPtr XMLCALL xmlNewEntityInputStream | ( | xmlParserCtxtPtr | ctxt, |
xmlEntityPtr | entity | ||
) |
xmlNewEntityInputStream: @ctxt: an XML parser context @entity: an Entity pointer
Create a new input stream based on an xmlEntityPtr
Returns the new input stream or NULL
Definition at line 1283 of file parserInternals.c.
Referenced by xmlLoadEntityContent(), and xmlParsePEReference().
XMLPUBFUN xmlParserInputPtr XMLCALL xmlNewInputFromFile | ( | xmlParserCtxtPtr | ctxt, |
const char * | filename | ||
) |
xmlNewInputFromFile: @ctxt: an XML parser context @filename: the filename to use as entity
Create a new input stream based on a file or an URL.
Returns the new input stream or NULL in case of error
Definition at line 1379 of file parserInternals.c.
XMLPUBFUN xmlParserInputPtr XMLCALL xmlNewInputStream | ( | xmlParserCtxtPtr | ctxt | ) |
xmlNewInputStream: @ctxt: an XML parser context
Create a new input stream structure.
Returns the new input stream or NULL
Definition at line 1215 of file parserInternals.c.
Referenced by xmlCreateMemoryParserCtxt(), xmlCtxtResetPush(), xmlNewEntityInputStream(), xmlNewInputFromFile(), xmlNewIOInputStream(), and xmlNewStringInputStream().
XMLPUBFUN xmlParserInputPtr XMLCALL xmlNewStringInputStream | ( | xmlParserCtxtPtr | ctxt, |
const xmlChar * | buffer | ||
) |
Input Streams.
xmlNewStringInputStream: @ctxt: an XML parser context @buffer: an memory buffer
Create a new input stream based on a memory buffer. Returns the new input stream
Definition at line 1346 of file parserInternals.c.
XMLPUBFUN void XMLCALL xmlNextChar | ( | xmlParserCtxtPtr | ctxt | ) |
xmlNextChar: @ctxt: the XML parser context
Skip to the next char input char.
Definition at line 380 of file parserInternals.c.
XMLPUBFUN void XMLCALL xmlParseAttributeListDecl | ( | xmlParserCtxtPtr | ctxt | ) |
xmlParseAttributeListDecl: @ctxt: an XML parser context
: parse the Attribute list def for an element
[52] AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>'
[53] AttDef ::= S Name S AttType S DefaultDecl
Definition at line 5976 of file parser.c.
Referenced by xmlParseMarkupDecl().
XMLPUBFUN int XMLCALL xmlParseAttributeType | ( | xmlParserCtxtPtr | ctxt, |
xmlEnumerationPtr * | tree | ||
) |
xmlParseAttributeType: @ctxt: an XML parser context @tree: the enumeration tree built while parsing
parse the Attribute list def for an element
[54] AttType ::= StringType | TokenizedType | EnumeratedType
[55] StringType ::= 'CDATA'
[56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS' | 'ENTITY' | 'ENTITIES' | 'NMTOKEN' | 'NMTOKENS'
Validity constraints for attribute values syntax are checked in xmlValidateAttributeValue()
[ VC: ID ] Values of type ID must match the Name production. A name must not appear more than once in an XML document as a value of this type; i.e., ID values must uniquely identify the elements which bear them.
[ VC: One ID per Element Type ] No element type may have more than one ID attribute specified.
[ VC: ID Attribute Default ] An ID attribute must have a declared default of #IMPLIED or #REQUIRED.
[ VC: IDREF ] Values of type IDREF must match the Name production, and values of type IDREFS must match Names; each IDREF Name must match the value of an ID attribute on some element in the XML document; i.e. IDREF values must match the value of some ID attribute.
[ VC: Entity Name ] Values of type ENTITY must match the Name production, values of type ENTITIES must match Names; each Entity Name must match the name of an unparsed entity declared in the DTD.
[ VC: Name Token ] Values of type NMTOKEN must match the Nmtoken production; values of type NMTOKENS must match Nmtokens.
Returns the attribute type
Definition at line 5934 of file parser.c.
Referenced by xmlParseAttributeListDecl().
XMLPUBFUN xmlChar *XMLCALL xmlParseAttValue | ( | xmlParserCtxtPtr | ctxt | ) |
xmlParseAttValue: @ctxt: an XML parser context
parse a value for an attribute Note: the parser won't do substitution of entities here, this will be handled later in xmlStringGetNodeList
[10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"
3.3.3 Attribute-Value Normalization: Before the value of an attribute is passed to the application or checked for validity, the XML processor must normalize it as follows:
Returns the AttValue parsed or NULL. The value has to be freed by the caller.
Definition at line 4182 of file parser.c.
Referenced by xmlParseDefaultDecl().
XMLPUBFUN void XMLCALL xmlParseCDSect | ( | xmlParserCtxtPtr | ctxt | ) |
xmlParseCDSect: @ctxt: an XML parser context
Parse escaped pure raw content.
[18] CDSect ::= CDStart CData CDEnd
[19] CDStart ::= ''
[20] Data ::= (Char* - (Char* '' Char*))
[21] CDEnd ::= ']]>'
Definition at line 9765 of file parser.c.
Referenced by xmlParseContentInternal().
XMLPUBFUN void XMLCALL xmlParseCharData | ( | xmlParserCtxtPtr | ctxt, |
int | cdata | ||
) |
xmlParseCharData: @ctxt: an XML parser context @cdata: int indicating whether we are within a CDATA section
parse a CharData section. if we are within a CDATA section ']]>' marks an end of section.
The right angle bracket (>) may be represented using the string ">", and must, for compatibility, be escaped using ">" or a character reference when it appears in the string "]]>" in content, when that string is not marking the end of a CDATA section.
[14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
Definition at line 4425 of file parser.c.
Referenced by xmlParseContentInternal().
XMLPUBFUN int XMLCALL xmlParseCharRef | ( | xmlParserCtxtPtr | ctxt | ) |
xmlParseCharRef: @ctxt: an XML parser context
parse Reference declarations
[66] CharRef ::= '&#' [0-9]+ ';' | '&x' [0-9a-fA-F]+ ';'
[ WFC: Legal Character ] Characters referred to using character references must match the production for Char.
Returns the value parsed (as an int), 0 in case of error
Definition at line 2332 of file parser.c.
Referenced by xmlParseAttValueComplex(), and xmlParseReference().
XMLPUBFUN void XMLCALL xmlParseComment | ( | xmlParserCtxtPtr | ctxt | ) |
xmlParseComment: @ctxt: an XML parser context
Skip an XML (SGML) comment The spec says that "For compatibility, the string "–" (double-hyphen) must not occur within comments. "
[15] Comment ::= ''
Definition at line 4888 of file parser.c.
Referenced by xmlParseContentInternal(), xmlParseMarkupDecl(), and xmlParseMisc().
XMLPUBFUN void XMLCALL xmlParseContent | ( | xmlParserCtxtPtr | ctxt | ) |
xmlParseContent: @ctxt: an XML parser context
Parse a content sequence. Stops at EOF or '</'.
[43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*
Definition at line 9958 of file parser.c.
Referenced by xmlParseBalancedChunkMemoryInternal(), xmlParseExternalEntityPrivate(), xmlParseExtParsedEnt(), and xmlParseInNodeContext().
XMLPUBFUN int XMLCALL xmlParseDefaultDecl | ( | xmlParserCtxtPtr | ctxt, |
xmlChar ** | value | ||
) |
xmlParseDefaultDecl: @ctxt: an XML parser context @value: Receive a possible fixed default value for the attribute
Parse an attribute default declaration
[60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('FIXED' S)? AttValue)
[ VC: Required Attribute ] if the default declaration is the keyword #REQUIRED, then the attribute must be specified for all elements of the type in the attribute-list declaration.
[ VC: Attribute Default Legal ] The declared default value must meet the lexical constraints of the declared attribute type c.f. xmlValidateAttributeDecl()
[ VC: Fixed Attribute Default ] if an attribute has a default value declared with the FIXED keyword, instances of that attribute must match the default value.
[ WFC: No < in Attribute Values ] handled in xmlParseAttValue()
returns: XML_ATTRIBUTE_NONE, XML_ATTRIBUTE_REQUIRED, XML_ATTRIBUTE_IMPLIED or XML_ATTRIBUTE_FIXED.
Definition at line 5682 of file parser.c.
Referenced by xmlParseAttributeListDecl().
XMLPUBFUN void XMLCALL xmlParseDocTypeDecl | ( | xmlParserCtxtPtr | ctxt | ) |
xmlParseDocTypeDecl: @ctxt: an XML parser context
parse a DOCTYPE declaration
[28] doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S? ('[' (markupdecl | PEReference | S)* ']' S?)? '>'
[ VC: Root Element Type ] The Name in the document type declaration must match the element type of the root element.
Definition at line 8282 of file parser.c.
Referenced by xmlParseDocument().
XMLPUBFUN void XMLCALL xmlParseElement | ( | xmlParserCtxtPtr | ctxt | ) |
xmlParseElement: @ctxt: an XML parser context
parse an XML element
[39] element ::= EmptyElemTag | STag content ETag
[ WFC: Element Type Match ] The Name in an element's end-tag must match the element type in the start-tag.
Definition at line 9987 of file parser.c.
Referenced by xmlParseDocument().
XMLPUBFUN xmlElementContentPtr XMLCALL xmlParseElementChildrenContentDecl | ( | xmlParserCtxtPtr | ctxt, |
int | inputchk | ||
) |
xmlParseElementChildrenContentDecl: @ctxt: an XML parser context @inputchk: the input used for the current entity, needed for boundary checks
parse the declaration for a Mixed Element content The leading '(' and spaces have been skipped in xmlParseElementContentDecl
[47] children ::= (choice | seq) ('?' | '*' | '+')?
[48] cp ::= (Name | choice | seq) ('?' | '*' | '+')?
[49] choice ::= '(' S? cp ( S? '|' S? cp )* S? ')'
[50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')'
[ VC: Proper Group/PE Nesting ] applies to [49] and [50] TODO Parameter-entity replacement text must be properly nested with parenthesized groups. That is to say, if either of the opening or closing parentheses in a choice, seq, or Mixed construct is contained in the replacement text for a parameter entity, both must be contained in the same replacement text. For interoperability, if a parameter-entity reference appears in a choice, seq, or Mixed construct, its replacement text should not be empty, and neither the first nor last non-blank character of the replacement text should be a connector (| or ,).
Returns the tree of xmlElementContentPtr describing the element hierarchy.
Definition at line 6533 of file parser.c.
XMLPUBFUN int XMLCALL xmlParseElementContentDecl | ( | xmlParserCtxtPtr | ctxt, |
const xmlChar * | name, | ||
xmlElementContentPtr * | result | ||
) |
Definition at line 6553 of file parser.c.
Referenced by xmlParseElementDecl().
XMLPUBFUN int XMLCALL xmlParseElementDecl | ( | xmlParserCtxtPtr | ctxt | ) |
xmlParseElementDecl: @ctxt: an XML parser context
parse an Element declaration.
[45] elementdecl ::= '<!ELEMENT' S Name S contentspec S? '>'
[ VC: Unique Element Type Declaration ] No element type may be declared more than once
Returns the type of the element, or -1 in case of error
Definition at line 6598 of file parser.c.
Referenced by xmlParseMarkupDecl().
XMLPUBFUN xmlElementContentPtr XMLCALL xmlParseElementMixedContentDecl | ( | xmlParserCtxtPtr | ctxt, |
int | inputchk | ||
) |
xmlParseElementMixedContentDecl: @ctxt: an XML parser context @inputchk: the input used for the current entity, needed for boundary checks
parse the declaration for a Mixed Element content The leading '(' and spaces have been skipped in xmlParseElementContentDecl
[51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' | '(' S? '#PCDATA' S? ')'
[ VC: Proper Group/PE Nesting ] applies to [51] too (see [49])
[ VC: No Duplicate Types ] The same name must not appear more than once in a single mixed-content declaration.
returns: the list of the xmlElementContentPtr describing the element choices
Definition at line 6104 of file parser.c.
Referenced by xmlParseElementContentDecl().
XMLPUBFUN xmlChar *XMLCALL xmlParseEncName | ( | xmlParserCtxtPtr | ctxt | ) |
xmlParseEncName: @ctxt: an XML parser context
parse the XML encoding name
[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
Returns the encoding name value or NULL
Definition at line 10293 of file parser.c.
Referenced by xmlParseEncodingDecl().
XMLPUBFUN const xmlChar *XMLCALL xmlParseEncodingDecl | ( | xmlParserCtxtPtr | ctxt | ) |
xmlParseEncodingDecl: @ctxt: an XML parser context
parse the XML encoding declaration
[80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'")
this setups the conversion filters.
Returns the encoding value or NULL
Definition at line 10358 of file parser.c.
Referenced by xmlParseTextDecl(), and xmlParseXMLDecl().
XMLPUBFUN void XMLCALL xmlParseEntityDecl | ( | xmlParserCtxtPtr | ctxt | ) |
xmlParseEntityDecl: @ctxt: an XML parser context
parse <!ENTITY declarations
[70] EntityDecl ::= GEDecl | PEDecl
[71] GEDecl ::= '<!ENTITY' S Name S EntityDef S? '>'
[72] PEDecl ::= '<!ENTITY' S '' S Name S PEDef S? '>'
[73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)
[74] PEDef ::= EntityValue | ExternalID
[76] NDataDecl ::= S 'NDATA' S Name
[ VC: Notation Declared ] The Name must match the declared name of a notation.
Definition at line 5409 of file parser.c.
Referenced by xmlParseMarkupDecl().
XMLPUBFUN xmlEntityPtr XMLCALL xmlParseEntityRef | ( | xmlParserCtxtPtr | ctxt | ) |
xmlParseEntityRef: @ctxt: an XML parser context
parse ENTITY references declarations
[68] EntityRef ::= '&' Name ';'
[ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", the Name given in the entity reference must match that in an entity declaration, except that well-formed documents need not declare any of the following entities: amp, lt, gt, apos, quot. The declaration of a parameter entity must precede any reference to it. Similarly, the declaration of a general entity must precede any reference to it which appears in a default value in an attribute-list declaration. Note that if entities are declared in the external subset or in external parameter entities, a non-validating processor is not obligated to read and process their declarations; for such documents, the rule that an entity must be declared is a well-formedness constraint only if standalone='yes'.
[ WFC: Parsed Entity ] An entity reference must not contain the name of an unparsed entity
Returns the xmlEntityPtr if found, or NULL otherwise.
Definition at line 7531 of file parser.c.
Referenced by xmlParseAttValueComplex(), and xmlParseReference().
XMLPUBFUN xmlChar *XMLCALL xmlParseEntityValue | ( | xmlParserCtxtPtr | ctxt, |
xmlChar ** | orig | ||
) |
xmlParseEntityValue: @ctxt: an XML parser context @orig: if non-NULL store a copy of the original entity value
parse a value for ENTITY declarations
[9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' | "'" ([^%&'] | PEReference | Reference)* "'"
Returns the EntityValue parsed with reference substituted or NULL
Definition at line 3767 of file parser.c.
Referenced by xmlParseEntityDecl().
XMLPUBFUN int XMLCALL xmlParseEnumeratedType | ( | xmlParserCtxtPtr | ctxt, |
xmlEnumerationPtr * | tree | ||
) |
xmlParseEnumeratedType: @ctxt: an XML parser context @tree: the enumeration tree built while parsing
parse an Enumerated attribute type.
[57] EnumeratedType ::= NotationType | Enumeration
[58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'
Returns: XML_ATTRIBUTE_ENUMERATION or XML_ATTRIBUTE_NOTATION
Definition at line 5871 of file parser.c.
Referenced by xmlParseAttributeType().
XMLPUBFUN xmlEnumerationPtr XMLCALL xmlParseEnumerationType | ( | xmlParserCtxtPtr | ctxt | ) |
xmlParseEnumerationType: @ctxt: an XML parser context
parse an Enumeration attribute type.
[59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')'
[ VC: Enumeration ] Values of this type must match one of the Nmtoken tokens in the declaration
Returns: the enumeration attribute tree built while parsing
Definition at line 5802 of file parser.c.
Referenced by xmlParseEnumeratedType().
XMLPUBFUN xmlChar *XMLCALL xmlParseExternalID | ( | xmlParserCtxtPtr | ctxt, |
xmlChar ** | publicID, | ||
int | strict | ||
) |
xmlParseExternalID: @ctxt: an XML parser context @publicID: a xmlChar** receiving PubidLiteral @strict: indicate whether we should restrict parsing to only production [75], see NOTE below
Parse an External ID or a Public ID
NOTE: Productions [75] and [83] interact badly since [75] can generate 'PUBLIC' S PubidLiteral S SystemLiteral
[75] ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral
[83] PublicID ::= 'PUBLIC' S PubidLiteral
Returns the function returns SystemLiteral and in the second case publicID receives PubidLiteral, is strict is off it is possible to return NULL and have publicID set.
Definition at line 4683 of file parser.c.
Referenced by xmlParseDocTypeDecl(), xmlParseEntityDecl(), and xmlParseNotationDecl().
XMLPUBFUN void XMLCALL xmlParseExternalSubset | ( | xmlParserCtxtPtr | ctxt, |
const xmlChar * | ExternalID, | ||
const xmlChar * | SystemID | ||
) |
xmlParseExternalSubset: @ctxt: an XML parser context @ExternalID: the external identifier @SystemID: the system identifier (or URL)
parse Markup declarations from an external subset
[30] extSubset ::= textDecl? extSubsetDecl
[31] extSubsetDecl ::= (markupdecl | conditionalSect | PEReference | S) *
Definition at line 6998 of file parser.c.
Referenced by xmlSAX2ExternalSubset().
XMLPUBFUN void XMLCALL xmlParseMarkupDecl | ( | xmlParserCtxtPtr | ctxt | ) |
xmlParseMarkupDecl: @ctxt: an XML parser context
parse Markup declarations
[29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment
[ VC: Proper Declaration/PE Nesting ] Parameter-entity replacement text must be properly nested with markup declarations. That is to say, if either the first character or the last character of a markup declaration (markupdecl above) is contained in the replacement text for a parameter-entity reference, both must be contained in the same replacement text.
[ WFC: PEs in Internal Subset ] In the internal DTD subset, parameter-entity references can occur only where markup declarations can occur, not within markup declarations. (This does not apply to references that occur in external parameter entities or to the external subset.)
Definition at line 6866 of file parser.c.
Referenced by xmlParseConditionalSections(), xmlParseExternalSubset(), and xmlParseInternalSubset().
XMLPUBFUN void XMLCALL xmlParseMisc | ( | xmlParserCtxtPtr | ctxt | ) |
xmlParseMisc: @ctxt: an XML parser context
parse an XML Misc* optional field.
[27] Misc ::= Comment | PI | S
Definition at line 10667 of file parser.c.
Referenced by xmlParseDocument().
XMLPUBFUN const xmlChar *XMLCALL xmlParseName | ( | xmlParserCtxtPtr | ctxt | ) |
Generic production rules.
xmlParseName: @ctxt: an XML parser context
parse an XML name.
[4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender
[5] Name ::= (Letter | '_' | ':') (NameChar)*
[6] Names ::= Name (#x20 Name)*
Returns the Name parsed or NULL
Definition at line 3344 of file parser.c.
Referenced by xmlParseAttributeListDecl(), xmlParseDocTypeDecl(), xmlParseElementChildrenContentDeclPriv(), xmlParseElementDecl(), xmlParseElementMixedContentDecl(), xmlParseEntityDecl(), xmlParseEntityRef(), xmlParseNameAndCompare(), xmlParseNotationDecl(), xmlParseNotationType(), xmlParsePEReference(), xmlParsePITarget(), and xmlParseQName().
XMLPUBFUN xmlChar *XMLCALL xmlParseNmtoken | ( | xmlParserCtxtPtr | ctxt | ) |
xmlParseNmtoken: @ctxt: an XML parser context
parse an XML Nmtoken.
[7] Nmtoken ::= (NameChar)+
[8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*
Returns the Nmtoken parsed or NULL
Definition at line 3662 of file parser.c.