Tutorial XML

INICIO XML Introducción XML XML Cómo utilizar Árbol XML Sintaxis XML Elementos XML Atributos XML Espacios de nombres XML Pantalla XML Solicitud Http XML Analizador XML DOM XML XPath XML XML XSLT XQuery XML Enlace X XML Validador XML DTD XML Esquema XML Servidor XML Ejemplos XML Cuestionario XML Certificado XML

XML-AJAX

AJAX Introducción AJAX XMLHttp Solicitud AJAX Respuesta AJAX Archivo XML AJAX AJAXPHP Ajax ASP Base de datos AJAX Aplicaciones AJAX Ejemplos de AJAX

DOM XML

DOM Introducción Nodos DOM Acceso DOM Información del nodo DOM Lista de nodos DOM Atravesando DOM Navegación DOM DOM obtener valores Nodos de cambio de DOM Eliminar nodos DOM Nodos de reemplazo de DOM DOM Crear nodos Agregar nodos DOM Nodos de clonación de DOM Ejemplos de DOM

Tutorial XPath

Introducción a XPath Nodos XPath Sintaxis XPath Ejes XPath Operadores XPath Ejemplos de XPath

Tutorial XSLT

XSLT Introducción Idiomas XSL Transformación XSLT XSLT <plantilla> XSLT <valor-de> XSLT <para-cada> XSLT <ordenar> XSLT <si> XSLT <elegir> Aplicar XSLT XSLT en el cliente XSLT en el servidor XSLT Editar XML Ejemplos de XSLT

Tutorial de XQuery

Introducción a XQuery Ejemplo de XQuery XQuery FLWOR XQuery HTML Términos de XQuery Sintaxis XQuery XQuery Agregar Seleccionar XQuery Funciones XQuery

DTD XML

Introducción a DTD Bloques de construcción DTD Elementos DTD Atributos DTD Elementos DTD vs Attr Entidades DTD Ejemplos de DTD

Esquema XSD

XSD Introducción XSD Cómo XSD <esquema> Elementos XSD Atributos XSD Restricciones XSD

Complejo XSD

Elementos XSD XSD vacío Solo elementos XSD Solo texto XSD XSD mixto Indicadores XSD XSD <cualquiera> XSD <cualquieratributo> Sustitución XSD Ejemplo XSD

Datos XSD

Cadena XSD Fecha XSD XSD Numérico Miscelánea XSD Referencia XSD

Servicios Web

Servicios XML XML WSDL JABÓN XML XML RDF RSS XML

Referencias

Tipos de nodos DOM Nodo DOM Lista de nodos DOM DOM NamedNodeMap Documento DOM Elemento DOM Atributo DOM Texto DOM DOM CDATA Comentario DOM DOM XMLHttpSolicitud Analizador DOM Elementos XSLT Funciones XSLT/XPath

elemento de esquema XML


❮ Referencia completa del esquema XML

Definición y uso

El elemento de esquema define el elemento raíz de un esquema.

Información del elemento

  • Elementos principales: NINGUNO

Sintaxis

<schema
id=ID
attributeFormDefault=qualified|unqualified
elementFormDefault=qualified|unqualified
blockDefault=(#all|list of (extension|restriction|substitution))
finalDefault=(#all|list of (extension|restriction|list|union))
targetNamespace=anyURI
version=token
xmlns=anyURI
any attributes
>

((include|import|redefine|annotation)*,(((simpleType|complexType|
group|attributeGroup)|element|attribute|notation),annotation*)*)

</schema>

Attribute Description
id Optional. Specifies a unique ID for the element
attributeFormDefault Optional. The form for attributes declared in the target namespace of this schema. The value must be "qualified" or "unqualified". Default is "unqualified". "unqualified" indicates that attributes from the target namespace are not required to be qualified with the namespace prefix. "qualified" indicates that attributes from the target namespace must be qualified with the namespace prefix
elementFormDefault Optional. The form for elements declared in the target namespace of this schema. The value must be "qualified" or "unqualified". Default is "unqualified". "unqualified" indicates that elements from the target namespace are not required to be qualified with the namespace prefix. "qualified" indicates that elements from the target namespace must be qualified with the namespace prefix
blockDefault Optional. Specifies the default value of the block attribute on element and complexType elements in the target namespace. The block attribute prevents a complex type (or element) that has a specified type of derivation from being used in place of this complex type. This value can contain #all or a list that is a subset of extension, restriction, or substitution:
  • extension - prevents complex types derived by extension
  • restriction - prevents complex types derived by restriction
  • substitution - prevents substitution of elements
  • #all - prevents all derived complex types
finalDefault Optional. Specifies the default value of the final attribute on element, simpleType, and complexType elements in the target namespace. The final attribute prevents a specified type of derivation of an element, simpleType, or complexType element. For element and complexType elements, this value can contain #all or a list that is a subset of extension or restriction. For simpleType elements, this value can additionally contain list and union:
  • extension - prevents derivation by extension
  • restriction - prevents derivation by restriction
  • list - prevents derivation by list
  • union - prevents derivation by union
  • #all - prevents all derivation
targetNamespace Optional. A URI reference of the namespace of this schema
version Optional. Specifies the version of the schema
xmlns A URI reference that specifies one or more namespaces for use in this schema. If no prefix is assigned, the schema components of the namespace can be used with unqualified references
any attributes Optional. Specifies any other attributes with non-schema namespace

Ejemplo 1

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="values" type="xs:string" />

</xs:schema>

Ejemplo 2

En este ejemplo, los componentes del esquema (nombre de elemento, tipo) en el espacio de nombres http://www.w3.org/2001/XMLSchema no están calificados y los de https://www.w3schools.com/w3schoolsschema (mystring) están calificados. con el prefijo wsc:

<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:wsc="https://www.w3schools.com/w3shoolsschema">

<element name="fname" type="wsc:mystring"/>

</schema>

❮ Referencia completa del esquema XML