Ver Mensaje Individual
  #4 (permalink)  
Antiguo 27/01/2005, 22:50
Appletalk
 
Fecha de Ingreso: febrero-2004
Mensajes: 221
Antigüedad: 20 años, 3 meses
Puntos: 0
Sin duda es necesaria una respuesta mia para hacer que una persona como vos use google. No me interesa pelear con vos, solo quiero ayudarte. Perdon

La mejor respuesta a tu pregunta
There are a number of reasons why XML Schema is better than DTD.
XML Schema has Support for Data Types

One of the greatest strengths of XML Schemas is the support for data types.

With the support for data types:

* It is easier to describe permissible document content
* It is easier to validate the correctness of data
* It is easier to work with data from a database
* It is easier to define data facets (restrictions on data)
* It is easier to define data patterns (data formats)
* It is easier to convert data between different data types

XML Schemas use XML Syntax

Another great strength about XML Schemas is that they are written in XML.

Because XML Schemas are written in XML:

* You don't have to learn another language
* You can use your XML editor to edit your Schema files
* You can use your XML parser to parse your Schema files
* You can manipulate your Schema with the XML DOM
* You can transform your Schema with XSLT

XML Schemas Secure Data Communication

When data is sent from a sender to a receiver it is essential that both parts have the same "expectations" about the content.

With XML Schemas, the sender can describe the data in a way that the receiver will understand.

A date like this: "03-11-2004" will, in some countries, be interpreted as 3. November and in other countries as 11. March, but an XML element with a data type like this:

<date type="date">2004-03-11</date>

ensures a mutual understanding of the content because the XML data type date requires the format YYYY-MM-DD.
XML Schemas are Extensible

XML Schemas are extensible, just like XML, because they are written in XML.

With an extensible Schema definition you can:

* Reuse your Schema in other Schemas
* Create your own data types derived from standard types
* Reference multiple schemas from the same document

Well-Formed is not Enough

A well-formed XML document is a document that conforms to the XML syntax rules:

* must begin with the XML declaration
* must have one unique root element
* all start tags must match end-tags
* XML tags are case sensitive
* all elements must be closed
* all elements must be properly nested
* all attribute values must be quoted
* XML entities must be used for special characters

Even if documents are Well-Formed they can still contain errors, and those errors can have serious consequences. Think of this situation: you order 5 gross of laser printers, instead of 5 laser printers. With XML Schemas, most of these errors can be caught by your validating software.
Cita:
Iniciado por W3Schools