Skip to main content

Home/ Groups/ PSI_ESEI_08
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
  • <xsd:simpleType name="USStateList"> <xsd:list itemType="USState"/> </xsd:simpleType> <xsd:simpleType name="SixUSStates"> <xsd:restriction base="USStateList"> <xsd:length value="6"/> </xsd:restriction> </xsd:simpleType>
    • 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.
  • <complexType name="Address">
  • 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.
  • </redefine>
  • 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
  • <element name="shipComment" type="string" substitutionGroup="ipo:comment"/>
  • substitutionGroup="ipo:comment"/>
  • <ipo:shipComment>
    • 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.
  • <ipo:customerComment>
  • 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 & 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">
  • xsi:type="ipo:USAddress">
  • 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).
  • <complexContent> <restriction base=
  • Table 3 shows several examples of how element and attribute declarations within type definitions may be restricted
David Gelpi Fleta

Ampliación del plazo de entrega de la práctica. - 76 views

La entrega de la segunda parte de la práctica consta de los siguientes documentos (impresos y en CD): - Hoja de estilos XSLT. - Una o varias instancias XML ejemplo con el juego de documentos...

practica

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

Becoming an Architect in a System Integrator - 0 views

  • Enterprise Architect/Chief Architect The enterprise architect is responsible for implementing the CIO's vision and strategy for IT. It includes defining strategic programs (usually multiyear, multimillion dollars for large organizations), selecting the appropriate technology platforms, and providing guidance for implementations. The enterprise architect aids the CIO in making sure that the IT investments are aligned to the business strategy, and provide competitive edge for the organization
  • Solution Architect The solution architect is responsible for implementing a strategic IT program. This includes defining the architectural solution for the program (usually spanning multiple technologies),
  • mediate between business and technology teams and various other groups.
  • ...4 more annotations...
  • Technical Architect The technical architect is usually a technology specialist in a particular technology.
  • the technology architect is expected to know the various vendor tools in the technology area, the latest trends in the market, and various architectural alternatives for implementing the solution
  • "Chief Architect."
  • The senior position has the title "Lead Architect."
David Gelpi Fleta

XSL Transformations (XSLT) - 0 views

shared by David Gelpi Fleta on 12 Jan 09 - Cached
  • In the absence of a select attribute, the xsl:apply-templates instruction processes all of the children of the current node, including text nodes
  • <xsl:template   match = pattern   name = qname   priority = number   mode = qname>
  • <xsl:call-template   name = qname>
  • ...2 more annotations...
  • Templates can be invoked by name.
  • An xsl:call-template element invokes a template by name; it has a required name attribute that identifies the template to be invoked
David Gelpi Fleta

XPath Axes - 0 views

David Gelpi Fleta

XPath Operators - 0 views

David Gelpi Fleta

XSLT <xsl:sort> Element - 0 views

  • &lt;xsl:for-each select="catalog/cd"&gt; &lt;xsl:sort select="artist"/&gt;
  • To sort the output, simply add an &lt;xsl:sort&gt; element inside the &lt;xsl:for-each&gt; element in the XSL file:
David Gelpi Fleta

XSLT <xsl:value-of> Element - 0 views

  • he value of the select attribute is an XPath expression. An XPath expression works like navigating a file system; where a forward slash (/) selects subdirectories.
  • &lt;xsl:value-of select="catalog/cd/title"/&gt;
  • The &lt;xsl:value-of&gt; element is used to extract the value of a selected node.
David Gelpi Fleta

XSLT Transformation - 0 views

  • xmlns:xsl="http://www.w3.org/1999/XSL/Transform" points to the official W3C XSLT namespace.
  • Link the XSL Style Sheet to the XML Document Add the XSL style sheet reference to your XML document
  • &lt;xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
  • ...3 more annotations...
  • &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
  • orrect Style Sheet Declaration The root element that declares the document to be an XSL style sheet is &lt;xsl:stylesheet&gt; or &lt;xsl:transform&gt;.
  • Example study: How to transform XML into XHTML using XSLT.
David Gelpi Fleta

XSLT <xsl:apply-templates> Element - 0 views

  • If we add a select attribute to the &lt;xsl:apply-templates&gt; element it will process only the child element that matches the value of the attribute
  • The &lt;xsl:apply-templates&gt; element applies a template to the current element or to the current element's child nodes.
David Gelpi Fleta

XSLT <xsl:if> Element - 0 views

  • &lt;xsl:for-each select="catalog/cd"&gt; &lt;xsl:if test="price &amp;gt; 10"&gt;
  • &lt;xsl:if test="expression"&gt; ... ...some output if the expression is true... ... &lt;/xsl:if&gt;
  • add the &lt;xsl:if&gt; element inside the &lt;xsl:for-each&gt; element
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

XSLT <xsl:for-each> Element - 0 views

  • Legal filter operators are: =&nbsp; (equal) != (not equal) &amp;lt; less than &amp;gt; greater than
  • We can also filter the output from the XML file by adding a criterion to the select attribute in the &lt;xsl:for-each&gt; element.
  • &lt;xsl:for-each select="catalog/cd"&gt;
  • ...1 more annotation...
  • The &lt;xsl:for-each&gt; Element The XSL &lt;xsl:for-each&gt; element can be used to select every XML element of a specified node-set:
David Gelpi Fleta

XSLT <xsl:choose> Element - 0 views

  • &lt;xsl:choose&gt; &lt;xsl:when test="expression"&gt; ... some output ... &lt;/xsl:when&gt; &lt;xsl:otherwise&gt; ... some output .... &lt;/xsl:otherwise&gt; &lt;/xsl:choose&gt;
  • The &lt;xsl:choose&gt; element is used in conjunction with &lt;xsl:when&gt; and &lt;xsl:otherwise&gt; to express multiple conditional tests.
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

XSL Languages - 0 views

  • XSL stands for EXtensible Stylesheet Language.
  • XSL consists of three parts: XSLT - a language for transforming XML documents XPath - a language for navigating in XML documents XSL-FO - a language for formatting XML documents
  • XSL describes how the XML document should be displayed!
David Gelpi Fleta

XPath Syntax - 0 views

  • Selecting Nodes XPath uses path expressions to select nodes in an XML document.
  • Expression Description nodename Selects all child nodes of the named node / Selects from the root node // Selects nodes in the document from the current node that match the selection no matter where they are . Selects the current node .. Selects the parent of the current node @ Selects attributes
  • Predicates Predicates are used to find a specific node or a node that contains a specific value.
  • ...9 more annotations...
  • Predicates are always embedded in square brackets.
  • [1]
  • [last()]
  • [position()&lt;3]
  • [@lang]
  • [@lang='eng']
  • [price&gt;35.00]
  • Wildcard Description * Matches any element node @* Matches any attribute node node() Matches any node of any kind
  • Selecting Several Paths By using the | operator in an XPath expression you can select several paths.
David Gelpi Fleta

XSLT Tutorial - 0 views

  • XSL stands for EXtensible Stylesheet Language.
  • there was a need for an XML-based style sheet language.
  • XSLT stands for XSL Transformations.
David Gelpi Fleta

Introduction to XPath - 0 views

  • XPath is a language for finding information in an XML document
  • What is XPath? XPath is a syntax for defining parts of an XML document XPath uses path expressions to navigate in XML documents XPath contains a library of standard functions XPath is a major element in XSLT XPath is a W3C recommendation
1 - 20 of 49 Next › Last »
Showing 20 items per page