当前位置:网站首页>DTD constraints
DTD constraints
2022-06-22 08:03:00 【Chasing dream Zichen】
1. What is? DTD?
Document type definition (document type definition) ( constraint )
2. What is? XML?
HTML: Hypertext markup language
XML: Extensible markup language
3.XML Two document constraints for
DTD and Schema
4.XML Format requirements ( legal XML)
1) With and only one root node ;
2) It consists of a start tag and an end tag ;
3)XML Label case sensitive ;
4) Nesting labels correctly ;
5) Use legal tag name , Do not use special symbols ;
6) Define valid properties ;
5. Use DTD
5.1 stay XML Add DTD Affirming
1) Internal statement :
2) An external statement :
5.2 Element definition syntax (DTD Restrictions on elements )
Basic grammar :<!ELEMENT The element name Element type >
Element classification :EMPTY Empty elements
(#PCDATA) Text elements
(e1,e2) Mixed elements
Element limits :,( The order )、|( or , A commonplace )、?(0 or 1 Time ),(10=0,0 Times or times ), +(1+0=1,1 Times or times )
5.3 Attribute definition syntax (DTD Restrictions on attributes )
Basic grammar :<!ATTLIST The element name The attribute name Attribute types Setting instructions >
Attribute types :ID/CDATA/ENUM ( male | Woman ) “ male ” IDREF
Setting instructions :#REQUIRED( must )/#IMPLIED( Optional )
5.4 Special symbol escape
&( Logic and ) --> &
>( Greater than ) --> >
<( Less than ) --> <
‘( Single quotation marks ) --> '
“( Double quotes ) --> "
Code case
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app[
<!ELEMENT web-app (display-name,context-param,listener+,filter,filter-mapping,servlet,servlet-mapping,welcome-file-list) >
<!ELEMENT display-name (#PCDATA) >
<!ELEMENT context-param (param-name,param-value) >
<!ELEMENT param-name (#PCDATA) >
<!ELEMENT param-value (#PCDATA) >
<!ELEMENT listener (listener-class) >
<!ELEMENT listener-class (#PCDATA) >
<!ELEMENT filter (filter-name,filter-class,async-supported,init-param) >
<!ELEMENT filter-name (#PCDATA) >
<!ELEMENT filter-class (#PCDATA) >
<!ELEMENT async-supported (#PCDATA) >
<!ELEMENT init-param (param-name,param-value) >
<!ELEMENT filter-mapping (filter-name,url-pattern) >
<!ELEMENT url-pattern (#PCDATA) >
<!ELEMENT servlet (servlet-name,servlet-class,init-param,load-on-startup,async-supported) >
<!ELEMENT servlet-name (#PCDATA) >
<!ELEMENT servlet-class (#PCDATA) >
<!ELEMENT load-on-startup (#PCDATA) >
<!ELEMENT servlet-mapping (servlet-name,url-pattern) >
<!ELEMENT welcome-file-list (welcome-file) >
<!ELEMENT welcome-file (#PCDATA) >
]>
<web-app>
<display-name>Archetype Created Web Application</display-name>
<!-- Spring and web Project integration start -->
<!-- spring Context profile -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<!-- Read Spring Context listener -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Spring and web Project integration end -->
<!-- prevent Spring Memory overflow listener -->
<listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener>
<!-- Chinese scrambling -->
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<async-supported>true</async-supported>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern> </filter-mapping> <!-- Spring MVC servlet --> <servlet> <servlet-name>SpringMVC</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <!-- This parameter can not be configured , The default value is :/WEB-INF/springmvc-servlet.xml--> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring-mvc.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> <!--web.xml 3.0 New features , Is asynchrony supported --> <async-supported>true</async-supported> </servlet> <servlet-mapping> <servlet-name>SpringMVC</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>/home/index.shtml</welcome-file> </welcome-file-list> </web-app> 边栏推荐
- Mt4/mql4 getting started to be proficient in EA tutorial lesson 6 - common functions of MQL language (VI) - common order function
- SQL server changes the primary key index to a non clustered index
- Upload your own library to pod
- Master data management system
- Characteristics of industrial Internet
- Website sharing of program ape -- continuous update
- Microsoft Remote Desktop 10.7.6正式版
- mysql查询group by 1055 问题完美解决,最简单最便捷的方法
- PostgreSQL common commands and SQL -- continuous update
- Usage and understanding of async/await in JS
猜你喜欢

Expérience électrique en mode - - expérience 2 circuit d'amplification de source commune JFET

Mt4/mql4 getting started to proficient in foreign exchange EA automatic trading tutorial - identify the emergence of the new K line

Upload your own library to pod

Mt4/mql4 getting started to be proficient in EA tutorial lesson 7 - common functions of MQL language (VII) - index value taking function

(7)双向链表

【Oracle 数据库】奶妈式教程 day14 转换函数

Website sharing of program ape -- continuous update
![[Oracle database] mammy tutorial day14 conversion function](/img/ef/c468316750c57212a067abd00a10e9.png)
[Oracle database] mammy tutorial day14 conversion function

什么是分布式事务

Mt4/mql4 getting started to mastering EA tutorial lesson 3 - common functions of MQL language (III) - common functions of K-line value taking
随机推荐
Mt4/mql4 getting started to mastering EA tutorial lesson 5 - common functions of MQL language (V) - common functions of account information
Blob format problems involved in image uploading
Collections以及Arrays
Oracle execution plan analysis
What are uniapp, wap2app and 5 + app in dccloud?
Multiple ways for idea to package jars
Docker install redis
Concatenate the specified character at the end of a number in a string
【Oracle 数据库】奶妈式教程 day14 转换函数
(9)顺序队列与栈队列
【 Oracle database】 Nursery Mother Tutorial day13 date Function
The difference between get and post requests
C语言双向链表实现图书管理系统 可读写文件
Vue page caching problem solving (keep alive + page level routing guard + lifecycle activated)
The significance of code coverage testing to programming white and its application
MySQL query database capacity
Leetcode 172 Zero after factorial (2022.06.21)
Layer drawing method
MySQL transactions
Mt4/mql4 getting started to be proficient in EA tutorial lesson 7 - common functions of MQL language (VII) - index value taking function