掌握好基础啊!<<Effective C++>>,<<C++ Primer>>
考核内容包括不限于:
重构,重载,析构函数里(重构,重载,)new,malloc异常 堆和栈
OOP,OSI七层模型(应用层:http,ftp 传输层:tcp)
设计模式,UML图
Xml(DocTYPe)
1. XML DOCTYPE
2.10.2 The DOCTYPE declaration
An XML file which is valid (as opposed to simply well-formed) must specify a DTD against which its content is to be validated. This is the function of the DOCTYPE declaration.
The DOCTYPE declaration contains, following the DOCTYPE keyword, at least two parts: the name of the root element for the associated document, and a set of declarations for all the elements, attributes, notations, entities, etc. which together define the document type declaration (DTD) of that document. Note, incidentally, that the root element name (and hence the DOCTYPE name) may be that of any element whose declaration is supplied in this set. The declarations may be supplied explicitly, or by reference to an external entity such as a file, or by a combination of the two.
Taking each of these possibilities in turn, we first present a DOCTYPE declaration in which the declarations for all the elements, attributes, etc. required are given explicitly:
<!DOCTYPE myDoc [ <!ELEMENT myDoc (p+) > <!ATTLIST myDoc n CDATA #IMPLIED> <!ELEMENT p (#PCDATA)> ]> <myDoc n="1"> <p>This is an instance of a "my.doc" document</p> </myDoc>Note that the required declarations are enclosed within square brackets inside the DOCTYPE declaration: this part of the declaration is technically known as the DTD subset .
More usually, however, the required declarations will be held in a separate entity and invoked by reference, as follows:
<!DOCTYPE myDoc SYSTEM "myDoc.dtd" []> <myDoc> <p>This is another instance of a "myDoc" document.</p> <p>It has two paragraphs.</p> </myDoc>Note the similarity between the syntax used to reference the external entity containing the required declarations and that used to define any other system entity (see 2.7.1 Entity declarations ). The square brackets may be supplied even though they enclose nothing, as in this example, or they may be omitted.
Next, we present a case where declarations are given both within the DTD subset and by reference to an external entity:
<!DOCTYPE myDoc SYSTEM "myDoc.dtd" [ <!ENTITY tla "three letter acronym">]> <myDoc> <p>This is yet another instance of a "myDoc" document.</p> <p>It is surprisingly free of &tla;s.</p> </myDoc>
Any kind of declaration may be added to a DTD subset; as we have already seen (2.8.2 Conditional marked section), this is the mechanism by which the TEI DTD is customized.
<!DOCTYPE TEI.2 PUBLIC "-//TEI P3//DTD Main Document Type//EN" "tei2.dtd" [ <!ENTITY % TEI.prose 'INCLUDE'> <!ENTITY % TEI.XML 'INCLUDE'> <!ENTITY tla "Three Letter Acronym"> <!ENTITY % x.phrase 'myTag|'> <!ELEMENT myTag (#PCDATA) > <!-- any other special-purpose declarations or re-declarations go here --> ]> <TEI.2> <!-- This is an instance of a modified TEI.2 type document, which may contain <myTag>my special tags</myTag> and references to my usual entities such as &tla;. --> </TEI.2>When, as here, the document type declaration in force includes both the contents of the DTD subset, and the contents of some external entity (in the case above, whatever file is specified by the PUBLIC identifier given, tei2.dtd by default), declarations in the DTD subset are always carried out first. As noted above, ( 2.7.5 Parameter entities ), the order is important, because in XML only the first declaration of an entity counts. In the above example, therefore, the declaration of the entity tla in the DTD subset takes precedence over any declaration of the same entity in the file tei2.dtd