Skip to main content

Home/ PSI_ESEI_08/ Group items tagged xml

Rss Feed Group items tagged

jmbalboa

XML Introduction - What is XML? - 0 views

  • how quickly a large number of software vendors have adopted the standard.
    • David Gelpi Fleta
       
      Cita (brevemente) un caso de uso de XML. Añade tu respuesta en esta nota.
    • Josune Córdoba
       
      Se puede utilizar para migrar datos de una base de datos a otra si las dos funcionan con formato XML.
    • luis gonzalez
       
      Uno de los usos de XML es en el Amarok, para guardar las listas de reproducción, álbumes, archivos de configuración...
    • Eva Goncalves
       
      En Flash permite importar y exportar fácilmente información desde y hacia lenguajes de servidor o bases de datos.
    • Pablo Pinés
       
      EL formato de ficheros de OpenOffice.org (ODF, OpenDocument Format) está basado en XML.
    • B Pg
       
      Para configurar los datos de una aplicación cliente-servidor.
    • Juan Daniel Cid Fernández
       
      Para enviar y recibir información asíncronamente empleando AJAX.
    • David Ruano Ordás
       
      Para la sindicacion de contenidos web. Tanto el estándar RSS como Atom utilizan XML.
    • David Ruano Ordás
       
      Uyyy antes me repetí a si que pongo otra: Las listas de reproduccion del Windows Media Player se almacenan en formato XML.
    • Noemí Pérez
       
      Un ejemplo que casi todos tenemos en nuestro ordenador son las conversaciones de Messenger. Los logs de este programa se almacenan en XML.
    • Diego Trigo Lage
       
      El maravilloso programa de modelado de software "Ingenias" guarda los diagramas en un fichero XML
    • Alexandre Rico
       
      La configuración de "Apache Tomcat" se puede hacer mediante ficheros XML
    • Ana Lameiro
       
      La agenda de eventos de la conocida página de venta de entradas online ticktackticket.com está almacenada en formato XML. Enlace: http://www.ticktackticket.com/ttt/minternet/pkg_tools.pr_agenda?p_operador=TTT
    • Ruben Cougil Grande
       
      n ejemplo notable fue el caso de Sun Microsystems, empresa que optó por escribir la documentación de sus productos en SGML, ahorrando costes considerables. El responsable de aquella decisión fue Jon Bosak, que más tarde fundaría el comité del XML.
    • Silvia González
       
      Un ejemplode XML es el fichero de configuración de eclipse.
    • Juan Manuel Estevez Ferro
       
      Un ejemplo de uso de XML se encuentra en la herramienta Hibernate, la cual se configura mediante este tipo de ficheros.
    • David Outerelo
       
      Otro de los usos de XML es el desarrollo de formularios de aplicaciones como con Oracle Forms 9 y autodocumentación.
    • juan sequeiros
       
      El archivo de configuracion Web de Visual Studio.
    • manuel bouzas
       
      Un ejemplo de uso de XML, sería el que utilizo en mi proyecto, el archivo de configuran web (web.xml)
    • Pablo Montenegro M.
       
      Al utilizar la api de googlemaps, los "marcadores" (los iconos que indican la ubicación de un punto en el mapa) se pueden almacenar en formato xml.
    • Fabio Souto
       
      El servicio de alojamiento de fotos online, Flickr utiliza XML como formato de respuesta al usar su API.
    • Isabel Fernández
       
      Los archivos de configuración .ini se pueden realizar con XML
    • Jose Ángel Goti Alvarez
       
      En mi proyecto utilizo XML para obtener datos a través de la web y tratarlos con Java usando un objeto Document (DOM)
    • J. Emilio González
       
      Eclipse por ejemplo lo utiliza para su configuración
    • Marcos A. González Piñeiro
       
      Se puede usar a modo de base de datos. Yo por ejemplo, tengo que usar XML en mi proyecto, para almacenar información relativa a una colección de juegos (Ubicación, Género, Autor...).
    • Antonio Reguera
       
      EJEMPLO DE XML
    • Juan Perez
       
      El reproductor Winamp guarda (por ejemplo) los skins en xml
    • Rafael Sousa Hervés
       
      WSDL (Web Services Description Language), que es un protocolo/lenguaje de descripción de servicios web utilizado como intercambio de información entre cliente y servidor, utiliza XML para cumplir estos fines.
    • jmbalboa
       
      Desarrollo de Formularios de aplicaciones (Oracle Forms 9) y Autodocumentación.
  • quickly a large number of software vendors have adopted the standard.
  • quickly a large number of software vendors have adopted the standard.
    • Beatriz Buyo
       
      El fabricante FileMaker utiliza el estándar XML en su base de datos FileMaker Pro
    • Iria Rey Varela
       
      Actualización de Software: algunos programas permiten con un botón acceder a las actualizaciones del sitio web. Se accedería a archivos XML los cuales contienen información de los paquetes nuevos y la información de las actualizaciones.
  • ...3 more annotations...
  • quickly a large number of software vendors have adopted the standard.
    • luis pimentel
       
      En definitiva, XML se puede usar para guardar casi cualquier tipo de información que se nos pueda ocurrir
  • quickly a large number of software vendors have adopted the standard.
    • luis pimentel
       
      En definitiva, se puede usar para guardar casi cualquier tipo de información
David Gelpi Fleta

XML DTD - 0 views

  • XML with correct syntax is "Well Formed" XML. XML validated against a DTD is "Valid" XML.
  • Well Formed XML Documents A "Well Formed" XML document has correct XML syntax.
  • A "Well Formed" XML document has correct XML syntax. A "Well Formed" XML document is a document that conforms to the XML syntax rules that were described in the previous chapters: XML documents must have a root element XML elements must have a closing tag XML tags are case sensitive XML elements must be properly nested XML attribute values must always be quoted
  • ...4 more annotations...
  • A "Valid" XML document also conforms to a DTD. A "Valid" XML document is a "Well Formed" XML document, which also conforms to the rules of a Document Type Definition (DTD):
  • Valid XML Documents A "Valid" XML document is a "Well Formed" XML document, which also conforms to the rules of a Document Type Definition (DTD):
  • XML Schema is an XML based alternative to DTD.
  • XML Schema  W3C supports an XML based alternative to DTD called XML Schema:
David Gelpi Fleta

IBM SJ 45-2 | Technical context and cultural consequences of XML - 0 views

  • Technical context and cultural consequences of XML
  • Introduction In 1996, a committee of the World Wide Web Consortium (W3C**) began work on what became the Extensible Markup Language (XML).1 Based on SGML2 (Standard Generalized Markup Language), XML is a general-purpose markup language that creates domain- and industry-specific markup vocabularies which share certain semantic and syntactic characteristics, facilitating interoperability of tools, techniques, and even programs.
  • Technical ecosystem and foundations
  • ...37 more annotations...
  • Expanding needs of business and scientific communities The ever-growing need of industry and government to integrate disparate IT (information technology) systems has resulted in interconnected networks that can no longer be constructed, managed, or enhanced centrally.
  • The overall stability of such systems requires that the individual components be loosely coupled so that they can be managed, modified, and replaced without threatening the operational integrity of the entire system.
  • This requirement has become equally important for both internal operations of large enterprises and business-to-business interactions between enterprises of differing size.
  • System architects realized early that many specialized languages suited to specific domains were required to represent the numerous bodies of data used in those domains.
  • Each language needed well-defined and self-consistent mechanisms for describing data
  • Data elements needed to be easy to transport, transform, search, combine, extract, filter, and view in different forms.
  • The definitions of the languages themselves needed to be easily shared and maintained by a large body of users.
  • Role of open source/open standards To address these common requirements, a committee (more commonly referred to as a working group) of the World Wide Web Consortium was formed in 1996.
  • XML is rarely used alone. A body of standards emerged around XML to support its use.
  • Companies participated in and adopted the XML open standards and worked on open-source technology for many reasons:
  • XML and its related standards enabled data interoperability, content manipulation, content sharing and reuse, document assembly, document security and access control, document filtering, and document formatting across all disciplines and for all types of devices and applications.
  • XML could not have happened without the World Wide Web. The Web has become a universal mechanism to deliver information to consumers and increasingly, to applications as well.
  • This new generation of XML-centric interactions led to the birth of the Web Services platform
  • It enabled information reuse by integrating text and data from different sources and by searching and linking across these sources, thereby breaking down traditional silos, which were barriers to information sharing
  • XML also could not have had such impact without a diverse collection of tremendous advances in computer science made over approximately a 50-year period.
  • The value of information hiding, generalization, encapsulation, and reuse in programming languages and methodologies
  • XML provides a rich data representation, with significant opportunities for high-value semantic tagging, which can provide superior support for information retrieval and related activities.
  • Lisp language introduced the concept of an attribute list
  • A standardized nonprocedural, high-performance approach to storage and retrieval of structured information—Relational databases7 possessing a powerful data model, underlying concurrency control, integrity and performance benefits, and a consistent Structured Query Language (SQL)8 interface were a great advance of the 1970s and 1980s.
  • The utility of simple key-value pair tagging and its application to providing metadata through annotations—With GML (Generalized Markup Language)13 in the late 1970s and then SGML, which was standardized in 1986,
  • A consensus on a layered-protocol stack for network communication, which standardizes not only layered protocols but also the interfaces to those layers
  • XML is clearly an advanced presentation layer protocol,
  • The necessity and practicality of sophisticated user interfaces programmed with very high-level techniques—Metaphor-based interfaces (i.e., those in which the target audience interacts with aesthetic concepts familiar to their area of expertise)
  • Performance and bandwidth—Relative to optimized binary formats, XML is expensive to process (parse) and transmit and would not have been practical without the many decades during which processor performance and network bandwidth have been accelerating according to Moore's law.
  • Connecting business to business with Web Services
    • David Gelpi Fleta
       
      Analiza el problema de integración de sistemas propuesto en el caso de la agencia de viajes (y/o para tu PFC). Identifica en este artículo "Conecting business to business with Web Services" las tecnologías que emplearías para solventar los distintos problemas comentados en la sesión de laboratorio.
  • The ubiquity of XML and its ability to be used as an underlying specification language enabled a new generation of application-to-application communication, supporting flexible integration of heterogeneous systems in a variety of domains.
  • XML is more accurately a technology for labeling information with descriptive names that can be consistently used and accessed in a multitude of applications
  • The Web Services technology suite is also an important enabler of the SOAs that are now being embraced by the entire IT industry. SOA is an abstract architectural concept founded on the idea of building software systems with uniformly described, discoverable services that interact in a loosely coupled way and can be composed.
  • The success of Web Services in this arena can be attributed to the nonproprietary nature of the underlying technologies as well as the loose coupling supported by the technology.
  • the participants in Web Services communications are loosely coupled and need only agree on the format of messages and their semantics. I
  • Web Services had their beginnings in mid to late 2000 with the introduction of the Simple Object Access Protocol (SOAP),45 Web Service Description Language (WSDL),46,47 and Universal Description, Discovery and Integration (UDDI).48
  • XML provides the interoperable format to describe message content between Web Services, and is the basic language in which Web Services specifications are defined.49
  • The difference between Web Services and traditional approaches is primarily in the use of self-describing, platform-independent messages to enable loose coupling of aspects of the architecture, making the approach more dynamic and adaptable to change.
  • HTTP provides a commonly used interoperable protocol for SOAP
  • SOAP provides only the protocol for exchanging self-describing messages between services, but by itself does not provide any information about the services. WSDL is a common grammar for providing design-time description of services and messages. It defines a template to encode the information required by service clients to access and interact with the service. It describes what a Web service does, where it resides, and how it should be invoked.
  • UDDI provides a mechanism for clients to dynamically find other Web services
  • It provides a uniform mechanism for exchanging structural and typed information encoded as XML.
David Gelpi Fleta

Introduction to XML Schemas - 0 views

  • XML Schema is an XML-based alternative to DTD. An XML schema describes the structure of an XML document. The XML Schema language is also referred to as XML Schema Definition (XSD).
  • An XML Schema: defines elements that can appear in a document defines attributes that can appear in a document defines which elements are child elements defines the order of child elements defines the number of child elements defines whether an element is empty or can include text defines data types for elements and attributes defines default and fixed values for elements and attributes
  • XML Schemas are extensible to future additions XML Schemas are richer and more powerful than DTDs XML Schemas are written in XML XML Schemas support data types XML Schemas support namespaces
  • ...1 more annotation...
  • XML Schema became a W3C Recommendation 02. May 2001.
David Gelpi Fleta

XML Usage - 1 views

  • With XML, data can be stored in separate XML files. This way you can concentrate on using HTML for layout and display,
  • XML Simplifies Data Sharing
  • databases contain data in incompatible formats.
  • ...10 more annotations...
  • XML data is stored in plain text format. This provides a software- and hardware-independent way of storing data.
  • XML Simplifies Data Transport
  • With XML, data can easily be exchanged between incompatible systems.
  • Since XML data is stored in plain text format, XML provides a software- and hardware-independent way of sharing data.
  • XML Simplifies Platform Changes
  • Large amounts of data must be converted and incompatible data is often lost.
  • XML Makes Your Data More Available
  • With XML, your data can be available to all kinds of "reading machines"
  • XML is Used to Create New Internet Languages
  • XHTML the latest version of HTML  WSDL for describing available web services WAP and WML as markup languages for handheld devices RSS languages for news feeds RDF and OWL for describing resources and ontology SMIL for describing multimedia for the web 
David Gelpi Fleta

XML Elements - 0 views

  • What is an XML Element? An XML element is everything from (including) the element's start tag to (including) the element's end tag. An element can contain other elements, simple text or a mixture of both. Elements can also have attributes.
  • XML documents can be extended to carry more information.
  • XML Naming Rules
  • ...11 more annotations...
  • no words are reserved.
  • Best Naming Practices
  • Make names descriptive
  • Names should be short and simple
  • Avoid "-"
  • Avoid "."
  • Avoid ":"
  • use the naming rules of your database for the elements in the XML documents.
  • Non-English letters
  • XML elements must follow these naming rules: Names can contain letters, numbers, and other characters Names must not start with a number or punctuation character Names must not start with the letters xml (or XML, or Xml, etc) Names cannot contain spaces
  • make names descriptive.
David Gelpi Fleta

XML Syntax - 0 views

  • All XML Elements Must Have a Closing Tag
  • XML Tags are Case Sensitive
  • XML Elements Must be Properly Nested
  • ...10 more annotations...
  • <note date="12/11/2007">
  • Entity References
  • XML Documents Must Have a Root Element
  • If you place a character like "<" inside an XML element, it will generate an error because the parser interprets it as the start of a new element.
  • (child elements
  • < < less than > > greater than & & ampersand  ' ' apostrophe " " quotation mark
  • XML Attribute Values Must be Quoted
  • With XML, White Space is Preserved
  • Comments in XML
  • <!-- This is a comment -->
David Gelpi Fleta

XML Namespaces - 0 views

  • XML Namespaces provide a method to avoid element name conflicts. Name Conflicts Since element names in XML are not predefined, a name conflict will occur when two different documents use the same element names.
  • Name Conflicts In XML, element names are defined by the developer. This often results in a conflict when trying to mix XML documents from different XML applications.
  • <h:table>
  • ...13 more annotations...
  • <f:table>
  • XML Namespaces - The xmlns Attribute When using prefixes in XML, a so-called namespace for the prefix must be defined. The namespace is defined by the xmlns attribute in the start tag of an element.
  • <h:table xmlns:h="http://www.w3.org/TR/html4/">
  • xmlns:prefix="URI".
  • <f:table xmlns:f="http://www.w3schools.com/furniture">
  • xmlns:namespace-prefix="namespaceURI"
  • Namespaces can be declared in the elements where they are used or in the XML root element:
  • Note that the address used to identify the namespace is not used by the parser to look up information. The only purpose is to give the namespace a unique name.
  • The namespace URI is not used by the parser to look up information. The purpose is to give the namespace a unique name
  • Uniform Resource Identifier (URI) A Uniform Resource Identifier (URI) is a string of characters which identifies an Internet Resource. The most common URI is the Uniform Resource Locator (URL) which identifies an Internet domain address.
  • not so common type of URI is the Universal Resource Name (URN)
  • Default Namespaces Defining a default namespace for an element saves us from using prefixes in all the child elements.
  • <table xmlns="http://www.w3.org/TR/html4/">
David Gelpi Fleta

Introduction to XSLT - 0 views

  • How Does it Work? In the transformation process, XSLT uses XPath to define parts of the source document that should match one or more predefined templates. When a match is found, XSLT will transform the matching part of the source document into the result document.
  • XSLT Uses XPath XSLT uses XPath to find information in an XML document. XPath is used to navigate through elements and attributes in XML documents.
  • A common way to describe the transformation process is to say that XSLT transforms an XML source-tree into an XML result-tree.
  • ...2 more annotations...
  • XSLT is used to transform an XML document into another XML document, or another type of document that is recognized by a browser, like HTML and XHTML. Normally XSLT does this by transforming each XML element into an (X)HTML element.
  • What is XSLT? XSLT stands for XSL Transformations XSLT is the most important part of XSL XSLT transforms an XML document into another XML document XSLT uses XPath to navigate in XML documents XSLT is a W3C Recommendation
David Gelpi Fleta

Why Use XML Schemas? - 0 views

  • XML Schemas Support Data Types
  • It is easier to describe allowable 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
  • ...4 more annotations...
  • You don't have to learn a new 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 are Extensible
  • Reuse your Schema in other Schemas Create your own data types derived from the standard types Reference multiple schemas in the same document
  • Well-Formed is not Enough
David Gelpi Fleta

XML Data Islands - 0 views

  • An XML data island is XML data embedded into an HTML page.
  • <html> <body> <xml id="note" src="http://www.w3schools.com/note.xml"></xml>
David Gelpi Fleta

XML Tree - 0 views

  • <?xml version="1.0" encoding="ISO-8859-1"?>
  • XML Documents Form a Tree Structure XML documents must contain a root element. This element is "the parent" of all other elements. The elements in an XML document form a document tree. The tree starts at the root and branches to the lowest level of the tree.
David Gelpi Fleta

XML Schema Restrictions/Facets - 0 views

  • Restrictions are used to define acceptable values for XML elements or attributes. Restrictions on XML elements are called facets.
  • Restrictions on Values
  • <xs:restriction base="xs:integer"> <xs:minInclusive value="0"/> <xs:maxInclusive value="120"/> </xs:restriction>
  • ...15 more annotations...
  • Restrictions on a Set of Values To limit the content of an XML element to a set of acceptable values, we would use the enumeration constraint.
  • <xs:restriction base="xs:string"> <xs:enumeration value="Audi"/> <xs:enumeration value="Golf"/> <xs:enumeration value="BMW"/> </xs:restriction>
  • type="carType"/>
  • <xs:simpleType name="carType">
  • the type "carType" can be used by other elements
  • series of numbers or letters that can be used, we would use the pattern constraint.
  • <xs:restriction base="xs:string"> <xs:pattern value="[a-z]"/>
  • <xs:pattern value="male|female"/>
  • The whiteSpace constraint is set to "preserve", which means that the XML processor WILL NOT remove any white space characters:
  • <xs:whiteSpace value="preserve"/>
  • The whiteSpace constraint is set to "replace", which means that the XML processor WILL REPLACE all white space characters (line feeds, tabs, spaces, and carriage returns) with spaces:
  • <xs:whiteSpace value="replace"/>
  • <xs:length value="8"/>
  • <xs:minLength value="5"/> <xs:maxLength value="8"/>
  • Constraint Description enumeration Defines a list of acceptable values fractionDigits Specifies the maximum number of decimal places allowed. Must be equal to or greater than zero length Specifies the exact number of characters or list items allowed. Must be equal to or greater than zero maxExclusive Specifies the upper bounds for numeric values (the value must be less than this value) maxInclusive Specifies the upper bounds for numeric values (the value must be less than or equal to this value) maxLength Specifies the maximum number of characters or list items allowed. Must be equal to or greater than zero minExclusive Specifies the lower bounds for numeric values (the value must be greater than this value) minInclusive Specifies the lower bounds for numeric values (the value must be greater than or equal to this value) minLength Specifies the minimum number of characters or list items allowed. Must be equal to or greater than zero pattern Defines the exact sequence of characters that are acceptable totalDigits Specifies the exact number of digits allowed. Must be greater than zero whiteSpace Specifies how white space (line feeds, tabs, spaces, and carriage returns) is handled
David Gelpi Fleta

XML CDATA - 0 views

  • PCDATA - Parsed Character Data XML parsers normally parse all the text in an XML document.
  • CDATA - (Unparsed) Character Data
  • Escape Characters Illegal XML characters have to be replaced by entity references. If you place a character like "<" inside an XML element, it will generate an error because the parser interprets it as the start of a new element.
  • ...5 more annotations...
  • < < less than > > greater than & & ampersand  ' ' apostrophe " " quotation mark
  • Apostrophes, quotation marks and greater than signs are legal, but it is a good habit to replace them.
  • CDATA Everything inside a CDATA section is ignored by the parser.
  • Nested CDATA sections are not allowed.
  • A CDATA section starts with "<![CDATA[" and ends with "]]>":
David Gelpi Fleta

XML Attributes - 0 views

  • XML elements can have attributes in the start tag, just like HTML.
  • Attributes often provide information that is not a part of the data
  • <gangster name="George 'Shotgun' Ziegler">
  • ...7 more annotations...
  • either single or double quotes can be used
  • <gangster name='George "Shotgun" Ziegler'>
  • XML Attributes Must be Quoted
  • Use of Elements vs. Attributes Data can be stored in child elements or in attributes.
  • Avoid XML Attributes? Some of the problems with using attributes are: attributes cannot contain multiple values (elements can) attributes cannot contain tree structures (elements can) attributes are not easily expandable (for future changes) Attributes are difficult to read and maintain. Use elements for data. Use attributes for information that is not relevant to the data.
  • Should you avoid using attributes? Some of the problems with using attributes are: attributes cannot contain multiple values (child elements can) attributes are not easily expandable (for future changes) attributes cannot describe structures (child elements can) attributes are more difficult to manipulate by program code attribute values are not easy to test against a Document Type Definition (DTD) - which is used to define the legal elements of an XML document
  • Try to use elements to describe data. Use attributes only to provide information that is not relevant to the data.
David Gelpi Fleta

XSLT <xsl:template> Element - 0 views

  • The content inside the &lt;xsl:template&gt; element defines some HTML to write to the output.
  • &lt;xsl:template match="/"&gt; &lt;html&gt;
  • &lt;xsl:stylesheet&gt;, defines that this document is an XSLT style sheet document
  • ...3 more annotations...
  • &lt;xsl:template&gt; element is used to build templates. The match attribute is used to associate a template with an XML element. The match attribute can also be used to define a template for the entire XML document. The value of the match attribute is an XPath expression (i.e. match="/" defines the whole document).
  • Since an XSL style sheet is an XML document itself, it always begins with the XML declaration: &lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  • An XSL style sheet consists of one or more set of rules that are called templates. Each template contains rules to apply when a specified node is matched.
David Gelpi Fleta

XML Schema Part 0: Primer Second Edition - 1 views

  • The schemaLocation attribute value consists of one or more pairs of URI references, separated by white space. The first member of each pair is a namespace name, and the second member of the pair is a hint describing where to find an appropriate schema document for that namespace
  • there is a noNamespaceSchemaLocation attribute which is used to provide hints for the locations of schema documents that do not have target namespaces.
  • the include element has a required schemaLocation attribute, and it contains a URI reference which must identify a schema document.
  • ...63 more annotations...
  • the import element has optional namespace and schemaLocation attributes. If present, the schemaLocation attribute is understood in a way which parallels the interpretation of xsi:schemaLocation
  • The default value for both the minOccurs and the maxOccurs attributes is 1.
  • Be sure that if you specify a value for only the minOccurs attribute, it is less than or equal to the default value of maxOccurs,
  • Attributes may appear once or not at all, but no other number of times
  • The existence of a substitution group does not require any of the elements in that class to be used
  • Several facets can be applied to list types: length, minLength, maxLength, pattern, and enumeration
  • &lt;xsd:simpleType name="USStateList"&gt; &lt;xsd:list itemType="USState"/&gt; &lt;/xsd:simpleType&gt; &lt;xsd:simpleType name="SixUSStates"&gt; &lt;xsd:restriction base="USStateList"&gt; &lt;xsd:length value="6"/&gt; &lt;/xsd:restriction&gt; &lt;/xsd:simpleType&gt;
    • David Gelpi Fleta
       
      USState es una enumeración, definida en este documento en la sección 2.3. ASí, precisamos siempre de un tipo de dato definido previamente para construir una lista.
  • Note that it is possible to derive a list type from the atomic type string. However, a string may contain white space, and white space delimits the items in a list type, so you should be careful using list types whose base type is string.
  • The include mechanism enables you to use externally created schema components "as-is", that is, without any modification.
  • &lt;complexType name="Address"&gt;
  • base="ipo:Address"
    • David Gelpi Fleta
       
      El tipo base y el extendido tienen igual identificador.
      Fuera del elemento "redefine" cualquier intento de nombrar a dos tipos de datos usando el mismo identificador producirá un error.
      Notar cómo el elemento "redefine" debe ser el primer hijo del elemento "schema" y encerrar al tipo de dato que redefinimos.
  • &lt;/redefine&gt;
  • The redefine element acts very much like the include element as it includes all the declarations and definitions from the address.xsd file
  • Outside of the redefine element, any such attempt to define a complex type with the same name (and in the same namespace) as the base from which it is being derived would cause an error.
  • Now that Address has been redefined, the extension applies to all schema components that make use of Address
    • David Gelpi Fleta
       
      Cuando un elemento es redefinido, la extensión se aplica a todos los tipos de datos que hacen uso de él como, p.e., sus tipos derivados (ver sección 4.2 y 4.3, así como los ejemplos en Creaweb).
  • Substitution GroupsXML Schema provides a mechanism, called substitution groups, that allows elements to be substituted for other elements. More specifically, elements can be assigned to a special group of elements that are said to be substitutable for a particular named element called the head element. (Note that the head element as well as the substitutable elementsmust be declared as global elements
  • Elements in a substitution group must have the same type as the head element, or they can have a type that has been derived from the head element's type
  • &lt;element name="shipComment" type="string" substitutionGroup="ipo:comment"/&gt;
  • substitutionGroup="ipo:comment"/&gt;
  • &lt;ipo:shipComment&gt;
    • David Gelpi Fleta
       
      - no todos los elementos del grupo de sustitución han de aparecer en la instancia XML. - los indicadores minOccurs y maxOccurs del elemento cabecera deben ser adecuados al número de elementos de sustitución que permitamos aparecer (pueden aparecer tantos como el valor maxOccurs del elemento cabecera). - si maxOccurs así lo permite, puede aparecer el elemento cabecera y sus sustitutos.
  • &lt;ipo:customerComment&gt;
  • global declarations cannot contain the attributes > minOccurs > , > maxOccurs > , or > use > . >
  • Abstract Elements and TypesXML Schema provides a mechanism to force substitution for a particular element or type. When an element or type is declared to be "abstract", it cannot be used in an instance document. When an element is declared to be abstract, a member of that element's substitution group must appear in the instance document. When an element's corresponding type definition is declared as abstract, all instances of that element must use xsi:type to indicate a derived type that is not abstract.
  • Declaring an element as abstract requires the use of a substitution group. Declaring a type as abstract simply requires the use of a type derived from it (and identified by the xsi:type attribute) in the instance document
    • David Gelpi Fleta
       
      Ver los ejemplos "abstract_tipo" y "abstract_elemento" en Creaweb.
  • the redefine mechanism we describe here enables you to redefine simple and complex types, groups, and attribute groups that are obtained from external schema files. Like the include mechanism, redefine requires the external components to be in the same target namespace as the redefining schema,
  • abstract="true"
  • abstract="true"
  • extension base
  • extension
  • extension
  • xsi:type="Car"
  • Controlling the Creation &amp; Use of Derived Types
  • schema authors will sometimes want to control derivations of particular types, and the use of derived types in instances.
  • to specify that for a particular complex type, new types may not be derived from it, either (a) by restriction, (b) by extension, or (c) at all.
  • substitutionGroup=
  • The restriction value of the final attribute prevents derivations by restriction. Preventing derivations at all, or by extension, are indicated by the values #all and extension respectively
  • an optional finalDefault attribute on the schema element whose value can be one of the values allowed for the final attribute. The effect of specifying the finalDefault attribute is equivalent to specifying a final attribute on every type definition and element declaration in the schema.
  • When a simple type is defined, the fixed attribute may be applied to any of its facets to prevent a derivation of that type from modifying the value of the fixed facets.
  • fixed="true"
  • a mechanism that controls which derivations and substitution groups may be used in instance documents
  • eplacement by derived types can be controlled using the block attribute in a type definition
    • David Gelpi Fleta
       
      Previene la sustitución de un elemento por su tipo derivado, bien sea por extensión o restricción. No confundir este mecanismo con "final", que sólo previene la definición de tipos derivados (por extensión o restricción) de un tipo determinado.
  • final="restriction"
  • final="restriction"
  • Preventing replacement by derivations at all, or by derivations-by-extension, are indicated by the values #all and extension respectively. As with final, there exists an optional blockDefault attribute on the schema element whose value can be one of the values allowed for the block attribute.
  • block="restriction"
  • final="restriction"
  • mechanism that enables schema components from different target namespaces to be used together, and hence enables the schema validation of instance content defined across multiple namespaces.
  • Importing Types
  • only global schema components can be imported:
  • Only named complex types can be imported; local, anonymously defined types cannot.
  • each namespace must be identified with a separate import element.
  • The import elements themselves must appear as the first children of the schema element
  • each namespace must be associated with a prefix, using a standard namespace declaration
  • import elements optionally contain a schemaLocation attribute to help locate resources associated with the namespaces.
  • ref="xipo:
  • Deriving Types by Extension
  • we indicate that the content models of the new types are complex, i.e. contain elements, by using the complexContent element, and we indicate that we are extending the base type Address by the value of the base attribute on the extension element.
  • xsi:type="ipo:UKAddress"&gt;
  • xsi:type="ipo:USAddress"&gt;
  • Deriving Complex Types by Restriction
  • the values represented by the new type are a subset of the values represented by the base type (as is the case with restriction of simple types).
  • &lt;complexContent&gt; &lt;restriction base=
  • Table 3 shows several examples of how element and attribute declarations within type definitions may be restricted
David Gelpi Fleta

XML schema Element - 0 views

  • The &lt;schema&gt; element is the root element of every XML Schema:
  • The &lt;schema&gt; element may contain some attributes. A schema declaration
  • &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3schools.com" xmlns="http://www.w3schools.com" elementFormDefault="qualified"&gt;
  • ...7 more annotations...
  • targetNamespace="http://www.w3schools.com" indicates that the elements defined by this schema (note, to, from, heading, body.) come from the "http://www.w3schools.com" namespace.
  • xmlns:xs="http://www.w3.org/2001/XMLSchema" indicates that the elements and data types used in the schema come from the "http://www.w3.org/2001/XMLSchema" namespace.
  • prefixed with xs:
  • xmlns="http://www.w3schools.com" indicates that the default namespace is "http://www.w3schools.com".
  • Referencing a Schema in an XML Document
  • xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3schools.com note.xsd"
  • This attribute has two values. The first value is the namespace to use. The second value is the location of the XML schema to use for that namespace
David Gelpi Fleta

Ejemplos de uso de XML - 89 views

No olvides añadir a la nota de la página "XML introduction", apartado "XML is everywhere", un ejemplo de uso de XML. Escribe tu respuesta en la nota, no en el foro.

actividades

started by David Gelpi Fleta on 21 Oct 08 no follow-up yet
David Gelpi Fleta

XML Schema How To - 0 views

  • This XML document has a reference to an XML Schema:
  • xsi:schemaLocation="http://www.w3schools.com note.xsd"
1 - 20 of 40 Next ›
Showing 20 items per page