Skip to main content

Home/ PSI_ESEI/ Group items tagged XPATH

Rss Feed Group items tagged

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
  • Selecting Several Paths By using the | operator in an XPath expression you can select several paths.
  • ...10 more annotations...
  • Wildcard Description * Matches any element node @* Matches any attribute node node() Matches any node of any kind
  • Predicates Predicates are used to find a specific node or a node that contains a specific value.
  • Predicates are always embedded in square brackets.
  • [last()]
  • [position()<3]
  • title[@lang]
  • [@lang]
  • [@lang='eng']
  • [price>35.00]
  • [1]
David Gelpi Fleta

Introduction to XSLT - 0 views

  • 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
  • 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.
  • 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 Uses XPath XSLT uses XPath to find information in an XML document. XPath is used to navigate through elements and attributes in XML documents.
  • 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.
David Gelpi Fleta

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

  • The &lt;xsl:value-of&gt; element is used to extract the value of a selected node.
  • &lt;xsl:value-of select="catalog/cd/title"/&gt;
  • 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.
David Gelpi Fleta

XSLT <xsl:template> Element - 0 views

  • 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.
  • &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).
  • &lt;xsl:template match="/"&gt; &lt;html&gt;
  • ...3 more annotations...
  • 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;
  • &lt;xsl:stylesheet&gt;, defines that this document is an XSLT style sheet document
  • The content inside the &lt;xsl:template&gt; element defines some HTML to write to the output.
David Gelpi Fleta

XSL Languages - 0 views

  • XSL stands for EXtensible Stylesheet Language.
  • XSL describes how the XML document should be displayed!
  • 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
David Gelpi Fleta

XSL - 24 views

Hemos marcado a través de la herramienta Diigo lo estrictamente necesario para añadir una capa de presentación a los datos etiquetados mediante XML. Encontraréis los apuntes en los "bookmarks" del ...

practica

started by David Gelpi Fleta on 27 Nov 07 no follow-up yet
1 - 6 of 6
Showing 20 items per page