DTD - 来自网络的实例


电视节目表 DTD

由 David Moisan 创造。拷贝自:http://www.davidmoisan.org/

  1. <!DOCTYPE TVSCHEDULE [
  2. <!ELEMENT TVSCHEDULE (CHANNEL+)>
  3. <!ELEMENT CHANNEL (BANNER,DAY+)>
  4. <!ELEMENT BANNER (#PCDATA)>
  5. <!ELEMENT DAY (DATE,(HOLIDAY|PROGRAMSLOT+)+)>
  6. <!ELEMENT HOLIDAY (#PCDATA)>
  7. <!ELEMENT DATE (#PCDATA)>
  8. <!ELEMENT PROGRAMSLOT (TIME,TITLE,DESCRIPTION?)>
  9. <!ELEMENT TIME (#PCDATA)>
  10. <!ELEMENT TITLE (#PCDATA)>&nbsp;
  11. <!ELEMENT DESCRIPTION (#PCDATA)>
  12. <!ATTLIST TVSCHEDULE NAME CDATA #REQUIRED>
  13. <!ATTLIST CHANNEL CHAN CDATA #REQUIRED>
  14. <!ATTLIST PROGRAMSLOT VTR CDATA #IMPLIED>
  15. <!ATTLIST TITLE RATING CDATA #IMPLIED>
  16. <!ATTLIST TITLE LANGUAGE CDATA #IMPLIED>
  17. ]>

报纸文章 DTD

拷贝自:http://www.vervet.com/

  1. <!DOCTYPE NEWSPAPER [&nbsp;
  2. <!ELEMENT NEWSPAPER (ARTICLE+)>
  3. <!ELEMENT ARTICLE (HEADLINE,BYLINE,LEAD,BODY,NOTES)>
  4. <!ELEMENT HEADLINE (#PCDATA)>
  5. <!ELEMENT BYLINE (#PCDATA)>
  6. <!ELEMENT LEAD (#PCDATA)>
  7. <!ELEMENT BODY (#PCDATA)>
  8. <!ELEMENT NOTES (#PCDATA)>&nbsp;
  9. <!ATTLIST ARTICLE AUTHOR CDATA #REQUIRED>
  10. <!ATTLIST ARTICLE EDITOR CDATA #IMPLIED>
  11. <!ATTLIST ARTICLE DATE CDATA #IMPLIED>
  12. <!ATTLIST ARTICLE EDITION CDATA #IMPLIED>
  13. <!ENTITY NEWSPAPER "Vervet Logic Times">
  14. <!ENTITY PUBLISHER "Vervet Logic Press">
  15. <!ENTITY COPYRIGHT "Copyright 1998 Vervet Logic Press">
  16. ]>

产品目录 DTD

拷贝自:http://www.vervet.com/

  1. <!DOCTYPE CATALOG [
  2. <!ENTITY AUTHOR "John Doe">
  3. <!ENTITY COMPANY "JD Power Tools, Inc.">
  4. <!ENTITY EMAIL "jd@jd-tools.com">
  5. <!ELEMENT CATALOG (PRODUCT+)>
  6. <!ELEMENT PRODUCT
  7. (SPECIFICATIONS+,OPTIONS?,PRICE+,NOTES?)>
  8. <!ATTLIST PRODUCT
  9. NAME CDATA #IMPLIED
  10. CATEGORY (HandTool|Table|Shop-Professional) "HandTool"
  11. PARTNUM CDATA #IMPLIED
  12. PLANT (Pittsburgh|Milwaukee|Chicago) "Chicago"
  13. INVENTORY (InStock|Backordered|Discontinued) "InStock">
  14. <!ELEMENT SPECIFICATIONS (#PCDATA)>
  15. <!ATTLIST SPECIFICATIONS
  16. WEIGHT CDATA #IMPLIED
  17. POWER CDATA #IMPLIED>
  18. <!ELEMENT OPTIONS (#PCDATA)>
  19. <!ATTLIST OPTIONS
  20. FINISH (Metal|Polished|Matte) "Matte"
  21. ADAPTER (Included|Optional|NotApplicable) "Included"
  22. CASE (HardShell|Soft|NotApplicable) "HardShell">
  23. <!ELEMENT PRICE (#PCDATA)>
  24. <!ATTLIST PRICE
  25. MSRP CDATA #IMPLIED
  26. WHOLESALE CDATA #IMPLIED
  27. STREET CDATA #IMPLIED
  28. SHIPPING CDATA #IMPLIED>
  29. <!ELEMENT NOTES (#PCDATA)>
  30. ]>

分类导航