DTD - 实体

    技术2022-05-11  100

    Entities are variables used to define shortcuts to common text.实体是用于定义普通文本快捷方式的变量。- Entity references are references to entities.实体参数就是反映实体特征的参数。- Entities can be declared internal, or external实体可以声明为内部实体或外部实体。


    Internal Entity Declaration 内部实体声明

    Syntax: <!ENTITY entity-name "entity-value">DTD Example: <!ENTITY writer "Donald Duck."><!ENTITY copyright "Copyright W3Schools."> XML example: <author>&writer;©right;</author>  

    External Entity Declaration 外部实体声明

    Syntax: <!ENTITY entity-name SYSTEM "URI/URL">DTD Example: <!ENTITY writer SYSTEM "http://www.w3schools.com/dtd/entities.dtd"><!ENTITY copyright SYSTEM "http://www.w3schools.com/dtd/entities.dtd"> XML example: <author>&writer;©right;</author>  

    最新回复(0)