Monday, November 22, 2010

Does Infant Tylenol Cause Constipation?

DTD

This is the document type definition, it serves as a description of structure and syntax of XML or SGML document.

Its main purpose is as mentioned the description of the data format to be used in a web page, this usually see linked to the xml, as this helps you to format your content, for example, saying that format is used, if are time, date, number, how many characters can contain, if the information is necessary to have it is if it is optional because, among other things

described in a DTD: Elements
: Indicates tags are allowed.
Structures: Indicate the order of the labels. Nesting
: Indicates that a label is the daughter of another label.

Here I leave a page which will be very useful to know more about this and you'll come several examples.

Example:
For example, I leave you here a simple example being hacerca of data must contain an xml staff of a company.


This is the xml code And here's how you displayed in the browser, telling you that contains children, among others.
Now open the dtd, which will give us the following information
There really take the dtd is sensitive to the characters, so you have to be careful
For example, in the first line, indicate that the element father is personal.
And these children will: numeroempleado, name, title, process, extention, telefonooficina, post.
We also see that in the process there is a "+", this means that you have other children who are shown. And
extension, telefonooficina and e is a "*", which indicates that these may contain more than one item.
We also see a "?", Which tells us that your item is optional, so you can go or not.
And in the last lines a # REQUIRED, which indicates that these fields must exist.

0 comments:

Post a Comment