XML Syntax Quick Reference - Mulberry Technologies, Inc.

cheat.sheets.org
  • No tags were found...

XML Syntax Quick Reference - Mulberry Technologies, Inc.

Element DeclarationkeywordELEMENTname of theelement type,formal definition of theits "tag"element's allowed contentConnectors, “Then” Follow with (in sequence)| “Or” Select (only) one from the groupOnly one connector type per group — no mixing!Occurrence Indicators(no indicator) RequiredOne and only one? Optional None or one* Optional, repeatable None, one, or more+ Required, repeatable One or moreGroupings( Start content model or group) End content model or group#PCDATA in Models (first, OR bars, asterisk)(#PCDATA)(#PCDATA | elem1 | elem2 )*elementkeywordname#PCDATA alwaysVertical Bar "|" include the *ANY Element KeywordkeywordELEMENTname of theelement type,its "tag"keywordANYEMPTY Element KeywordkeywordELEMENTname of theelement type,its "tag"keywordEMPTYAttribute DeclarationkeywordATTLISTname of theassociatedelementname ofkeyword orattribute default valuewhat kind ofvalue or list ofvaluesrepeat foreach attributeDeclared Value KeywordsCDATA Data character string (default if well-formed)NMTOKEN Name tokenNMTOKENS One or more name tokens (spaces between)ID Unique identifier for elementIDREF Reference to ID on another elementIDREFS One or more IDREFs (spaces between)ENTITY Name of an entity (declared elsewhere)ENTITIES One or more names of entitiesEnumerated Value Descriptions(a|b|c)NOTATION(x|y)Attribute DefaultsList of attribute values (Or between)Names of notations (Requires a list ofvalues as well as the keyword. Valuesdeclared elsewhere with NOTATION.)"value" If attribute is omitted, assume this value.#REQUIRED Required. Document is not valid if novalue is provided.#IMPLIED Optional. Not constrained; no default canbe inferred; an application is free to handleas appropriate.#FIXED"value"Fixed value. (Requires a value as well asthe keyword.) If the attribute appears witha different value, that’s an error.Reserved Attributesxml:space Preserve whitespace or use defaultxml:lang Indicate language of element and thatelement’s attributes and childrenXML SyntaxQuick ReferenceMulberry Technologies, Inc.17 West Jefferson Street, Suite 207Rockville, MD 20850 USAPhone: +1 301/315-9631Fax: +1 301/315-8285info@mulberrytech.comhttp://www.mulberrytech.comMulberryTechnologies, Inc.MulberryTechnologies, Inc.© 2006 Mulberry Technologies, Inc.MulberryTechnologies, Inc. © 2006 Mulberry Technologies, Inc.


DOCTYPE DeclarationkeywordDOCTYPEname of thedocumenttypepointer toanother fileInternal SubsetDocumentEntity]>External SubsetDocumentEntityExternal-IDSYSTEM "URI"ORPUBLIC "Public ID" "URI"Parameter Entity DeclarationsInternal Parameter EntitykeywordENTITYname ofthe entitypercent sign "%"shows this is aparameter entityentity value(any literal)single or double quotes,' or ", must matchExternal Parameter EntitykeywordENTITYname ofthe entitypercent sign "%"shows this is aparameter entitypointer to a fileGeneral Entity DeclarationsInternal EntitykeywordENTITYname ofthe entityentity value(any literal)single or double quotes,' or ", must matchExternal Unparsed Entitykeyword SYSTEM orENTITY PUBLIC identifiername ofthe entityPredefined General Entitieskeyword NDATAfollowed bynotation nameEntity Displays As Character Value& & &#38;< < &#60;> > >' ' '" " "XML DeclarationVersion of theXML specificationCharacter encoding of thedocument, expressed inLatin characters, e.g. UTF-8, UTF-16,EUC-JP, ISO-10646-UCS2Processing InstructionNotation DeclarationkeywordNOTATIONCommentSYSTEM or PUBLIC identifier(PUBLIC does not require URI)name ofthe entity(FAX, JPG, CGS, etc.)must be unique in DTDComment may contain anycharacters except the string "--".Standalone declaration:no: parsing affected byexternal DTD subsetyes: parsing not affected byexternal DTD subsetStart Tag with Attribute (in document)name ofthe elementname of theattributeequalssignone or morevaluessingle or double quotes,' or ", must matchEMPTY Element (in document)CDATA Section (in document)MulberryTechnologies, Inc.© 2006 Mulberry Technologies, Inc.MulberryTechnologies, Inc.© 2006 Mulberry Technologies, Inc.MulberryTechnologies, Inc.© 2006 Mulberry Technologies, Inc.

More magazines by this user
Similar magazines