Skip to main content

Home/ Groups/ PSI_ESEI
David Gelpi Fleta

XML Schema Simple Elements - 0 views

  • What is a Simple Element? A simple element is an XML element that can contain only text. It cannot contain any other elements or attributes. However, the "only text" restriction is quite misleading. The text can be of many different types. It can be one of the types included in the XML Schema definition (boolean, string, date, etc.), or it can be a custom type that you can define yourself.
  • xs:string xs:decimal xs:integer xs:boolean xs:date xs:time
    • David Gelpi Fleta
       
      Más tipos de datos predefinidos en: http://www.w3.org/TR/xmlschema-0/#simpleTypesTable
  • you can require the data to match a specific pattern.
  • ...7 more annotations...
  • The syntax for defining a simple element is: <xs:element name="xxx" type="yyy"/>
  • built-in data types
  • You can also add restrictions (facets) to a data type
  • A default value is automatically assigned to the element when no other value is specified.
  • default="red"/
  • A fixed value is also automatically assigned to the element, and you cannot specify another value.
  • fixed="red"/
David Gelpi Fleta

Exercise 1: note - 29 views

In the first of the bookmarks in the group PSI_ESEI ("Introduction to XML") answer to the question of the note, located under the title "XML in Future Web Development". Avoid repeat a use case cite...

ejercicios

started by David Gelpi Fleta on 18 Oct 07 no follow-up yet
David Gelpi Fleta

Exercise 0 - 4 views

Hi people :) The first exercise of this course is about introduce yourselves. Write something about you (name, laboratory group, a greeting, whatever you want...) Don´t forget to choose an avatar.

ejercicios

started by David Gelpi Fleta on 18 Oct 07 no follow-up yet
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:minLength value="5"/> <xs:maxLength value="8"/>
  • <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:restriction base="xs:string"> <xs:pattern value="[a-z]"/>
  • 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 Introduction - What is XML? - 0 views

  • What is XML? XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to describe data XML tags are not predefined. You must define your own tags XML uses a Document Type Definition (DTD) or an XML Schema to describe the data XML with a DTD or XML Schema is designed to be self-descriptive XML is a W3C Recommendation
  • The Extensible Markup Language (XML) became a W3C Recommendation 10. February 1998.
  • XML is not a replacement for HTML.
  • ...8 more annotations...
  • XML was designed to describe data and to focus on what data is. HTML was designed to display data and to focus on how data looks.
  • XML was created to structure, store and to send information.
  • It is just pure information wrapped in XML tags
  • XML tags are not predefined. You must "invent" your own tags. The tags used to mark up HTML documents and the structure of HTML documents are predefined.
  • XML allows the author to define his own tags and his own document structure.
  • XML will be used to describe the data, while HTML will be used to format and display the same data
  • XML is a cross-platform, software and hardware independent tool for transmitting information.
    • davidg
       
      Forma parte de la plataforma básica de tecnologías con las que se construyen los Servicios Web.
    • David Gelpi Fleta
       
      Cita un caso de uso de XML.
    • mfestevez
       
      Sirve para guardar datos estructurados, por ejemplo para guardar las conversacion del messenger
    • lplamazares
       
      XML podemos utilizarlo para realizar migraciones de datos entre distintas bases de datos.
    • pbpascual
       
      Es la base del lenguaje utilizado por la herramienta Flex 2 de Adobe, utilizada para crear RIA.
    • patriab
       
      Se puede utilizar para guardar historiales de búsqueda o navegación.
    • leepard
       
      Se puede utilizar para intercambio de informacion contable.
    • magonzalez2
       
      XML se puede utilizar para crear podcast, ya que es un archivo XML que se distribuye a través de un feeder.
    • lorena84
       
      Se utilizan también para el tratamiento de imágenes,para que sea más fácil implementar figuras guardando sus componentes con XML y para que su posterior tratamiento sea más cómodo.
    • samacia
       
      XML es un lenguaje de marcado muy utilizado en ficheros de configuración (por ejemplo, en WEBORB, tecnología para usar los FLEX DATA SERVICES)
    • rcarjolekas
       
      Con XML puedes comunicar aplicaciones de distintas plataformas sin importar el origen de los datos. Por ejemplo, puedo tener una aplicación bajo Linux y Base de datos Oracle, y otra aplicación bajo windows y base de datos en SQL Server.
    • vrdominguez
       
      Obtener datos desde una base de datos MySQL, mediante un script PHP que formatee los datos en XML, para asi poder trabajar con ellos mediante un objeto XML en Flash con ActionScript
    • anonymous
       
      Para sindicación web o de noticias, mediante lenguajes como RSS, el cual forma parte de la familia de lenguajes XML.
    • irconde
       
      Actualmente XML está siendo usado para muchos fines diferentes. Uno de los que me parece más interesante es que se hatomado como base para el XLL: el eXtensible Link Language que permite definir distintos tipos de enlaces (links) entre documentos, ya sean externos o internos.
    • Silvia Rivas Borrajo
       
      XML permite la creación de archivos de configuración de aplicaciones (web en flash, programas open-source,...)
    • evcervino
       
      También puede ser usado para embeber otros lenguajes. Puede ser usada también en imágenes de tipo vectorial, así como en vídeos o música para dar mayor información.
    • MaryGR
       
      XML puede ser usado también para el almacenamiento de gráficos vectoriales ,mediante una utlidad llamada VML (Vector Markup Lenguaje) la cual nos facilita esta tarea.
    • mfalvarez
       
      SMIL Synchronized Multimedia Integration Language, es un lenguaje para sincronizar presentaciones multimedia en la web. Se basa en XML y permite definir la posición y el tiempo de activación de diversos objetos.
    • jagdominguez
       
      Se puede utilizar en Google Maps. Se puede usar un archivo Xml para guardar la informacion de varios marcadores
    • jlvazquez2
       
      Se usa para guardar la configuracion de las aplicaciones. Y recientemente es usado para los documentos de open office. Para mas informacion http://es.wikipedia.org/wiki/OpenDocument.
    • lnanta
       
      XML tiene un lenguaje de consulta XQL, el cual facilita la extracción de datos. Se pueden realizar consultas flexibles para extraer datos de documentos XML en la web.
David Gelpi Fleta

XML Schema Complex Types - Mixed Content - 0 views

  • A mixed complex type element can contain attributes, elements, and text.
  • mixed="true">
David Gelpi Fleta

XML Schema Complex Type - Text Elements - 0 views

  • This type contains only simple content (text and attributes),
  • <xs:element name="shoesize"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:integer"> <xs:attribute name="country" type="xs:string" />
David Gelpi Fleta

XML Schema Complex Elements - 0 views

  • A complex element is an XML element that contains other elements and/or attributes. There are four kinds of complex elements: empty elements elements that contain only other elements elements that contain only text elements that contain both other elements and text Note: Each of these elements may contain attributes as well!
  • <xs:element name="employee"> <xs:complexType> <xs:sequence>
  • type="personinfo"/> <xs:complexType name="personinfo">
  • ...1 more annotation...
  • <xs:complexType name="fullpersoninfo"> <xs:complexContent> <xs:extension base="personinfo">
David Gelpi Fleta

XML Schema Complex Type - Empty Elements - 0 views

  • <xs:element name="product"> <xs:complexType> <xs:attribute name="prodid" type="xs:positiveInteger"/>
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

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 CDATA - 0 views

  • 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.
  • < < 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.
  • ...2 more annotations...
  • CDATA Everything inside a CDATA section is ignored by the parser.
  • A CDATA section starts with "<![CDATA[" and ends with "]]>":
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.
  • <h:table>
  • <f:table>
  • ...8 more annotations...
  • <h:table xmlns:h="http://www.w3.org/TR/html4/">
  • <f:table xmlns:f="http://www.w3schools.com/furniture">
  • xmlns:namespace-prefix="namespaceURI"
  • 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.
  • 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

Clase martes 9/10/07 - 15 views

Si eres alumno del grupo 2 (martes) y si es posible, échale un ojo a los bookmarks contenidos hasta el titulado "data islands" antes de la proxima sesión de laboratorio.

ejercicios

started by David Gelpi Fleta on 03 Oct 07 no follow-up yet
David Gelpi Fleta

Sobre la categoría "dudas teoría" - 3 views

Escribe en esta categoría aquellas dudas que surjan en el desarrollo de las clases de laboratorio. La persona que conozca (o crea conocer) la respuesta, que pase a la acción ;)

dudas teoría

started by David Gelpi Fleta on 03 Oct 07 no follow-up yet
David Gelpi Fleta

Sobre la categoría "ejercicios" - 11 views

En esta categoría, encontraremos los enunciados de los (pequeños) ejercicios a completar a lo largo del curso.

ejercicios

started by David Gelpi Fleta on 03 Oct 07 no follow-up yet
David Gelpi Fleta

Ejercicio 1 - 14 views

En el primero de los bookmarks ("Introduction to XML") responde a la pregunta de la nota, situada en el apartado "XML in Future Web Development". No repitas un caso de uso que ya haya sido citado;...

ejercicios

started by David Gelpi Fleta on 03 Oct 07 no follow-up yet
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 DTD - 0 views

  • 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
  • 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):
  • XML Schema is an XML based alternative to DTD.
David Gelpi Fleta

XML Attributes - 0 views

  • Attributes often provide information that is not a part of the data
  • <gangster name='George "Shotgun" Ziegler'>
  • <gangster name="George 'Shotgun' Ziegler">
  • ...3 more annotations...
  • Use of Elements vs. Attributes Data can be stored in child elements or in attributes.
  • 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.
‹ Previous 21 - 40 of 43 Next ›
Showing 20 items per page