Liquid Technologies - XML Glossary
DTD / Structure / DTD DOCTYPE
In This Topic
    DTD DOCTYPE
    In This Topic

    Using the DOCTYPE node it is possible to specify a set of DTD Schema rules that are defined inline within the XML Document

    The square brackets [...] contain the DTD Schema rules.

    InlineSchema.xml
    Copy Code
    <?xml version="1.0"?>
    <!DOCTYPE note [
        <!ELEMENT note (to,from,heading,body)>
        <!ELEMENT to (#PCDATA)>
        <!ELEMENT from (#PCDATA)>
        <!ELEMENT heading (#PCDATA)>
        <!ELEMENT body (#PCDATA)>
    ]>
    <note>
        <to>Tove</to>
        <from>Jani</from>
        <heading>Reminder</heading>
        <body>Don't forget me this weekend</body>
    </note>
    

    EBNF Syntax

    The syntax for an XML DOCTYPE described by the W3C as using EBNF as follows.

    [28]  doctypedecl       ::= '<!DOCTYPE' S Name (S ExternalID)? S? ('[' intSubset ']' S?)? '>'
    
    See Also