Introduction to XSLT

Size: px
Start display at page:

Download "Introduction to XSLT"

Transcription

1 Introduction to XSLT Justin Tilton, Chief Executive Officer instructional media + magic, inc. at the JA-SIG Conference Destin, Florida December 2, 2001

2 The Abstract Looking for a methodology to quickly and effectively create Transformations? Interested in the basics of XSLT and Xpath, and a good way to get started? If so, this workshop is for you! We will be discussing the fundamental concepts of XSLT and Xpath, and the methodologies that have emerged from months of developing stylesheet transformations for the uportal 2.0 project. We will discuss the design aspects related to converting structured information in XML into device-dependent markup languages such as HTML, and WML, and the guidelines and best practices evolving from this experience. No prior XSLT experience is necessary.

3 Overview Introduction uportal Basic XPath Basic XSLT Markup: XHTML Cascading Style Sheets Tools The Creation Process Hands-on

4 Introduction

5 Background Who: W3C What: XPath and XSLT Specs. When: 11/16/1999 Why: A need arose for a specification to define the syntax and semantics for transforming XML documents.

6 References The definitive reference Michael Kay Wrox Press Inc ISBN:

7 References Great practical reference Jeni Tennison Hungry Minds ISBN:

8 References Practical use of transformations in Java code Eric Burke O'Reilly & Assoc. ISBN:

9 JA-SIG s uportal

10 What s new in 2.0? Abstraction of layout Structure/theme transformations Standard channel events Standard CSS classes More flexible publish/subscribe User profile management JNDI lookup service WebProxy channel

11 Basic Architecture

12 Basic Architecture Permissions authentication User preferences Channel registry Other uportal Data iplanet LDAP Oracle db2 mysql

13 Channel Elementary unit of presentation, defined by the IChannel interface User Interaction External Information Set Runtime Data () IChannel Channel Content (Presentation) Render XML ()

14 IChannel content must Be well-formed XML such as XHTML, RSS, SVG, SMIL, or a SOAP message (HTML is not well formed XML) Rendered by an XSL transformation using an XSL stylesheet

15 Framework Organization User Interaction Presentation uportal Framework Channel Channel Channel

16 User Layout User Layout is an abstract structure defining the overall content available to the user userlayout is a tree structure consisting of folders and channels, the later always being the leaf nodes

17 User Layout User Layout Folder Folder Channel Channel Channel Channel Folder Channel Folder Folder Channel Channel Folder Channel

18 Structure Transformation User Layout Folder Folder Folder Folder Channel Folder Channel Channel Channel Channel Channel Folder Channel Channel User Layout Tab Column Channel Channel Channel Channel Channel Tab Column Channel Channel Tab Channel

19 Theme Transformation Column Channel Dictionary.com Tab Jim Smith Channel Bookmarks Column User Layout Channel Cartoon Tab Financial Aid Channel Channel Tab Library Channel

20 Compiling the Presentation userlayout Channels XSLT Structure transformation setruntimedata() renderxml() XSLT structuredlayout Theme transformation HTML, WML VoiceML...

21 Content Transformation XML Stylesheet XSLT Processor XHTML: Web Browser HTML: PDA WML: Cell Phone

22 Flexible Layouts Structures Tab/ column Tree / column Themes Multi-column Multi-row Skins Matrix, Java

23 Multiple Target Devices

24 Tab / Column Layout

25 Tree / Column Layout

26 Theme: java

27 Theme: imm

28 Theme: matrix

29 User preferences Portal=rendering+customization User Preferences Channel Swappable layout and preference management modules Profile management module Tab-column specific UP module Skin Selection

30 User Preferences

31 Publish/Subscribe Channel publishing document Channel parameters Default values Modification permissions Descriptions Publish/Subscribe steps Step sequence Instructions, help Flexible channel publishing

32 Channel Types

33 Channel Settings

34 Channel Controls

35 Channel Classification

36 Basic XPath

37 Nodes and Node Trees When an application wants to operate on an XML document (such as an XSLT processor running an XSLT stylesheet on an XML document), it builds an internal model of what the document looks like. This model is known as a document object model or DOM. In XPath and XSLT, it's called a node tree.

38 Types of Nodes Root nodes The top of the node tree Element nodes XML elements Attribute nodes XML attributes Text nodes Textual content in XML elements Comment nodes XML comments Processing instruction nodes XML processing instructions Namespace nodes The in-scope namespaces on an element E E R E A E T

39 Node Tree Example <document> <para type= note > content </para> <para type= warning > content </para> <para type= warning > content </para> </document> -elementpara -rootdocument para note content document para warning content -textcontent -attributetype:note -textcontent -elementpara -attributetype:warning -textcontent -elementpara -attributetype:warning para warning content

40 XPath Definition XPath is a language for addressing parts of an XML document, designed to be used by XSLT. Example XPath: child::para[attribute::type='warning'][position()=2] In English: select the second para child of the context node that has a type attribute with a value of warning.

41 Dissecting the Example Axis child::para[attribute::type='warning'][position()=2] Axis: child::para Filter: [attribute::type='warning'] Filter: [position()=2] document para para para type:note type:warning type:warning Context node

42 Dissecting the Example Axis child::para[attribute::type='warning'][position()=2] Axis: child::para Filter: [attribute::type='warning'] Filter: [position()=2] document para para para type:note type:warning type:warning Filtered Context node

43 Dissecting the Example Axis child::para[attribute::type='warning'][position()=2] Axis: child::para Filter: [attribute::type='warning'] Filter: [position()=2] document para para para type:note type:warning type:warning Filtered Filtered Context node

44 Dissecting the Example Axis child::para[attribute::type='warning'][position()=2] Axis: child::para Filter: [attribute::type='warning'] Filter: [position()=2] document para para para type:note type:warning type:warning Filtered Filtered Selected Context node

45 Types of XPaths Expressions: Return a value, which might be a node set that is processed or a string that is output. <xsl:when test="@type= warning "> Patterns: Either match a particular node or don't match that node. <xsl:template match="para">

46 XPath Expressions Select Nodes <xsl:for-each select= child::z > Conditional <xsl:if test= position()=2 > Calculation <xsl:value-of select= position()+4"> Z C C Z

47 Node Set Expressions The most common way that XSLT uses XPaths is to select node sets. These XPaths usually occur within a select attribute, for example on xsl:for each or xsl:apply templates, and are known as location paths. <xsl:for-each select= child::para > <xsl:apply-templates select="paragraph"/>

48 Location Paths The purpose of location paths is to select node sets from a node tree. Location paths can be absolute or relative Absolute location paths start from a known location such as the root node <xsl:for-each select= /R/N > Relative location paths start from the context node. <xsl:for-each select= N > note: same as child::n N N X X R Y R Y N N C ontext Z

49 Steps A location path is made up of a number of steps. Each step takes you from a node to a node set. Each step is separated from the one before it with a /.

50 Steps Every step is made up of an axis and a node test. The axis specifies the direction that the child :: para step is taken in The node test specifies the kinds of nodes that should be collected in that direction. Within a step, the axis and the node test are separated by a double colon ::.

51 Some Shorthand Notation If no axis is specified in a step, the default axis is the child axis. Longhand select= child::para/child::sentence Shorthand select= para/sentence Another important axis is the attribute axis, which takes you from the context node to the attributes of that node. Longhand select= attribute::type Shorthand Another essential axis is the parent axis. This takes you from the context node to the parent of that node. Longhand select= parent::node()/child::xyz Shorthand select=../xyz

52 Axes ancestor :: node() Takes you up the tree to the ancestors of the context node in reverse document order. 1 2

53 Axes ancestor-or-self :: node() Takes you up the tree to the ancestors of the context node in reverse document order starting with the context node

54 Axes child :: node() Takes you to the children of the context node in document order. This is the default axis. 1 2

55 Axes descendant :: node() Takes you to the descendants of the context node. The resulting nodes are in document order

56 Axes descendant-or-self :: node() Takes you to the descendants of the context node, starting with the context node, in document order

57 Axes following :: node() Takes you to the nodes that occur after the context node in document order, but that are not the context node s descendants

58 Axes following-sibling :: node() Takes you to the siblings of the context node that occur after the context node in document order. 1 2

59 Axes parent :: node() Selects a single node the parent of the context node. 1

60 Axes preceding :: node() Takes you to the nodes that occur before the context node in reverse document order, excluding the context node s ancestors

61 Axes preceding-sibling :: node() Takes you to the siblings (children of the same parent) of the context node that occur before it, in reverse document order. 2 1

62 Axes self :: node() Takes you to the context node itself. 1

63 Predicates (filters) Predicates are placed in square brackets either: at the end of a step select= para[position()=3]/sentence or at the end of a location path select= para/sentence[position()=3] Predicates act as filters on node sets. When predicate expressions test false, the node is filtered out.

64 Predicates (filters) You can have any number of predicates following each other. select= The context node list for each predicate contains the nodes that are still in the node set after it's been filtered by the previous predicates. Predicates can be used at any point in a location path, but they only apply to the immediately preceding step.

65 Expressions - Union You can combine node sets by creating a union using the operator. If there are any nodes that occur in both node sets, the union only holds one copy of them. You can use predicates on the result of a union, just as you can on any node set.

66 Expressions - Operators Logical Operators and, or and not() Comparative Operators =,!=, <, <=, >, >= Remember to escape: < to < Mathematical Operators +, -, *, div, mod

67 XPath Examples select= presidents/president/[position()=3]/name select= //president[count(vicepresident)=0]/name select= < 1800]/name select= descendant::president/ [count(vicepresident)>1]/name select= //president/name[child::first= John ] select= presidents/president[(term/@from > 1800) and (term/@from < 1850)/name

68 Basic XSLT

69 Background XSLT is part of a larger initiative within the World Wide Web Consortium (W3C) to define a way of presenting XML documents. This initiative is known as XSL (Extensible Stylesheet Language). XSLT is an XML vocabulary that's used to define a transformation between an XML document and a result document, which might be in XML, in HTML, or a text document.

70 What is an XSLT Stylesheet? The XSLT processor uses a stylesheet to transform an XML document. The stylesheet contains instructions for generating a new document based on information in the source document. This can involve adding, removing, or rearranging nodes, as well as presenting the nodes in a new way.

71 The XSL Processing sequence source document XSL stylesheet Result file or stream XML parser rules base write result to output result tree source tree apply templates

72 Differentiating Stylesheets XSLT stylesheets do not perform the same function as Cascading Style Sheets (CSS) CSS is used to apply style elements to markup languages to affect formatting in a single pass, top down, fashion. XSLT produces a separate result tree and can iterate and perform conditional logic. XSLT and CSS are most powerful when used together. More later

73 Example of a Stylesheet When you work with a stylesheet, three documents are involved: Source document in XML Desired output: the result document, which can be HTML, XML, or text XSLT stylesheet, which is also an XML document

74 Hello World! XML Document: <?xml version="1.0"?> <greeting>hello, World!</greeting> Desired Output: <html> <head><title>greeting</title></head> <body><p>hello, World!</p></body> </html> XSLT Stylesheet: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl=" <xsl:template match="/"> <html> <head><title>greeting</title></head> root greeting Hello World! <body><p><xsl:value-of select="greeting"/></p></body> </html> </xsl:template> </xsl:stylesheet>

75 Dissecting the XSLT XSLT stylesheets are XML Documents <?xml version="1.0"?> Standard XSLT heading/namespace <xsl:stylesheet version="1.0" xmlns:xsl=" The template rule to be triggered when a particular part of the source document is being processed. / is XPath for root node <xsl:template match="/">

76 Dissecting the XSLT Once the rule is triggered the body of the template defines what output to generate. <html> <head><title>greeting</title></head> <body><p><xsl:value-of select="greeting"/></p></body> </html> Most of the template is HTML except the value-of element which is an XSL instruction. The XPath in the select statement is asking for the contents of the child of the context node with an element name of greeting. root greeting Hello World!

77 Dissecting the XSLT All that s left to do is close (finish) the template and the stylesheet. </xsl:template> </xsl:stylesheet>

78 Some XSL Top Level Elements <xsl:decimal-format> Declares a decimal format. <xsl:import> Imports another stylesheet into this stylesheet. <xsl:key> provides a way to work with documents that contain an implicit cross-reference structure <xsl:output> This instruction specifies how you want the result tree to be output

79 Some XSL Top Level Elements <xsl:param> Declares a parameter for a stylesheet or template, and specifies a default value for the parameter <xsl:template> Specifies a template rule. <xsl:variable> Declares a variable and binds a value to that variable. The difference between the xsl:param and xsl:variable instructions is that xsl:param defines a default value while xsl:variable defines a fixed value. If used as a top level element the scope is global otherwise the scope is local to a specific template

80 What Is a Template? A template defines what the XSLT processor should do when it processes a particular node in the XML source document. The XSLT processor populates the result document by instantiating a sequence of templates. Instantiation of a template means that the XSLT processor Copies any literal data from the template to the result document Executes the XSLT instructions in the template

81 Contents of a Template To define a template, you specify the xsl:template instruction. In thexsl:template tag, the value of the match attribute is an XPath pattern. This pattern matches (identifies) nodes in the source XML document. The value of the match attribute is the template rule.

82 The Template Body The template body defines actions you want the XSLT processor to perform each time it instantiates the template. It contains XSLT instructions you want the XSLT processor to follow Elements that specify literal output you want the XSLT processor to insert in the result document. For example: <table align="center" cellpadding="5">

83 Determining Templates to Instantiate When the XSLT processor applies a stylesheet to an XML document, it begins processing with the root node of the XML source document Every stylesheet includes default templates Whether or not you explicitly define a template rule that matches the root node, the XSLT processor always instantiates a template that matches the root node.

84 The Example Handout

85 Dissected XSLT Stylesheet

86 Dissecting a sample In the sample stylesheet, the template rule in the first template matches the root node: <xsl:template match="/"> The XSLT processor instantiates this template to start generating the result document. It copies the first few lines from the template to the result document.

87 Dissecting a sample Then the XSLT processor reaches the following XSLT instruction: <xsl:apply-templates select="/bookstore/book"/> When the XSLT processor reaches the select attribute, it creates a list of all source nodes that match the specified pattern. In this example, the list contains book elements. The processor then processes each node in the list in turn by instantiating its matching template.

88 Dissecting a sample First, the XSLT processor searches for a template that matches the first book element. The template rule in the second template matches the book element: <xsl:template match="book"> After instantiating this template for the first book element, the XSLT processor searches for a template that matches the second book element

89 Dissecting a sample The XSLT processor instantiates the book template again, and then repeats the process for the third book element. After three instantiations of the book template, the XSLT processor returns to the first template (the template that matches the root node) and continues with the line after the xsl:apply-templates instruction.

90 Built-in Templates When the XSLT processor cannot find a template that matches a selected node, it uses built-in templates. Every stylesheet includes built-in templates whether or not you explicitly define them.

91 Built-in Templates The following template matches the root node and element nodes and selects all attributes and child nodes for further processing: <xsl:template match="* /"> <xsl:apply-templates / > </xsl:template> The following template matches text and attribute nodes. This template copies the value of the text or attribute node to the result document: <xsl:template match="@* text()"> <xsl:value-of select="." / > </xsl:template>

92 Major XSL Instructions xsl:apply-imports xsl:apply-templates xsl:attribute xsl:attribute-set xsl:call-template xsl:choose xsl:comment xsl:copy xsl:copy-of xsl:decimal-format xsl:element xsl:fallback xsl:for-each xsl:if xsl:import xsl:include xsl:key xsl:message xsl:namespace-alias xsl:number xsl:otherwise xsl:output xsl:param xsl:preserve-space xsl:processing-instruction xsl:sort xsl:strip-space xsl:stylesheet xsl:template xsl:text xsl:transform xsl:value-of xsl:variable xsl:when xsl:with-param

93 XHTML

94 Why XHTML? XSLT Stylesheets are XML documents If you plan to output HTML, it will reside in the template bodies of the XSLT Stylesheet, and the markup will be output as literal output. When the XSLT Stylesheet contains Markup, it has to be well formed

95 Differences with HTML 4 Due to the fact that XHTML is an XML application, certain practices that were perfectly legal in HTML 4 must be changed. Documents must be well-formed Well-formedness is a new concept introduced by [XML]. Essentially this means that all elements must either have closing tags or be written in a special form (as described below), and that all the elements must nest. CORRECT: nested elements. <p>here is an emphasized <em>paragraph</em>.</p> INCORRECT: overlapping elements <p>here is an emphasized <em>paragraph.</p></em>

96 Differences with HTML 4 Element and attribute names must be in lower case XHTML documents must use lower case for all HTML element and attribute names. This difference is necessary because XML is case-sensitive e.g. <li> and <LI> are different tags.

97 Differences with HTML 4 In HTML 4 certain elements were permitted to omit the end tag; with the elements that followed implying closure. This omission is not permitted in XML-based XHTML. All elements must have an end tag. CORRECT: terminated elements <p>here is a paragraph.</p> <p>here is another paragraph.</p> INCORRECT: unterminated elements <p>here is a paragraph. <p>here is another paragraph.

98 Differences with HTML 4 All attribute values must be quoted, even those which appear to be numeric. CORRECT: quoted attribute values <table rows="3"> INCORRECT: unquoted attribute values <table rows=3>

99 Differences with HTML 4 XML does not support attribute minimization. Attribute-value pairs must be written in full. Attribute names such as nowrap and checked cannot occur in elements without their value being specified. CORRECT: unminimized attributes <td nowrap= nowrap"> INCORRECT: minimized attributes <td nowrap>

100 Differences with HTML 4 Empty elements must either have an end tag or the start tag must end with />. For instance, <br/> or <hr></hr>. CORRECT: terminated empty tags <br/><hr/> INCORRECT: unterminated empty tags <br><hr>

101 Cascading Style Sheets

102 CSS uportal and Skins uportal uses Cascading Style Sheets to Skin the portal and content. These CSS files are optimized for a particular structure. For consistency channel developers should become familiar with the CSS classes that are defined for a particular structure and apply them to the markup language in their XSLT transformations.

103 The CSS Classes There is a sample developer channel in uportal that describes and gives examples of the CSS classes for the Tab/Column Theme.

104 The CSS Channel

105 The Tools

106 The Applications These are the applications I am familiar with -- this is not an endorsement -- and no testing was done on animals XML Document Development IDE: Excelon Stylus Studio XML Spy Cooktop (open source) HTML Markup IDE: Macromedia Dreamweaver Adobe GoLive HTML to XHTML Conversion/Cleanup HTML Tidy (open source) XSLT Development IDE Excelon Stylus Studio XML Spy Cooktop (open source)

107 The Creation Process

108 Creating an XSLT Stylesheet Step One get or develop one of the following: A representative XML Document A DTD (a whole different seminar) A Schema (a whole different seminar) Step two Analyze the data Think about the best way to present and interact with it. The data is your friend. Step three Develop sample markup Design mocks for each markup language & device that you plan to support. Don t try to paint the canvas without a sketch. Step four Convert the markup to XML The stylesheet will only eat tasty markup. Poorly formed markup will be regurgitated. Step five copy markup into XSLT editor Match on a root element and start cooking XSLT.

109 Hands - on

110 Hands on Convert RSS (Rich Site Summary) Syndicated Content XML Documents into HTML using an XSLT Stylesheet.

111 Source XML <?xml version="1.0"?> <bookstore> <book> <author>w. Shakespeare</author> <title>hamlet</title> <published>1997</published> <price>2.95</price> </book> <book> <author>w. Shakespeare</author> <title>macbeth</title> <published>1989</published> <price>9.95</price> </book> <book> <author>d. Alighieri</author> <title>the Divine Comedy</title> <published>1321</published> <price>5.95</price> </book> </bookstore> XSLT Stylesheet <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl=" <xsl:output method="html" /> <xsl:template match="/"> <html><head><title>stylesheet Example</title></head> <body> <table align="center" cellpadding="5"> <tr> <th>title</th> <th>author</th> <th>price</th> </tr> <xsl:apply-templates select="/bookstore/book"> <xsl:sort select="author" /> </xsl:apply-templates> </table> </body> </html> </xsl:template> <xsl:template match="book"> <tr> <td><xsl:value-of select="title" /></td> <td><xsl:value-of select="author" /></td> <td align="right"><xsl:value-of select="price" /></td> </tr> </xsl:template> </xsl:stylesheet>

112 Dissected XSLT Stylesheet Standard XML declaration xsl:stylesheet is an XSLT instruction. xsl:template is an XSLT instruction. It contains literal data to be copied to the result document and XSLT instructions to be followed by the XSLT processor. The processor performs these steps for the source nodes identified by the match attribute value. In this template, the match attribute identifies the root node of the source document. This template matches book elements in the source document. In this stylesheet, the XSLT processor performs the actions in this template three times, once for each book element in the source document. <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl=" <xsl:output method="html" /> <xsl:template match="/"> <html><head><title>stylesheet Example</title></head> <body> <table align="center" cellpadding="5"> <tr> <th>title</th> <th>author</th> <th>price</th> </tr> <xsl:apply-templates select="/bookstore/book"> <xsl:sort select="author" /> </xsl:apply-templates> </table> </body> </html> </xsl:template> <xsl:template match="book"> <tr> <td><xsl:value-of select="title" /></td> <td><xsl:value-of select="author" /></td> <td align="right"> <xsl:value-of select="price" /> </td> </tr> </xsl:template> </xsl:stylesheet> Namespace declaration for W3C XSLT namespace. xsl:output is an XSLT instruction. In this stylesheet, it specifies that the result document will be in HTML format. xsl:apply-templates is an XSLT instruction. For each node identified by this instruction s select attribute, the XSLT processor goes to another template in this stylesheet, and performs the actions defined in that template. When done, the processor returns here, and moves to the next line in this template. In this template, the select attribute identifies all book elements in the source document. xsl:sort is an XSLT instruction. The XSLT processor processes the book nodes in alphabetical order by author. xsl:value-of is an XSLT instruction. The XSLT processor extracts the contents of the source node specified in the select attribute and copies it into the result document.

113 HTML Output Browser Representation <html> <head> <META http-equiv="content-type" content="text/html"> <title>stylesheet Example</title> </head> <body> <table align="center" cellpadding="5"> <tr> <th>title</th> <th>author</th> <th>price</th> </tr> <tr> <td>the Divine Comedy</td> <td>d. Alighieri</td> <td align="right">5.95</td> </tr> <tr> <td>hamlet</td> <td>w. Shakespeare</td> <td align="right">2.95</td> </tr> <tr> <td>macbeth</td> <td>w. Shakespeare</td> <td align="right">9.95</td> </tr> </table> </body> </html>

Introduction to XSLT

Introduction to XSLT Introduction to XSLT Justin Tilton, Chief Executive Officer instructional media + magic, inc. at the JA-SIG Conference Vancouver, BC Sunday, June 9, 2002 The Abstract Looking for a methodology to quickly

More information

XSLT: How Do We Use It?

XSLT: How Do We Use It? XSLT: How Do We Use It? Nancy Hallberg Nikki Massaro Kauffman 1 XSLT: Agenda Introduction & Terminology XSLT Walkthrough Client-Side XSLT/XHTML Server-Side XSLT/XHTML More Creative Server-Side XSLT 2 XSLT:

More information

Portals, uportal, and JA-SIG

Portals, uportal, and JA-SIG Portals, uportal, and JA-SIG Justin Tilton, Chief Executive Officer instructional media + magic, inc. at the Campus Pipeline Pillar Institution Program Meeting Pepperdine University November 15, 2001 The

More information

XPath and XSLT. Overview. Context. Context The Basics of XPath. XPath and XSLT. Nodes Axes Expressions. Stylesheet templates Transformations

XPath and XSLT. Overview. Context. Context The Basics of XPath. XPath and XSLT. Nodes Axes Expressions. Stylesheet templates Transformations XPath and XSLT Michael B. Spring Department of Information Science and Telecommunications University of Pittsburgh spring@imap.pitt.edu http://www.sis.pitt.edu/~spring Context The Basics of XPath Nodes

More information

XSL Transformation (XSLT) XSLT Processors. Example XSLT Stylesheet. Calling XSLT Processor. XSLT Structure

XSL Transformation (XSLT) XSLT Processors. Example XSLT Stylesheet. Calling XSLT Processor. XSLT Structure Transformation (T) SOURCE The very best of Cat Stevens UK 8.90 1990 Empire Burlesque Bob

More information

XSL Elements. xsl:copy-of

XSL Elements. xsl:copy-of XSL Elements The following elements are discussed on this page: xsl:copy-of xsl:value-of xsl:variable xsl:param xsl:if xsl:when xsl:otherwise xsl:comment xsl:import xsl:output xsl:template xsl:call-template

More information

Introduction to XSLT. Version 1.3 March nikos dimitrakas

Introduction to XSLT. Version 1.3 March nikos dimitrakas Introduction to XSLT Version 1.3 March 2018 nikos dimitrakas Table of contents 1 INTRODUCTION... 3 1.1 XSLT... 3 1.2 PREREQUISITES... 3 1.3 STRUCTURE... 3 2 SAMPLE DATA... 4 3 XSLT... 6 4 EXAMPLES... 7

More information

Presentation. Separating Content and Presentation Cascading Style Sheets (CSS) XML and XSLT

Presentation. Separating Content and Presentation Cascading Style Sheets (CSS) XML and XSLT Presentation Separating Content and Presentation Cascading Style Sheets (CSS) XML and XSLT WordPress Projects Theme Generators WYSIWYG editor Look at tools to support generation of themes Design a new

More information

Style Sheet A. Bellaachia Page: 22

Style Sheet A. Bellaachia Page: 22 Style Sheet How to render the content of an XML document on a page? Two mechanisms: CSS: Cascading Style Sheets XSL (the extensible Style sheet Language) CSS Definitions: CSS: Cascading Style Sheets Simple

More information

Exam : Title : XML 1.1 and Related Technologies. Version : DEMO

Exam : Title : XML 1.1 and Related Technologies. Version : DEMO Exam : 000-142 Title : XML 1.1 and Related Technologies Version : DEMO 1. XML data is stored and retrieved within a relational database for a data-centric application by means of mapping XML schema elements

More information

Lars Schmidt-Thieme, Information Systems and Machine Learning Lab (ISMLL), University of Hildesheim, Germany, Course on XML and Semantic Web

Lars Schmidt-Thieme, Information Systems and Machine Learning Lab (ISMLL), University of Hildesheim, Germany, Course on XML and Semantic Web Course on XML and Semantic Web Technologies, summer term 2012 0/44 XML and Semantic Web Technologies XML and Semantic Web Technologies I. XML / 5. XML Stylesheet Language Transformations (XSLT) Lars Schmidt-Thieme

More information

Introduction to XSLT. Version 1.0 July nikos dimitrakas

Introduction to XSLT. Version 1.0 July nikos dimitrakas Introduction to XSLT Version 1.0 July 2011 nikos dimitrakas Table of contents 1 INTRODUCTION... 3 1.1 XSLT... 3 1.2 PREREQUISITES... 3 1.3 STRUCTURE... 3 2 SAMPLE DATA... 4 3 XSLT... 6 4 EXAMPLES... 7

More information

XSL extensible Style Language" DOCUMENTS MULTIMEDIA! Transforming documents using! XSLT" XSLT processor" XSLT stylesheet"

XSL extensible Style Language DOCUMENTS MULTIMEDIA! Transforming documents using! XSLT XSLT processor XSLT stylesheet DOCUMENTS MULTIMEDIA! Transforming documents using! XSLT" XSL extensible Style Language"!" A family of languages for defining document transformation and presentation" XSL XSLT XSL-FO Christine Vanoirbeek"

More information

Computer Science E-259

Computer Science E-259 Computer Science E-259 XML with Java Lecture 5: XPath 1.0 (and 2.0) and XSLT 1.0 (and 2.0), Continued 22 October 2007 David J. Malan malan@post.harvard.edu 1 Computer Science E-259 Last Time CSS Level

More information

Extensible Markup Stylesheet Transformation (XSLT)

Extensible Markup Stylesheet Transformation (XSLT) Extensible Markup Stylesheet Transformation (XSLT) Asst. Prof. Dr. Kanda Runapongsa Saikaew (krunapon@kku.ac.th) Dept. of Computer Engineering Khon Kaen University 1 Overview Terms: XSL, XSLT, XSL-FO Value

More information

XSL Languages. Adding styles to HTML elements are simple. Telling a browser to display an element in a special font or color, is easy with CSS.

XSL Languages. Adding styles to HTML elements are simple. Telling a browser to display an element in a special font or color, is easy with CSS. XSL Languages It started with XSL and ended up with XSLT, XPath, and XSL-FO. It Started with XSL XSL stands for EXtensible Stylesheet Language. The World Wide Web Consortium (W3C) started to develop XSL

More information

COP 4814 Florida International University Kip Irvine XSLT. Updated: 2/9/2016 Based on Goldberg, Chapter 2. Irvine COP 4814

COP 4814 Florida International University Kip Irvine XSLT. Updated: 2/9/2016 Based on Goldberg, Chapter 2. Irvine COP 4814 COP 4814 Florida International University Kip Irvine XSLT Updated: 2/9/2016 Based on Goldberg, Chapter 2 XSL Overview XSL Extensible Stylesheet Language A family of languages used to transform and render

More information

Appendix H XML Quick Reference

Appendix H XML Quick Reference HTML Appendix H XML Quick Reference What Is XML? Extensible Markup Language (XML) is a subset of the Standard Generalized Markup Language (SGML). XML allows developers to create their own document elements

More information

XML. Objectives. Duration. Audience. Pre-Requisites

XML. Objectives. Duration. Audience. Pre-Requisites XML XML - extensible Markup Language is a family of standardized data formats. XML is used for data transmission and storage. Common applications of XML include business to business transactions, web services

More information

Author: Irena Holubová Lecturer: Martin Svoboda

Author: Irena Holubová Lecturer: Martin Svoboda NPRG036 XML Technologies Lecture 6 XSLT 9. 4. 2018 Author: Irena Holubová Lecturer: Martin Svoboda http://www.ksi.mff.cuni.cz/~svoboda/courses/172-nprg036/ Lecture Outline XSLT Principles Templates Instructions

More information

CSI 3140 WWW Structures, Techniques and Standards. Representing Web Data: XML

CSI 3140 WWW Structures, Techniques and Standards. Representing Web Data: XML CSI 3140 WWW Structures, Techniques and Standards Representing Web Data: XML XML Example XML document: An XML document is one that follows certain syntax rules (most of which we followed for XHTML) Guy-Vincent

More information

XSLT program. XSLT elements. XSLT example. An XSLT program is an XML document containing

XSLT program. XSLT elements. XSLT example. An XSLT program is an XML document containing XSLT CPS 216 Advanced Database Systems Announcements (March 24) 2 Homework #3 will be assigned next Tuesday Reading assignment due next Wednesday XML processing in Lore (VLDB 1999) and Niagara (VLDB 2003)

More information

XSLT. Announcements (October 24) XSLT. CPS 116 Introduction to Database Systems. Homework #3 due next Tuesday Project milestone #2 due November 9

XSLT. Announcements (October 24) XSLT. CPS 116 Introduction to Database Systems. Homework #3 due next Tuesday Project milestone #2 due November 9 XSLT CPS 116 Introduction to Database Systems Announcements (October 24) 2 Homework #3 due next Tuesday Project milestone #2 due November 9 XSLT 3 XML-to-XML rule-based transformation language Used most

More information

Portals, uportal and JA-SIG. Jim Farmer China Education and Research Conference 2002 Beijing, China March 28, 2002

Portals, uportal and JA-SIG. Jim Farmer China Education and Research Conference 2002 Beijing, China March 28, 2002 Portals, uportal and JA-SIG Jim Farmer China Education and Research Conference 2002 Beijing, China March 28, 2002 Portals A student s Web World Research Administrative Library Instruction Portal defined

More information

Computer Science E-259

Computer Science E-259 Computer Science E-259 XML with Java Lecture 4: XPath 1.0 (and 2.0) and XSLT 1.0 (and 2.0) 21 February 2007 David J. Malan malan@post.harvard.edu 1 Computer Science E-259 Last Time DOM Level 3 JAXP 1.3

More information

XSLT (part I) Mario Alviano A.Y. 2017/2018. University of Calabria, Italy 1 / 22

XSLT (part I) Mario Alviano A.Y. 2017/2018. University of Calabria, Italy 1 / 22 1 / 22 XSLT (part I) Mario Alviano University of Calabria, Italy A.Y. 2017/2018 Outline 2 / 22 1 Introduction 2 Templates 3 Attributes 4 Copy of elements 5 Exercises 4 / 22 What is XSLT? XSLT is a (Turing

More information

Semantic Web. XSLT: XML Transformation. Morteza Amini. Sharif University of Technology Fall 95-96

Semantic Web. XSLT: XML Transformation. Morteza Amini. Sharif University of Technology Fall 95-96 ه عا ی Semantic Web XSLT: XML Transformation Morteza Amini Sharif University of Technology Fall 95-96 Outline Fundamentals of XSLT XPath extensible Stylesheet Language Cocoon 2 XSLT XSLT stands for extensible

More information

XPath and XSLT without the pain!

XPath and XSLT without the pain! XPath and XSLT without the pain! Bertrand Delacrétaz ApacheCon EU 2007, Amsterdam bdelacretaz@apache.org www.codeconsult.ch slides revision: 2007-05-04 Goal Learning to learn XPath and XSLT because it

More information

Semi-structured Data 11 - XSLT

Semi-structured Data 11 - XSLT Semi-structured Data 11 - XSLT Andreas Pieris and Wolfgang Fischl, Summer Term 2016 Outline What is XSLT? XSLT at First Glance XSLT Templates Creating Output Further Features What is XSLT? XSL = extensible

More information

XML Wrap-up. CS 431 March 1, 2006 Carl Lagoze Cornell University

XML Wrap-up. CS 431 March 1, 2006 Carl Lagoze Cornell University XML Wrap-up CS 431 March 1, 2006 Carl Lagoze Cornell University XSLT Processing Model Input XSL doc parse Input XML doc parse Parsed tree serialize Input XML doc Parsed tree Xformed tree Output doc (xml,

More information

XSLT is... XML XSLT XSL-FO XPath

XSLT is... XML XSLT XSL-FO XPath XSLT XSLT is... XML XSLT XSL-FO XPath Назначение XSLT XML XML Назначение XSLT XML HTML Сервер Браузер Назначение XSLT XML HTML Сервер Браузер Declaration

More information

XML and Semantic Web Technologies. II. XML / 5. XML Stylesheet Language Transformations (XSLT)

XML and Semantic Web Technologies. II. XML / 5. XML Stylesheet Language Transformations (XSLT) XML and Semantic Web Technologies XML and Semantic Web Technologies II. XML / 5. XML Stylesheet Language Transformations (XSLT) Lars Schmidt-Thieme Information Systems and Machine Learning Lab (ISMLL)

More information

Burrows & Langford Appendix D page 1 Learning Programming Using VISUAL BASIC.NET

Burrows & Langford Appendix D page 1 Learning Programming Using VISUAL BASIC.NET Burrows & Langford Appendix D page 1 APPENDIX D XSLT XSLT is a programming language defined by the World Wide Web Consortium, W3C (http://www.w3.org/tr/xslt), that provides the mechanism to transform a

More information

Manipulating XML Trees XPath and XSLT. CS 431 February 18, 2008 Carl Lagoze Cornell University

Manipulating XML Trees XPath and XSLT. CS 431 February 18, 2008 Carl Lagoze Cornell University Manipulating XML Trees XPath and XSLT CS 431 February 18, 2008 Carl Lagoze Cornell University XPath Language for addressing parts of an XML document XSLT Xpointer XQuery Tree model based on DOM W3C Recommendation

More information

Comp 336/436 - Markup Languages. Fall Semester Week 9. Dr Nick Hayward

Comp 336/436 - Markup Languages. Fall Semester Week 9. Dr Nick Hayward Comp 336/436 - Markup Languages Fall Semester 2018 - Week 9 Dr Nick Hayward DEV Week assessment Course total = 25% project outline and introduction developed using a chosen markup language consider and

More information

COPYRIGHTED MATERIAL. Contents. Part I: Introduction 1. Chapter 1: What Is XML? 3. Chapter 2: Well-Formed XML 23. Acknowledgments

COPYRIGHTED MATERIAL. Contents. Part I: Introduction 1. Chapter 1: What Is XML? 3. Chapter 2: Well-Formed XML 23. Acknowledgments Acknowledgments Introduction ix xxvii Part I: Introduction 1 Chapter 1: What Is XML? 3 Of Data, Files, and Text 3 Binary Files 4 Text Files 5 A Brief History of Markup 6 So What Is XML? 7 What Does XML

More information

Advanced XSLT. Web Data Management and Distribution. Serge Abiteboul Ioana Manolescu Philippe Rigaux Marie-Christine Rousset Pierre Senellart

Advanced XSLT. Web Data Management and Distribution. Serge Abiteboul Ioana Manolescu Philippe Rigaux Marie-Christine Rousset Pierre Senellart Advanced XSLT Web Data Management and Distribution Serge Abiteboul Ioana Manolescu Philippe Rigaux Marie-Christine Rousset Pierre Senellart Web Data Management and Distribution http://webdam.inria.fr/textbook

More information

XML and Databases XSLT Stylesheets and Transforms

XML and Databases XSLT Stylesheets and Transforms XML and Databases XSLT Stylesheets and Transforms Kim.Nguyen@nicta.com.au Lecture 11 1 / 38 extensible Stylesheet Language Transformations Outline 1 extensible Stylesheet Language Transformations 2 Templates

More information

EXAM XML 1.1 and Related Technologies TYPE: DEMO

EXAM XML 1.1 and Related Technologies TYPE: DEMO IBM EXAM - 000-142 XML 1.1 and Related Technologies TYPE: DEMO http://www.examskey.com/000-142.html 1 Question: 1 XML data is stored and retrieved within a relational database for a data-centric application

More information

Advanced XSLT. Web Data Management and Distribution. Serge Abiteboul Philippe Rigaux Marie-Christine Rousset Pierre Senellart

Advanced XSLT. Web Data Management and Distribution. Serge Abiteboul Philippe Rigaux Marie-Christine Rousset Pierre Senellart Advanced XSLT Web Data Management and Distribution Serge Abiteboul Philippe Rigaux Marie-Christine Rousset Pierre Senellart http://gemo.futurs.inria.fr/wdmd January 15, 2010 Gemo, Lamsade, LIG, Télécom

More information

XML and XSLT. XML and XSLT 10 February

XML and XSLT. XML and XSLT 10 February XML and XSLT XML (Extensible Markup Language) has the following features. Not used to generate layout but to describe data. Uses tags to describe different items just as HTML, No predefined tags, just

More information

INTERNET & WEB APPLICATION DEVELOPMENT SWE 444. Fall Semester (081) Module 4 (III): XSL

INTERNET & WEB APPLICATION DEVELOPMENT SWE 444. Fall Semester (081) Module 4 (III): XSL INTERNET & WEB APPLICATION DEVELOPMENT SWE 444 Fall Semester 2008-2009 (081) Module 4 (III): XSL Dr. El-Sayed El-Alfy Computer Science Department King Fahd University of Petroleum and Minerals alfy@kfupm.edu.sa

More information

Web Services Week 3. Fall Emrullah SONUÇ. Department of Computer Engineering Karabuk University

Web Services Week 3. Fall Emrullah SONUÇ. Department of Computer Engineering Karabuk University Web Services Week 3 Emrullah SONUÇ Department of Computer Engineering Karabuk University Fall 2017 1 Recap XML, Writing XML Rules for Writing XML Elements, Attributes, and Values XSL, XSLT 2 Contents Homework

More information

Extreme Java G Session 3 - Sub-Topic 5 XML Information Rendering. Dr. Jean-Claude Franchitti

Extreme Java G Session 3 - Sub-Topic 5 XML Information Rendering. Dr. Jean-Claude Franchitti Extreme Java G22.3033-007 Session 3 - Sub-Topic 5 XML Information Rendering Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical Sciences 1 Agenda

More information

XSLT Programming Constructs

XSLT Programming Constructs XSLT Programming Constructs Contents 1. Procedural programming in XSLT 2. Defining named template rules 3. Parameterizing XSLT style sheets 2 1. Procedural Programming in XSLT Declarative vs. procedural

More information

Structured documents

Structured documents Structured documents An overview of XML Structured documents Michael Houghton 15/11/2000 Unstructured documents Broadly speaking, text and multimedia document formats can be structured or unstructured.

More information

XSL and OU Campus. OmniUpdate User Training Conference OmniUpdate, Inc Flynn Road, Suite 100 Camarillo, CA 93012

XSL and OU Campus. OmniUpdate User Training Conference OmniUpdate, Inc Flynn Road, Suite 100 Camarillo, CA 93012 XSL and OU Campus OmniUpdate User Training Conference 2015 OmniUpdate, Inc. 1320 Flynn Road, Suite 100 Camarillo, CA 93012 OmniUpdate, Inc. 1320 Flynn Road, Suite 100 Camarillo, CA 93012 800.362.2605 805.484.9428

More information

XML and Databases. Lecture 11 XSLT Stylesheets and Transforms. Sebastian Maneth NICTA and UNSW

XML and Databases. Lecture 11 XSLT Stylesheets and Transforms. Sebastian Maneth NICTA and UNSW XML and Databases Lecture 11 XSLT Stylesheets and Transforms Sebastian Maneth NICTA and UNSW CSE@UNSW -- Semester 1, 2010 Outline 1. extensible Stylesheet Language Transformations (XSLT) 2. Templates:

More information

Delivery Options: Attend face-to-face in the classroom or remote-live attendance.

Delivery Options: Attend face-to-face in the classroom or remote-live attendance. XML Programming Duration: 5 Days Price: $2795 *California residents and government employees call for pricing. Discounts: We offer multiple discount options. Click here for more info. Delivery Options:

More information

Birkbeck (University of London)

Birkbeck (University of London) Birkbeck (University of London) MSc Examination Department of Computer Science and Information Systems Internet and Web Technologies (COIY063H7) 15 Credits Date of Examination: 13 June 2017 Duration of

More information

Portals, uportal and Web Services

Portals, uportal and Web Services Portals, uportal and Web Services Justin E. Tilton instructional media + magic, inc. Chief Information Systems Officers Association Conference California Community Colleges Monterey California April 15,

More information

Presentation 19: XML technologies part 2: XSL, XSLT, XSL-FO, XPath & XML Programming

Presentation 19: XML technologies part 2: XSL, XSLT, XSL-FO, XPath & XML Programming Presentation 19: XML technologies part 2: XSL, XSLT, XSL-FO, XPath & XML Programming Outline XML recap Formatting CSS or XSL? XPath XSL/XSLT XSL-FO XML Programming Slide 2 XML markup recap XML based on

More information

<xsl:apply-templates select="atom:entry/atom:content"/> <xsl:copy-of xmlns:xsl="http://www.w3.org/1999/xsl/transform"/>

<xsl:apply-templates select=atom:entry/atom:content/> <xsl:copy-of xmlns:xsl=http://www.w3.org/1999/xsl/transform/> Split one of your gravestone XSL stylesheets into two parts, one with templates about persons, the other with templates about inscriptions. Have a third template which pulls them together, using .

More information

Delivery Options: Attend face-to-face in the classroom or via remote-live attendance.

Delivery Options: Attend face-to-face in the classroom or via remote-live attendance. XML Programming Duration: 5 Days US Price: $2795 UK Price: 1,995 *Prices are subject to VAT CA Price: CDN$3,275 *Prices are subject to GST/HST Delivery Options: Attend face-to-face in the classroom or

More information

info-h-509 xml technologies Lecture 5: XSLT Stijn Vansummeren February 14, 2017

info-h-509 xml technologies Lecture 5: XSLT Stijn Vansummeren February 14, 2017 info-h-509 xml technologies Lecture 5: XSLT Stijn Vansummeren February 14, 2017 lecture outline 1 How XML may be rendered in Web Browsers 2 Syntax and Semantics of XSLT 3 How XPath is used in XSLT 1 our

More information

The Transformation Language XSL

The Transformation Language XSL Chapter 8 The Transformation Language XSL 8.1 XSL: Extensible Stylesheet Language developed from CSS (Cascading Stylesheets) scripting language for transformation of data sources to HTML or any other optical

More information

XSLT. December 16, 2008

XSLT. December 16, 2008 XSLT December 16, 2008 XML is used in a large number of applications, either data-centric (semi-structured databases), or document-centric (Web publishing). In either case, there is a need for transforming

More information

uportal: An Open-Source, Higher Education Web Portal

uportal: An Open-Source, Higher Education Web Portal uportal: An Open-Source, Higher Education Web Portal Justin Tilton, Chief Executive Officer instructional media + magic, inc. at The Educational Technology Standards Workshop University of California,

More information

XML and Databases. Outline XML. XML, typical usage scenario XML. 1. extensible Stylesheet Language X M L. Sebastian Maneth NICTA and UNSW

XML and Databases. Outline XML. XML, typical usage scenario XML. 1. extensible Stylesheet Language X M L. Sebastian Maneth NICTA and UNSW Outline XML and Databases 1. extensible Stylesheet Language Transformations (XSLT) 2. Templates (match pattern action) Lecture 11 XSLT Stylesheets and Transforms Sebastian Maneth NICTA and UNSW 3. Default

More information

Custom Tables with the LandXML Report Extension David Zavislan, P.E.

Custom Tables with the LandXML Report Extension David Zavislan, P.E. December 2-5, 2003 MGM Grand Hotel Las Vegas Custom Tables with the LandXML Report Extension David Zavislan, P.E. CV41-2 Learn some basic concepts of LandXML and the extensible Stylesheet Language (XSL)

More information

7.1 Introduction. extensible Markup Language Developed from SGML A meta-markup language Deficiencies of HTML and SGML

7.1 Introduction. extensible Markup Language Developed from SGML A meta-markup language Deficiencies of HTML and SGML 7.1 Introduction extensible Markup Language Developed from SGML A meta-markup language Deficiencies of HTML and SGML Lax syntactical rules Many complex features that are rarely used HTML is a markup language,

More information

XPath Quick Reference

XPath Quick Reference XPath Quick Reference Node Types Nodes can be of the following types: NodeType root element attribute text cornrnent processing narnespace Name Element name Attribute name Processing instruction target

More information

Web Data Management XSLT. Philippe Rigaux CNAM Paris & INRIA Saclay

Web Data Management XSLT. Philippe Rigaux CNAM Paris & INRIA Saclay http://webdam.inria.fr Web Data Management XSLT Serge Abiteboul INRIA Saclay & ENS Cachan Ioana Manolescu INRIA Saclay & Paris-Sud University Philippe Rigaux CNAM Paris & INRIA Saclay Marie-Christine Rousset

More information

Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 7 XML

Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 7 XML Chapter 7 XML 7.1 Introduction extensible Markup Language Developed from SGML A meta-markup language Deficiencies of HTML and SGML Lax syntactical rules Many complex features that are rarely used HTML

More information

INLS 760 Web Databases Lecture 12 XML, XPATH, XSLT

INLS 760 Web Databases Lecture 12 XML, XPATH, XSLT INLS 760 Web Databases Lecture 12 XML, XPATH, XSLT Robert Capra Spring 2013 Note: These lecture notes are based on the tutorials on XML, XPath, and XSLT at W3Schools: http://www.w3schools.com/ and from

More information

MASTER OF SCIENCE THESIS

MASTER OF SCIENCE THESIS MASTER OF SCIENCE THESIS XML to RDBMS By Magnus Karlsson (mka@corus.se) Stockholm, September 2000 Supervisor: Torbjörn Ryeng and Peter Monthan Corus Technologies AB Birger Jarlsgatan 20, 11434 Stockholm

More information

Chapter 1. DocBook XSL

Chapter 1. DocBook XSL Chapter 1. DocBook XSL Bob Stayton $Id: publishing.xml,v 1.4 2002/06/03 19:26:58 xmldoc Exp $ Copyright 2000 Bob Stayton Table of Contents Using XSL tools to publish DocBook documents... 1 XSLT engines...

More information

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

PASS4TEST. IT Certification Guaranteed, The Easy Way!   We offer free update service for one year PASS4TEST IT Certification Guaranteed, The Easy Way! \ http://www.pass4test.com We offer free update service for one year Exam : 000-141 Title : XML and related technologies Vendors : IBM Version : DEMO

More information

Transcript of Abel Braaksma's Talk on XSLT Streaming at XML Prague 2014

Transcript of Abel Braaksma's Talk on XSLT Streaming at XML Prague 2014 Transcript of Abel Braaksma's Talk on XSLT Streaming at XML Prague 2014 The video of Abel's talk is here: http://www.youtube.com/watch?v=kaupzeew4xg&t=318m25s Abel's slides are here: http://exselt.net/portals/1/streaming%20for%20the%20masses.zip

More information

XML. <subtitle>xslt (cont)</subtitle> <author>prof. Dr. Christian Pape</author>

XML. <subtitle>xslt (cont)</subtitle> <author>prof. Dr. Christian Pape</author> XML xslt (cont) prof. Dr. Christian Pape Content Expressions and Functions Copying nodes Using variables and parameters Conditional Processing XSLT 5-2 Expressions

More information

Display the XML Files for Disclosure to Public by Using User-defined XSL Zhiping Yan, BeiGene, Beijing, China Huadan Li, BeiGene, Beijing, China

Display the XML Files for Disclosure to Public by Using User-defined XSL Zhiping Yan, BeiGene, Beijing, China Huadan Li, BeiGene, Beijing, China PharmaSUG China 2018 Paper CD-72 Display the XML Files for Disclosure to Public by Using User-defined XSL Zhiping Yan, BeiGene, Beijing, China Huadan Li, BeiGene, Beijing, China ABSTRACT US Food and Drug

More information

Generating Web Pages Using XSLT

Generating Web Pages Using XSLT Generating Web Pages Using XSLT 238 XSLT for Data Interchange 239 6.1.xml: An Employee List Document

More information

Burrows & Langford Chapter 9 page 1 Learning Programming Using Visual Basic.NET

Burrows & Langford Chapter 9 page 1 Learning Programming Using Visual Basic.NET Burrows & Langford Chapter 9 page 1 CHAPTER 9 ACCESSING DATA USING XML The extensible Markup Language (XML) is a language used to represent data in a form that does not rely on any particular proprietary

More information

The Transformation Language XSL

The Transformation Language XSL Chapter 8 The Transformation Language XSL 8.1 XSL: Extensible Stylesheet Language developed from CSS (Cascading Stylesheets) scripting language for transformation of data sources to HTML or any other optical

More information

~ Ian Hunneybell: DIA Revision Notes ~

~ Ian Hunneybell: DIA Revision Notes ~ XML is based on open standards, and is text-based, thereby making it accessible to all. It is extensible, thus allowing anyone to customise it for their own needs, to publish for others to use, and to

More information

xmlns:gu="http://www.gu.au/empdtd" xmlns:uky="http://www.uky.edu/empdtd">

xmlns:gu=http://www.gu.au/empdtd xmlns:uky=http://www.uky.edu/empdtd> Namespaces Namespaces An XML document may use more than one DTD or schema Since each structuring document was developed independently, name clashes may appear The solution is to use a different prefix

More information

XML Applications. Prof. Andrea Omicini DEIS, Ingegneria Due Alma Mater Studiorum, Università di Bologna a Cesena

XML Applications. Prof. Andrea Omicini DEIS, Ingegneria Due Alma Mater Studiorum, Università di Bologna a Cesena XML Applications Prof. Andrea Omicini DEIS, Ingegneria Due Alma Mater Studiorum, Università di Bologna a Cesena Outline XHTML XML Schema XSL & XSLT Other XML Applications 2 XHTML HTML vs. XML HTML Presentation

More information

Web Programming Paper Solution (Chapter wise)

Web Programming Paper Solution (Chapter wise) What is valid XML document? Design an XML document for address book If in XML document All tags are properly closed All tags are properly nested They have a single root element XML document forms XML tree

More information

XSLT. Lecture 38. Robb T. Koether. Mon, Apr 21, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) XSLT Mon, Apr 21, / 26

XSLT. Lecture 38. Robb T. Koether. Mon, Apr 21, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) XSLT Mon, Apr 21, / 26 XSLT Lecture 38 Robb T. Koether Hampden-Sydney College Mon, Apr 21, 2014 Robb T. Koether (Hampden-Sydney College) XSLT Mon, Apr 21, 2014 1 / 26 1 XSLT 2 Running XSLT 3 XSLT Files 4 Output Modes 5 XSLT

More information

Hypermedia and the Web XSLT and XPath

Hypermedia and the Web XSLT and XPath Hypermedia and the Web XSLT and XPath XSLT Extensible Stylesheet Language for Transformations Compare/contrast with CSS: CSS is used to change display characteristics of primarily HTML documents. But,

More information

Extensions to XSLT 1.0, and XSLT 2.0

Extensions to XSLT 1.0, and XSLT 2.0 ... Extensions A typical problem: XSLT 1.0 does not have any way of finding the current date and time. However, some XSLT 1.0 processors allow you to use extensions to XSLT 1.0. The EXSLT initiative http://www.exslt.org/

More information

XSLT (part II) Mario Alviano A.Y. 2017/2018. University of Calabria, Italy 1 / 19

XSLT (part II) Mario Alviano A.Y. 2017/2018. University of Calabria, Italy 1 / 19 1 / 19 XSLT (part II) Mario Alviano University of Calabria, Italy A.Y. 2017/2018 Outline 2 / 19 1 Introduction 2 Variables, conditional constructs and iterations 3 Sorting and grouping 4 Named templates

More information

DITA 1.3 Feature Article A Brief Introduction to XSL for Processing DITA Content

DITA 1.3 Feature Article A Brief Introduction to XSL for Processing DITA Content DITA 1.3 Feature Article A Brief Introduction to XSL for Processing DITA Content An OASIS DITA Adoption Technical Committee Publication Chunk1739435240 iii Contents Chunk1739435240 Part I What is XSL?

More information

XML: Extensible Markup Language

XML: Extensible Markup Language XML: Extensible Markup Language CSC 375, Fall 2015 XML is a classic political compromise: it balances the needs of man and machine by being equally unreadable to both. Matthew Might Slides slightly modified

More information

COMP9321 Web Application Engineering. Extensible Markup Language (XML)

COMP9321 Web Application Engineering. Extensible Markup Language (XML) COMP9321 Web Application Engineering Extensible Markup Language (XML) Dr. Basem Suleiman Service Oriented Computing Group, CSE, UNSW Australia Semester 1, 2016, Week 4 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2442

More information

Functions & Conditional Statements

Functions & Conditional Statements Functions & Conditional Statements OmniUpdate User Training Conference 2015 OmniUpdate, Inc. 1320 Flynn Road, Suite 100 Camarillo, CA 93012 OmniUpdate, Inc. 1320 Flynn Road, Suite 100 Camarillo, CA 93012

More information

W3C XML XML Overview

W3C XML XML Overview Overview Jaroslav Porubän 2008 References Tutorials, http://www.w3schools.com Specifications, World Wide Web Consortium, http://www.w3.org David Hunter, et al.: Beginning, 4th Edition, Wrox, 2007, 1080

More information

8/1/2016. XSL stands for EXtensible Stylesheet Language. CSS = Style Sheets for HTML XSL = Style Sheets for XML. XSL consists of four parts:

8/1/2016. XSL stands for EXtensible Stylesheet Language. CSS = Style Sheets for HTML XSL = Style Sheets for XML. XSL consists of four parts: XSL stands for EXtensible Stylesheet Language. CSS = Style Sheets for HTML XSL = Style Sheets for XML http://www.w3schools.com/xsl/ kasunkosala@yahoo.com 1 2 XSL consists of four parts: XSLT - a language

More information

Section A: Multiple Choice

Section A: Multiple Choice Section A: Multiple Choice Question 1 Each item has only one correct answer. Two marks for each correct answer, zero marks for each incorrect answer. Use the supplied sheet to record a single response

More information

Oracle Application Server 10g Oracle XML Developer s Kit Frequently Asked Questions September, 2005

Oracle Application Server 10g Oracle XML Developer s Kit Frequently Asked Questions September, 2005 Oracle Application Server 10g Oracle XML Developer s Kit Frequently Asked Questions September, 2005 This FAQ addresses frequently asked questions relating to the XML features of Oracle XML Developer's

More information

White Paper. XML-Based Export and Import of Objects Using XSLT. Fabasoft Folio 2017 R1 Update Rollup 1

White Paper. XML-Based Export and Import of Objects Using XSLT. Fabasoft Folio 2017 R1 Update Rollup 1 White Paper XML-Based Export and Import of Objects Using XSLT Fabasoft Folio 2017 R1 Update Rollup 1 Copyright Fabasoft R&D GmbH, Linz, Austria, 2018. All rights reserved. All hardware and software names

More information

IBM. XML and Related Technologies Dumps Braindumps Real Questions Practice Test dumps free

IBM. XML and Related Technologies Dumps Braindumps Real Questions Practice Test dumps free 000-141 Dumps 000-141 Braindumps 000-141 Real Questions 000-141 Practice Test 000-141 dumps free IBM 000-141 XML and Related Technologies http://killexams.com/pass4sure/exam-detail/000-141 collections

More information

XPath Expression Syntax

XPath Expression Syntax XPath Expression Syntax SAXON home page Contents Introduction Constants Variable References Parentheses and operator precedence String Expressions Boolean Expressions Numeric Expressions NodeSet expressions

More information

11. EXTENSIBLE MARKUP LANGUAGE (XML)

11. EXTENSIBLE MARKUP LANGUAGE (XML) 11. EXTENSIBLE MARKUP LANGUAGE (XML) Introduction Extensible Markup Language is a Meta language that describes the contents of the document. So these tags can be called as self-describing data tags. XML

More information

One of the main selling points of a database engine is the ability to make declarative queries---like SQL---that specify what should be done while

One of the main selling points of a database engine is the ability to make declarative queries---like SQL---that specify what should be done while 1 One of the main selling points of a database engine is the ability to make declarative queries---like SQL---that specify what should be done while leaving the engine to choose the best way of fulfilling

More information

XSL Concepts: Conditions and Loops. Robert Kiffe, Senior Web Developer OmniUpdate, Inc.

XSL Concepts: Conditions and Loops. Robert Kiffe, Senior Web Developer OmniUpdate, Inc. XSL Concepts: Conditions and Loops Robert Kiffe, Senior Web Developer OmniUpdate, Inc. Quick XSL Recap Conditional Statements If Choose XPath Conditional Loops For-Each For-Each-Group Apply-Templates Activities!

More information

The main Topics in this lecture are:

The main Topics in this lecture are: Lecture 15: Working with Extensible Markup Language (XML) The main Topics in this lecture are: - Brief introduction to XML - Some advantages of XML - XML Structure: elements, attributes, entities - What

More information

XPath. Asst. Prof. Dr. Kanda Runapongsa Saikaew Dept. of Computer Engineering Khon Kaen University

XPath. Asst. Prof. Dr. Kanda Runapongsa Saikaew Dept. of Computer Engineering Khon Kaen University XPath Asst. Prof. Dr. Kanda Runapongsa Saikaew (krunapon@kku.ac.th) Dept. of Computer Engineering Khon Kaen University 1 Overview What is XPath? Queries The XPath Data Model Location Paths Expressions

More information

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI Department of Information Technology IT6801 SERVICE ORIENTED ARCHITECTURE Anna University 2 & 16 Mark Questions & Answers Year / Semester: IV / VII Regulation:

More information